You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
react-hooks v7 new-rules audit (13 downgraded to warn in a3b1435) #53
Commit `a3b1435` adopted `eslint-plugin-react-hooks` v7 but downgraded 13 new experimental rules to `warn` to avoid a flood of refactor work in a chore-scope commit. This issue tracks auditing each rule against the codebase and promoting viable ones back to `error`.
The two classic rules stayed at `error` (`rules-of-hooks`, `exhaustive-deps`).
Rules to audit
From `eslint-plugin-react-hooks` v7 release notes:
`react-hooks/static-components`
`react-hooks/purity`
`react-hooks/immutability`
`react-hooks/set-state-in-effect`
`react-hooks/set-state-in-render`
`react-hooks/error-boundaries`
`react-hooks/unsupported-syntax`
`react-hooks/component-hook-factories`
`react-hooks/config`
`react-hooks/fbt`
`react-hooks/gating`
`react-hooks/globals`
`react-hooks/refs`
(Exact rule names to verify against v7 README at adoption time.)
Prioritization — per Opus reviewer
Semantically load-bearing: `error-boundaries`, `set-state-in-effect`, `set-state-in-render`, `purity`, `immutability`. These should be audited first — if they'd catch real bugs, promote them to `error`.
Approach
For each rule:
Temporarily promote to `error` in `apps/desktop/eslint.config.js`.
Run `bun run lint`.
Count violations.
Categorize: fixable in < 30 min → fix inline + leave at `error`; bigger → file sub-issue + revert to `warn` with "tracked in #NN" comment.
Rationale
Each of these rules encodes React-team learning about hooks misuse. Leaving them at `warn` permanently defeats the purpose of adopting v7. Tracked as follow-up to keep the strictening pass honest.
Related: #62 (strictening) task #62 in internal tracker.
Activity