Context
#403 bumped eslint-config-next to 16.2.x, which ships a newer eslint-plugin-react-hooks that promotes several React-Compiler-era rules to errors. They flag 25 pre-existing patterns across ~15 files. To land the 40-package dependency group without bundling a large refactor, these four rules were downgraded to warn in eslint.config.mjs:
react-hooks/set-state-in-effect
react-hooks/refs
react-hooks/immutability
react-hooks/incompatible-library
Run pnpm lint to see the current warnings.
Suggested priority
react-hooks/refs (ref access during render) — potential correctness bugs, fix first. Files: src/hooks/use-ai-conversation.ts, src/hooks/use-ai-debug-conversation.ts, src/hooks/use-vrl-ai-conversation.ts, src/hooks/use-live-tap.ts.
react-hooks/immutability — src/hooks/use-sse.ts (connect accessed before declaration; reorder the useCallback).
react-hooks/set-state-in-effect — ~13 files (mostly benign external→state sync: use-media-query.ts, use-mobile.ts, the list/fleet toolbars, etc.). Consider useSyncExternalStore / derived state.
react-hooks/incompatible-library — src/components/pipeline/pipeline-logs.tsx (TanStack Virtual useVirtualizer); a library limitation — likely an inline disable rather than a fix.
Goal
Resolve the violations and re-escalate the four rules from warn back to error in eslint.config.mjs.
Context
#403 bumped
eslint-config-nextto 16.2.x, which ships a newereslint-plugin-react-hooksthat promotes several React-Compiler-era rules to errors. They flag 25 pre-existing patterns across ~15 files. To land the 40-package dependency group without bundling a large refactor, these four rules were downgraded towarnineslint.config.mjs:react-hooks/set-state-in-effectreact-hooks/refsreact-hooks/immutabilityreact-hooks/incompatible-libraryRun
pnpm lintto see the current warnings.Suggested priority
react-hooks/refs(ref access during render) — potential correctness bugs, fix first. Files:src/hooks/use-ai-conversation.ts,src/hooks/use-ai-debug-conversation.ts,src/hooks/use-vrl-ai-conversation.ts,src/hooks/use-live-tap.ts.react-hooks/immutability—src/hooks/use-sse.ts(connectaccessed before declaration; reorder theuseCallback).react-hooks/set-state-in-effect— ~13 files (mostly benign external→state sync:use-media-query.ts,use-mobile.ts, the list/fleet toolbars, etc.). ConsideruseSyncExternalStore/ derived state.react-hooks/incompatible-library—src/components/pipeline/pipeline-logs.tsx(TanStack VirtualuseVirtualizer); a library limitation — likely an inline disable rather than a fix.Goal
Resolve the violations and re-escalate the four rules from
warnback toerrorineslint.config.mjs.