diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49ee502e..b4889320 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,3 +34,5 @@ jobs: run: npm ci - name: Type check run: npm run check + - name: Lint + run: npm run lint diff --git a/package.json b/package.json index 1ea7e13d..a9b482c2 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,8 @@ "build": "rollup -c", "check": "tsc --noEmit", "check:watch": "tsc --noEmit --watch", + "lint": "prettier --check .", + "format": "prettier --write .", "test": "ava", "prepare": "npm run build", "prepublishOnly": "npm test" diff --git a/src/print/helpers.ts b/src/print/helpers.ts index 68ee12f8..a33130cf 100644 --- a/src/print/helpers.ts +++ b/src/print/helpers.ts @@ -17,7 +17,7 @@ import { SlotTemplateNode, StyleNode, TitleNode, - WindowNode + WindowNode, } from './nodes'; import { ParserOptions } from '../options'; diff --git a/test/formatting/samples/syntax-error/options.json b/test/formatting/samples/syntax-error/options.json index da3820b0..b3799646 100644 --- a/test/formatting/samples/syntax-error/options.json +++ b/test/formatting/samples/syntax-error/options.json @@ -1,3 +1,3 @@ { - "expectSyntaxErrors": true -} \ No newline at end of file + "expectSyntaxErrors": true +} diff --git a/test/printer/samples/allow-shorthand-false.options.json b/test/printer/samples/allow-shorthand-false.options.json index 1b6ce299..e495e729 100644 --- a/test/printer/samples/allow-shorthand-false.options.json +++ b/test/printer/samples/allow-shorthand-false.options.json @@ -1,3 +1,3 @@ { - "svelteAllowShorthand": false -} \ No newline at end of file + "svelteAllowShorthand": false +} diff --git a/test/printer/samples/allow-shorthand-true.options.json b/test/printer/samples/allow-shorthand-true.options.json index 16724264..29935c66 100644 --- a/test/printer/samples/allow-shorthand-true.options.json +++ b/test/printer/samples/allow-shorthand-true.options.json @@ -1,3 +1,3 @@ { - "svelteAllowShorthand": true -} \ No newline at end of file + "svelteAllowShorthand": true +} diff --git a/wallaby.js b/wallaby.js index 43a34ab1..fe8d5693 100644 --- a/wallaby.js +++ b/wallaby.js @@ -1,4 +1,4 @@ -module.exports = function(w) { +module.exports = function (w) { return { files: ['src/**/*.ts', 'test/**/*.html'], tests: ['test/**/*.ts'],