feat(admin): add ESLint, Prettier, and Stylelint for admin SPA#625
feat(admin): add ESLint, Prettier, and Stylelint for admin SPA#625waynesun09 wants to merge 7 commits into
Conversation
Review: #625Head SHA: 9b15e3b SummaryThis PR introduces ESLint 9, Prettier, and Stylelint tooling for the admin SPA with a well-structured configuration. The vast majority of changes are automated Prettier reformats (whitespace, line-length adjustments) with no behavioral impact. A small number of substantive changes — removal of the unused FindingsInfo
FooterOutcome: approve Previous runReview: #625Head SHA: 5661747 SummaryThis PR adds ESLint 9 (flat config), Prettier, and Stylelint tooling for the admin SPA, along with Husky + lint-staged for pre-commit hooks. The vast majority of the diff is Prettier auto-formatting of existing code (line-wrapping changes, blank lines between CSS rules). The few behavioral changes — adding FindingsMedium
Low
Info
FooterOutcome: approve Previous run (2)Review: #625Head SHA: 613f465 SummaryThe linting and formatting tooling is well-structured and the Prettier/ESLint/Stylelint configuration is correct. However, introducing Husky v9 into a repo that already uses the Python FindingsHigh
Medium
Info
FooterOutcome: request-changes Previous run (3)Review: #625Head SHA: 1b9d8c4 SummaryThis PR adds ESLint 9, Prettier, and Stylelint tooling for the admin SPA with sensible defaults — including XSS prevention ( FindingsMedium(none) Low
Info
FooterOutcome: approve Previous run (4)Review: #625Head SHA: 616fcb2 SummaryThis PR cleanly adds ESLint 9, Prettier, and Stylelint infrastructure to the admin SPA with well-chosen rules and a sensible phased rollout plan. All source file changes are purely Prettier reformatting with no logic modifications — verified by diff inspection. The one substantive CSS change ( FindingsInfo
FooterOutcome: approve Previous run (5)Review: #625Head SHA: 9d2fbb0 SummaryThis PR adds ESLint 9 (flat config), Prettier, and Stylelint to the admin SPA, along with Prettier-reformatted source files. The changes are well-structured: linting config is sensible (XSS prevention via FindingsMedium / Low / Info
FooterOutcome: comment-only |
Add frontend linting scaffolding for the admin SPA (Svelte 5 + Vite 6 + TypeScript): - ESLint flat config with typescript-eslint, eslint-plugin-svelte, and Prettier compat - Prettier with prettier-plugin-svelte for consistent code formatting - Stylelint with stylelint-config-standard and stylelint-config-html/svelte - npm scripts: lint, lint:fix, format, format:check, stylelint, stylelint:fix Signed-off-by: Wayne Sun <gsun@redhat.com>
Apply Prettier formatting and Stylelint fixes to all existing admin SPA files. Add baseline lint disables for pre-existing violations: - App.svelte: max-lines (TODO: extract components) - turnstile.ts: preserve-caught-error (TODO: attach cause) - Home.svelte: replace deprecated word-break with overflow-wrap Signed-off-by: Wayne Sun <gsun@redhat.com>
- Move ignores block to first position in ESLint flat config array per ESLint 9 convention (prevents accidental non-global ignore if a files key is later added to the same object) - Spread ts.configs.recommended (it's an array of 3 config objects) instead of relying on defineConfig to flatten nested arrays - Remove no-op color-no-hex: null from stylelint config (rule does not exist in stylelint-config-standard) Signed-off-by: Wayne Sun <gsun@redhat.com>
Run ESLint, Prettier, and Stylelint on staged files before each commit. Follows the same pattern as openkaiden/kaiden: Husky v9 with lint-staged, scoped to web/admin/src files only. Signed-off-by: Wayne Sun <gsun@redhat.com>
- Split lint-staged: Svelte files now get ESLint + Stylelint + Prettier (previously only ESLint + Prettier, missing scoped style linting) - Mark .husky/pre-commit as executable (100755) for hygiene Signed-off-by: Wayne Sun <gsun@redhat.com>
- Attach cause to re-thrown errors in githubClient and orgConfigParse - Prefix unused appSlug and scanComplete vars with underscore - Add each-block keys in OrgList popover lists - Suppress require-yield in test generators that intentionally throw - Replace deprecated clip with clip-path in sr-only - Replace deprecated word-break: break-word with overflow-wrap Signed-off-by: Wayne Sun <gsun@redhat.com>
613f465 to
5661747
Compare
The variable was written in 7 locations but never read, creating unnecessary reactive tracking overhead in Svelte 5. Signed-off-by: Wayne Sun <gsun@redhat.com>
Summary
eslint-plugin-svelte,typescript-eslint, and Svelte 5 component quality rulesprettier-plugin-sveltefor consistent formattingstylelint-config-html/sveltefor CSS linting in scoped styleswarnlevelgit blamelint,lint:fix,format,format:check,stylelint,stylelint:fixKey rules enabled
svelte/max-lines-per-blockmax-lines(150)svelte/block-langlang="ts"on scriptssvelte/no-at-html-tagssvelte/require-each-key{#each}@typescript-eslint/no-unused-varsPhased rollout
warn, baseline disables on existing violationserrorand enablecolor-no-hexTest plan
npm run format:checkpasses (0 issues)npm run lintpasses (0 errors, 0 warnings)npm run stylelintpasses (0 issues)npm run checkpasses (svelte-check: 213 files, 0 errors)npm run checkandnpm teststeps