Skip to content

Burn down react-hooks lint warnings (downgraded to land eslint-config-next 16.2) #413

Description

@TerrifiedBug

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

  1. 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.
  2. react-hooks/immutabilitysrc/hooks/use-sse.ts (connect accessed before declaration; reorder the useCallback).
  3. 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.
  4. react-hooks/incompatible-librarysrc/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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions