mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-03 05:10:16 +03:00
Fixes #7189 Consolidates all 29 `no-duplicate-selectors` violations across 18 stylesheets by merging later duplicate rule blocks into the first occurrence. Where duplicates had conflicting values, the cascade-winning (later) value was kept, so computed styles are unchanged. Also: - Adds `frontend/stylelint.config.mjs` with only `no-duplicate-selectors` enabled (Prettier and the theme linter own everything else). - Adds a `frontend:lint:css` task, wired into `task frontend:lint` as a blocking check so regressions can't creep back in. - Lints all first-party CSS (`editor/**/*.css`, so `public/css` and any future non-`src` stylesheets are covered too), excluding only the vendored `cookieconsent.css` and build output via `ignoreFiles`. This surfaced and fixed 5 additional duplicate selectors in `cookieconsentCustomisation.css` that weren't in the original issue report. Note: `portal/views/Sources.css` goes beyond dedup — the whole `.portal-sources__connections*` block is deleted as dead code (unreferenced since the S3 connections redesign in #6965; only `-actions` in it was an actual duplicate). 🤖 Generated with [Claude Code](https://claude.ai/code)
14 lines
418 B
JavaScript
14 lines
418 B
JavaScript
// Deliberately minimal: Prettier owns formatting and `task frontend:lint:colors`
|
|
// owns the theme tokens, so this only carries rules that catch real bugs.
|
|
export default {
|
|
ignoreFiles: [
|
|
"**/dist/**",
|
|
"**/src-tauri/**",
|
|
// Vendored third-party CSS (its first-party customisation file IS linted).
|
|
"**/editor/public/css/cookieconsent.css",
|
|
],
|
|
rules: {
|
|
"no-duplicate-selectors": true,
|
|
},
|
|
};
|