Skip to content

Commit dcaa2c9

Browse files
DaviRain-Suclaude
andcommitted
Ratchet Biome to a blocking CI gate
`npm run lint` is now a required CI step (removed continue-on-error). It fails on lint ERRORS — Biome's full recommended set, which currently has zero violations outside the grandfathered backlog — so new error-class issues are blocked. Grandfathered the entire pre-existing backlog (exactly the 16 rules that were firing = all 713 prior errors) to "warn" in biome.json — visible in output, but non-blocking — pending dedicated passes: - a11y (~632): JSX needs button types, key handlers, svg titles, semantic elements, valid anchors — a real accessibility initiative of its own. - suspicious/noArrayIndexKey (50), correctness/useExhaustiveDependencies (11): large, judgment-heavy; auto-fixing hook deps risks render loops. - A few idiomatic/benign ones left as warn rather than churn working code: noAssignInExpressions (the `(m[k] ||= []).push()` idiom), useIterableCallbackReturn (nested forEach arrows), useJsxKeyInIterable (static [id,label,<svg>] config tuples), noImplicitAnyLet (consistent with tsconfig noImplicitAny:false). Net: 0 errors / 920 warnings / 145 infos; `biome check` and `npm test` green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent fa570b6 commit dcaa2c9

2 files changed

Lines changed: 26 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
node-version-file: .node-version
1818
cache: npm
1919
- run: npm ci
20-
# Biome lint/format is advisory for now (the codebase predates it). Surfaces
21-
# findings without failing the build; ratchet to a blocking gate once the
22-
# one-time format pass + correctness fixes land. See biome.json.
23-
- name: Biome (advisory)
20+
# Biome gate: fails the build on lint ERRORS (formatting + Biome's
21+
# recommended rule set). The pre-existing JSX a11y / array-index-key /
22+
# hook-deps backlog is grandfathered to warnings in biome.json (visible but
23+
# non-blocking) pending a dedicated pass; new error-class issues are blocked.
24+
- name: Biome
2425
run: npm run lint
25-
continue-on-error: true
2626
- run: npm test
2727
- run: npm run build

biome.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,27 @@
3434
"rules": {
3535
"recommended": true,
3636
"suspicious": {
37-
"noExplicitAny": "off"
37+
"noExplicitAny": "off",
38+
"noArrayIndexKey": "warn",
39+
"useIterableCallbackReturn": "warn",
40+
"noAssignInExpressions": "warn",
41+
"noImplicitAnyLet": "warn"
42+
},
43+
"correctness": {
44+
"useExhaustiveDependencies": "warn",
45+
"useJsxKeyInIterable": "warn"
46+
},
47+
"a11y": {
48+
"noStaticElementInteractions": "warn",
49+
"useButtonType": "warn",
50+
"useKeyWithClickEvents": "warn",
51+
"noSvgWithoutTitle": "warn",
52+
"useValidAnchor": "warn",
53+
"useSemanticElements": "warn",
54+
"noAutofocus": "warn",
55+
"useFocusableInteractive": "warn",
56+
"useAriaPropsSupportedByRole": "warn",
57+
"noNoninteractiveElementToInteractiveRole": "warn"
3858
}
3959
}
4060
},

0 commit comments

Comments
 (0)