diff --git a/.eslintrc.json b/.eslintrc.json
index ac979ae..f170a87 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,43 +1,35 @@
{
- "env": {
- "browser": true,
- "es6": true,
- "node": true
- },
- "extends": [
- "airbnb-typescript",
- "eslint:recommended",
- "plugin:jest/recommended"
- ],
- "globals": {
- "Atomics": "readonly",
- "SharedArrayBuffer": "readonly"
- },
- "parser": "@typescript-eslint/parser",
- "parserOptions": {
- "ecmaVersion": 2018,
- "sourceType": "module",
- "project": [
- "./tsconfig.json"
- ]
- },
- "ignorePatterns": [
- "webpack.*"
- ],
- "plugins": [
- "@typescript-eslint"
- ],
- "rules": {
- "import/prefer-default-export": "off"
- },
- "settings": {
- "import/resolver": {
- "node": {
- "extensions": [
- ".js",
- ".ts"
- ]
- }
- }
+ "env": {
+ "browser": true,
+ "es6": true,
+ "node": true
+ },
+ "extends": [
+ "airbnb-typescript",
+ "eslint:recommended",
+ "plugin:jest/recommended",
+ "plugin:prettier/recommended"
+ ],
+ "globals": {
+ "Atomics": "readonly",
+ "SharedArrayBuffer": "readonly"
+ },
+ "parser": "@typescript-eslint/parser",
+ "parserOptions": {
+ "ecmaVersion": 2018,
+ "sourceType": "module",
+ "project": ["./tsconfig.json"]
+ },
+ "ignorePatterns": ["webpack.*"],
+ "plugins": ["@typescript-eslint"],
+ "rules": {
+ "import/prefer-default-export": "off"
+ },
+ "settings": {
+ "import/resolver": {
+ "node": {
+ "extensions": [".js", ".ts"]
+ }
}
+ }
}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..df99067
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,26 @@
+name: CI
+
+on:
+ push:
+ branches: [main, ci-*]
+ pull_request:
+ branches: [main]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: 12.x
+ - uses: actions/cache@v2
+ with:
+ path: 'node_modules'
+ key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
+ - name: install
+ run: yarn install
+ - name: lint
+ run: yarn run lint
+ - name: format
+ run: yarn run lint:format
diff --git a/.github/workflows/lint_and_unittests.yml b/.github/workflows/lint_and_unittests.yml
deleted file mode 100644
index b217160..0000000
--- a/.github/workflows/lint_and_unittests.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-name: CI
-
-# Controls when the action will run. Triggers the workflow on push or pull request
-# events but only for the main branch
-on:
- push:
- branches: [ main, ci-* ]
- pull_request:
- branches: [ main ]
-
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
-jobs:
- # This workflow contains a single job called "build"
- build:
- # The type of runner that the job will run on
- runs-on: ubuntu-latest
-
- # Steps represent a sequence of tasks that will be executed as part of the job
- steps:
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v2
-
- - name: Cache npm
- id: cache-npm
- uses: actions/cache@v2
- with:
- path: ~/.npm
- key: ${{ runner.os }}-npm-${{ hashFiles('**/yarn.lock') }}
- restore-keys:
- ${{ runner.os }}-npm-
-
- - name: Use Node.js 12.x
- uses: actions/setup-node@v1
- with:
- node-version: 12.x
-
- # Runs a set of commands using the runners shell
- - name: install
- run: |
- yarn install
-
- - name: lint
- run: |
- yarn run lint
-
- # - name: test
- # run: |
- # yarn run test
-
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..09dcf1c
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,7 @@
+{
+ "trailingComma": "all",
+ "tabWidth": 2,
+ "semi": true,
+ "singleQuote": true,
+ "printWidth": 100
+}
diff --git a/README.md b/README.md
index 394f179..42de5f4 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ The goal of `@curvenote/article` is to provide web-components for interactive sc
The [curvenote/article](https://curvenote.dev/article) project is heavily inspired by [tangle.js](http://worrydream.com/Tangle/guide.html), re-imagined to use [web-components](https://www.webcomponents.org/)!
This means you can declaratively write your variables and how to display them in `html` markup.
-To get an idea of what that looks like, let's take the canonical example of *Tangled Cookies* - a simple reactive document.
+To get an idea of what that looks like, let's take the canonical example of _Tangled Cookies_ - a simple reactive document.

@@ -23,8 +23,8 @@ To get an idea of what that looks like, let's take the canonical example of *Tan
- When you eat
+ When you eat
That's
${unsafeHTML(codeDom.innerHTML)}