diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index feca848d1f..2958f21226 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -56,8 +56,8 @@ jobs: - name: Run eslint run: npx eslint --quiet "." - run-stylelint-css: - name: Run stylelint (css) + run-stylelint: + name: Run stylelint runs-on: ubuntu-latest steps: @@ -78,31 +78,7 @@ jobs: run: npm ci --no-audit - name: Run stylelint - run: npm run stylelint:css - - run-stylelint-scss: - name: Run stylelint (scss) - runs-on: ubuntu-latest - - steps: - - name: Check out Git repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Setup node environment - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - check-latest: true - cache: npm - - - name: Set up stylelint matcher - uses: xt0rted/stylelint-problem-matcher@34db1b874c0452909f0696aedef70b723870a583 # tag=v1 - - - name: Install Node.js dependencies - run: npm ci --no-audit - - - name: Run stylelint - run: npm run stylelint:scss + run: npm run stylelint run-tsc: name: Run TypeScript build check diff --git a/.stylelintrc.json b/.stylelintrc.json index 0e7a31f32a..3cb2e8b6f6 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,7 +1,7 @@ { "plugins": [ - "stylelint-no-browser-hacks/lib" - ], + "stylelint-no-browser-hacks/lib" + ], "rules": { "at-rule-empty-line-before": [ "always", { "except": [ @@ -143,5 +143,20 @@ "value-list-comma-space-after": "always-single-line", "value-list-comma-space-before": "never", "value-list-max-empty-lines": 0 - } + }, + "overrides": [ + { + "files": [ + "*.scss", + "**/*.scss" + ], + "customSyntax": "postcss-scss", + "plugins": [ "stylelint-scss" ], + "rules": { + "at-rule-no-unknown": null, + "scss/at-rule-no-unknown": true, + "plugin/no-browser-hacks": null + } + } + ] } diff --git a/.stylelintrc.scss.json b/.stylelintrc.scss.json deleted file mode 100644 index f6577ae28a..0000000000 --- a/.stylelintrc.scss.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ "./.stylelintrc.json" ], - "customSyntax": "postcss-scss", - "plugins": [ "stylelint-scss" ], - "rules": { - "at-rule-no-unknown": null, - "scss/at-rule-no-unknown": true, - "plugin/no-browser-hacks": null - } -} diff --git a/package.json b/package.json index 9975e3f49f..9aba9fb979 100644 --- a/package.json +++ b/package.json @@ -149,9 +149,7 @@ "lint": "eslint \"./\"", "test": "vitest --watch=false --config vite.config.ts", "test:watch": "vitest --config vite.config.ts", - "stylelint": "npm run stylelint:css && npm run stylelint:scss", - "stylelint:css": "stylelint \"src/**/*.css\"", - "stylelint:scss": "stylelint --config=\".stylelintrc.scss.json\" \"src/**/*.scss\"" + "stylelint": "stylelint \"src/**/*.{css,scss}\"" }, "engines": { "node": ">=20.0.0",