From e1b10845551f863a290180b173f56e072968c165 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 9 Apr 2025 13:41:34 +0200 Subject: [PATCH] ci: improve prettier coverage --- .github/workflows/build.yml | 11 ++++++++++- package.json | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 211a31c9..feeb4f2b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,4 +13,13 @@ jobs: - run: npm ci - run: cp config.json.example config.json - run: npm run verify - - run: npm run lint + - run: npm run lint:ci + - run: npm run prettier + - name: Fail if there are uncommitted changes + run: | + if [[ -n "$(git status --porcelain)" ]]; then + echo "Uncommitted changes detected:" + git status + git diff + exit 1 + fi diff --git a/package.json b/package.json index 3c0c536d..899947c7 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "build": "tsc --incremental --sourceMap && ncp static/webui build/static/webui", "verify": "tsgo --noEmit", "lint": "eslint --ext .ts .", + "lint:ci": "eslint --ext .ts --rule \"prettier/prettier: off\" .", "lint:fix": "eslint --fix --ext .ts .", "prettier": "prettier --write .", "update-translations": "cd scripts && node update-translations.js"