From 0083e32fec02bacc4fb599d9b10f69d8a1cdc823 Mon Sep 17 00:00:00 2001 From: Jeremiasz Major Date: Sun, 21 Jul 2024 18:48:17 +0200 Subject: [PATCH] run prettier in ci --- .github/workflows/ci.yml | 2 ++ package.json | 2 ++ src/print/helpers.ts | 2 +- test/formatting/samples/syntax-error/options.json | 4 ++-- test/printer/samples/allow-shorthand-false.options.json | 4 ++-- test/printer/samples/allow-shorthand-true.options.json | 4 ++-- wallaby.js | 2 +- 7 files changed, 12 insertions(+), 8 deletions(-) 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'],