fix: enable eslint-plugin-svelte a11y rules and fix violations
CI / Env docs check (push) Successful in 30s
CI / Nginx config check (push) Successful in 37s
CI / Docker compose check (push) Successful in 38s
CI / Frontend deps check (push) Successful in 46s
CI / Frontend major deps (push) Successful in 51s
CI / Secrets scan (push) Successful in 52s
CI / Go build (push) Successful in 56s
CI / Frontend build (push) Successful in 1m9s
CI / Knip (push) Successful in 46s
CI / Go vet (prod) (push) Successful in 1m59s
CI / Frontend a11y check (push) Successful in 2m7s
CI / Go vet (dev) (push) Successful in 2m4s
CI / go mod tidy (push) Successful in 25s
CI / Staticcheck (prod) (push) Successful in 2m43s
CI / Frontend QC (audit) (push) Successful in 1m39s
CI / Staticcheck (dev) (push) Successful in 3m47s
CI / Go vulnerabilities (push) Successful in 1m48s
CI / golangci-lint (push) Successful in 3m57s
CI / Frontend QC (typecheck) (push) Successful in 1m49s
CI / Security scan (prod) (push) Successful in 4m1s
CI / Security scan (dev) (push) Successful in 4m30s
CI / Frontend QC (lint) (push) Successful in 2m5s
CI / Svelte strict check (push) Failing after 988h42m2s
CI / Race (dev) (push) Failing after 988h42m18s
CI / Race (prod) (push) Failing after 988h42m19s
CI / Tests (dev) (push) Failing after 988h42m19s
CI / Tests (prod) (push) Failing after 988h42m20s
CI / Env docs check (push) Successful in 30s
CI / Nginx config check (push) Successful in 37s
CI / Docker compose check (push) Successful in 38s
CI / Frontend deps check (push) Successful in 46s
CI / Frontend major deps (push) Successful in 51s
CI / Secrets scan (push) Successful in 52s
CI / Go build (push) Successful in 56s
CI / Frontend build (push) Successful in 1m9s
CI / Knip (push) Successful in 46s
CI / Go vet (prod) (push) Successful in 1m59s
CI / Frontend a11y check (push) Successful in 2m7s
CI / Go vet (dev) (push) Successful in 2m4s
CI / go mod tidy (push) Successful in 25s
CI / Staticcheck (prod) (push) Successful in 2m43s
CI / Frontend QC (audit) (push) Successful in 1m39s
CI / Staticcheck (dev) (push) Successful in 3m47s
CI / Go vulnerabilities (push) Successful in 1m48s
CI / golangci-lint (push) Successful in 3m57s
CI / Frontend QC (typecheck) (push) Successful in 1m49s
CI / Security scan (prod) (push) Successful in 4m1s
CI / Security scan (dev) (push) Successful in 4m30s
CI / Frontend QC (lint) (push) Successful in 2m5s
CI / Svelte strict check (push) Failing after 988h42m2s
CI / Race (dev) (push) Failing after 988h42m18s
CI / Race (prod) (push) Failing after 988h42m19s
CI / Tests (dev) (push) Failing after 988h42m19s
CI / Tests (prod) (push) Failing after 988h42m20s
This commit is contained in:
@@ -45,6 +45,10 @@ backend/.DS_Store
|
|||||||
# 3. Node/Svelte (Frontend)
|
# 3. Node/Svelte (Frontend)
|
||||||
# ------------------------------------
|
# ------------------------------------
|
||||||
|
|
||||||
|
# Root-level npm artifacts (from nested npm installs)
|
||||||
|
node_modules/
|
||||||
|
package.json
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
frontend/node_modules
|
frontend/node_modules
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,17 @@ import svelteConfig from './svelte.config.js';
|
|||||||
|
|
||||||
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
|
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
|
||||||
|
|
||||||
|
// Svelte 5 a11y checking — no separate svelte/a11y-* rules exist in
|
||||||
|
// eslint-plugin-svelte v3.20.0. All a11y validation is built into the
|
||||||
|
// Svelte 5 compiler itself (42 checks covering alt-text, ARIA, keyboard
|
||||||
|
// interaction, semantic HTML, tabindex, roles, labels, etc.). The
|
||||||
|
// svelte/valid-compile rule below surfaces EVERY compiler warning — including
|
||||||
|
// all compiler-level a11y diagnostics — as ESLint errors.
|
||||||
|
//
|
||||||
|
// See node_modules/svelte/src/compiler/warnings.js for the full list of
|
||||||
|
// a11y_* warning codes. No separate eslint-plugin-a11y or jsx-a11y rules
|
||||||
|
// are needed since the Svelte 5 compiler covers them natively.
|
||||||
|
|
||||||
export default defineConfig(
|
export default defineConfig(
|
||||||
includeIgnoreFile(gitignorePath),
|
includeIgnoreFile(gitignorePath),
|
||||||
js.configs.recommended,
|
js.configs.recommended,
|
||||||
@@ -34,10 +45,11 @@ export default defineConfig(
|
|||||||
name: 'svelte:a11y:rules',
|
name: 'svelte:a11y:rules',
|
||||||
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
||||||
rules: {
|
rules: {
|
||||||
// Compile all .svelte files and surface compiler warnings as ESLint errors.
|
// Surface ALL Svelte 5 compiler warnings as errors — this catches every
|
||||||
// The Svelte 5 compiler has built-in a11y checks (a11y_missing_attribute,
|
// built-in a11y check (a11y_missing_attribute, a11y_click_events_have_key_events,
|
||||||
// a11y_click_events_have_key_events, a11y_no_static_element_interactions, etc.)
|
// a11y_no_static_element_interactions, a11y_role_has_required_aria_props,
|
||||||
// that are enabled by default via accessibilityWarnings: true.
|
// a11y_label_has_associated_control, a11y_media_has_caption, … 42 total).
|
||||||
|
// No warning filter is applied, so every diagnostic is reported.
|
||||||
'svelte/valid-compile': 'error',
|
'svelte/valid-compile': 'error',
|
||||||
|
|
||||||
// Require explicit type attribute on <button> elements
|
// Require explicit type attribute on <button> elements
|
||||||
|
|||||||
Reference in New Issue
Block a user