Skip to content

[QA] Re-enable React strict hooks rules incrementally #5

@juacker

Description

@juacker

Context

PR #3 introduced ESLint with React hooks rules disabled because the existing codebase predates React 19 strict hooks linting.

Disabled rules

The following rules are currently set to 'off' in eslint.config.js:

  • react-hooks/set-state-in-effect — ~28 violations
  • react-hooks/exhaustive-deps — ~29 violations
  • react-hooks/preserve-manual-memoization — ~15 violations
  • react-hooks/refs — ~6 violations
  • react-hooks/immutability — ~10 violations
  • react-hooks/use-memo — ~5 violations
  • react-hooks/purity — ~3 violations

Recommended approach

Enable one rule at a time as a warning (not error), fix the violations in focused PRs, then promote to error once clean.

Files with the most violations

  • src/components/ChartsView/ContextChart.jsx
  • src/components/Dashboard/Dashboard.jsx
  • src/hooks/useCommandRegistration.js
  • src/agents/useAgentBridge.js
  • src/pages/Workspace.jsx

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