mirror of
https://github.com/willchen96/mike.git
synced 2026-07-24 23:41:04 +02:00
fix: burn down frontend eslint errors; make CI lint blocking
Takes frontend/npm run lint from 23 errors / 40 warnings to 0 errors / 40 warnings, then removes continue-on-error from the CI lint step so it gates merges. Errors fixed outright: - @typescript-eslint/no-explicit-any (5, ChatView.tsx): dropped redundant (msg as any) casts — Message already declares files, workflow, and error with the exact shapes the props expect. - react/no-unescaped-entities (1, support/page.tsx): "We'll" -> "We'll". Targeted disables (17, all react-hooks/set-state-in-effect): every site is an intentional effect-driven state pattern — SSR/hydration mount gates (Modal, useSelectedModel), reset-on-prop/identity-change (CaseLawPanel x3, ChatView chat switch, CitationQuotesHeader, ChatHistoryContext logout, useFetchDocxBytes), sync fast paths of async fetch/check effects (CaseLawPanel, MfaLoginGate x2), DOM-measured state (ChatView scroll button, message-visibility restore), and timed UI latches (PreResponseWrapper, TRChatPanel, AskInputPopup auto-submit). Rewriting any of them would change runtime behavior, so each carries a // eslint-disable-next-line with a one-line reason instead of a fix or a repo-wide rule change. CI: lint step is now blocking; comments updated to say the backlog is at zero. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
b20109ac6c
commit
0740f656e6
13 changed files with 27 additions and 12 deletions
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
|
@ -7,7 +7,7 @@
|
|||
# on a tree without those pieces the test steps no-op and the build still
|
||||
# gates the merge. Beyond the fork version this also builds the frontend
|
||||
# (placeholder NEXT_PUBLIC_* env — verified sufficient for `next build`) and
|
||||
# runs eslint as an advisory step (see the comment on that step).
|
||||
# runs eslint as a blocking gate (the error backlog is at zero).
|
||||
name: CI
|
||||
|
||||
on:
|
||||
|
|
@ -61,11 +61,9 @@ jobs:
|
|||
# harness PR merges); runs the suite once it exists.
|
||||
- run: npm test --if-present
|
||||
|
||||
# Advisory only for now: main currently carries 23 eslint errors, so a
|
||||
# blocking gate would turn every PR red on inherited debt. Flip this to
|
||||
# blocking (remove continue-on-error) once the backlog is burned down.
|
||||
# Blocking gate: the eslint error backlog was burned down in this PR
|
||||
# (0 errors; warnings do not fail the step), so any new error fails CI.
|
||||
- run: npm run lint
|
||||
continue-on-error: true
|
||||
|
||||
# Production build. NEXT_PUBLIC_* values are inlined at build time and
|
||||
# only need to be well-formed here — nothing is contacted during build.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue