diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9add9751..28a11835 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,8 @@ jobs: frontend: - 'static/**' - 'biome.json' + - '.grit' + - '.stylelintrc.json' - 'jsconfig.json' backend: - 'src/**' @@ -39,7 +41,7 @@ jobs: - 'Cargo.lock' frontend-linter: - name: Frontend — Biome + name: Frontend — CSS and JS checks (format, lint, rules, etc) needs: changes if: needs.changes.outputs.frontend == 'true' runs-on: ubuntu-latest @@ -52,6 +54,14 @@ jobs: - name: Run Biome check run: biome ci static/ + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 25 + + - name: Run Stylelint + run: npx stylelint "**/*.{css,scss}" + rust-fmt: name: Rustfmt needs: changes diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 00000000..30a46514 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,27 @@ +{ + "rules": { + "color-no-hex": true, + "color-named": "never", + "function-disallowed-list": ["rgb", "rgba", "hsl", "hsla", "hwb", "oklch", "oklab"], + "selector-disallowed-list": ["/\\[data-theme/"] + }, + "overrides": [ + { + "files": ["**/variables.css"], + "rules": { + "color-no-hex": null, + "color-named": null, + "function-disallowed-list": null + } + }, + { + "files": ["**/themes/dark.css"], + "rules": { + "color-no-hex": null, + "color-named": null, + "function-disallowed-list": null, + "selector-disallowed-list": null + } + } + ] +}