Skip to content

Commit b4ae731

Browse files
alicodingclaude
andauthored
chore: bump eslint 9->10 + eslint-plugin-react-hooks 5->7 (Dependabot #4/#7) (#30)
Bundled together, not sequential: react-hooks 5.2.0 only peer-supports eslint up to ^9.0.0, so eslint 10 required react-hooks 7.1.1 in the same migration (confirmed via npm view peerDependencies before starting, per Dependabot #4/#7 both being red). react-hooks 6.x/7.x folded the React Compiler's lint rules into `recommended`, surfacing real new violations, triaged rule-by-rule: - preserve-caught-error (new eslint 10 core rule): two e2e fixture throws now attach `cause` to the original error. - no-useless-assignment (new eslint 10 core rule): a genuinely dead initializer in SchemaIntake's detect(). - react-hooks/immutability: QuickPanel's refreshFrecency/openMain moved above the effects that reference them (order-only, same runtime closures). - react-hooks/refs, react-hooks/purity: two legitimate false positives (a headless-hook ref-spread idiom in Tabs.tsx, an intentional Date.now() read in a relative-time badge) documented with disable-line comments. - react-hooks/set-state-in-effect: tuned off project-wide in eslint.config.js -- flags an established, deliberate 15-instance reset-state-on-id-change idiom across the codebase; rewriting all 15 call sites is real behavioral refactor work well beyond this bump's scope, so this follows .golangci.yml's own "tune when defaults fight house style" precedent instead of scattering 15 disable-line comments or silently regressing behavior. Also bumped @eslint/js to match eslint 10's flat-config recommended preset. typescript-eslint (8.66+) and eslint-plugin-react-refresh (0.5.3) already peer-support eslint 10, so neither needed a bump. Full local suite green: eslint, tsc, boundaries, vitest (227/227), frontend build, go vet, go build (desktop+server), file-loc-limit, rules-frontmatter, root-file-naming. Claude-Session: https://claude.ai/code/session_01FYwojT8GdUbYSoggbvEFft Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 3357b22 commit b4ae731

9 files changed

Lines changed: 666 additions & 292 deletions

File tree

frontend/e2e/fixtures/clipboardLock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async function acquire(): Promise<void> {
4949
continue // lock vanished between the EEXIST and this stat -- retry immediately
5050
}
5151
if (Date.now() > deadline) {
52-
throw new Error(`timed out waiting ${ACQUIRE_TIMEOUT_MS}ms for the real-clipboard lock (${LOCK_PATH})`)
52+
throw new Error(`timed out waiting ${ACQUIRE_TIMEOUT_MS}ms for the real-clipboard lock (${LOCK_PATH})`, { cause: err })
5353
}
5454
await new Promise((resolve) => setTimeout(resolve, 100))
5555
}

frontend/e2e/fixtures/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export async function spawnMillServer(opts: SpawnServerOptions): Promise<Spawned
106106
await waitForHealth(`${baseURL}/health`, proc, 60_000)
107107
} catch (err) {
108108
proc.kill('SIGKILL')
109-
throw new Error(`${String(err)}\nmill-server stderr:\n${stderrTail.join('')}`)
109+
throw new Error(`${String(err)}\nmill-server stderr:\n${stderrTail.join('')}`, { cause: err })
110110
}
111111

112112
// Isolation guard, preserved per-worker instead of once globally (the

frontend/eslint.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@ export default tseslint.config(
1919
},
2020
rules: {
2121
...reactHooks.configs.recommended.rules,
22+
// eslint-plugin-react-hooks 6.x/7.x folded the React Compiler's
23+
// lint rules into `recommended` (goal: dependency majors sweep,
24+
// eslint 10 + react-hooks 7.1.1). `set-state-in-effect` flags
25+
// house style's own "reset local state when an id/prop changes,
26+
// then kick off a fetch" idiom used across ~15 existing effects
27+
// (WorkflowRunsPanel, IntegrationBindingsEditor, liveRunState,
28+
// and others) -- a well-established, deliberate React pattern
29+
// here, not a bug the rule caught. Rewriting all 15 call sites to
30+
// the rule's preferred derived-state/`key`-remount shape is a
31+
// real behavioral refactor with its own retest surface, well
32+
// beyond a dependency bump's scope -- tune it off project-wide
33+
// rather than force that refactor or scatter 15 disable-line
34+
// comments, matching .golangci.yml's "tune when defaults fight
35+
// house style" precedent.
36+
'react-hooks/set-state-in-effect': 'off',
2237
'react-refresh/only-export-components': [
2338
'warn',
2439
{ allowConstantExport: true },

0 commit comments

Comments
 (0)