Repository navigation
Description
Context
apps/desktop/eslint.config.js currently downgrades 13 new
eslint-plugin-react-hooks@7 rules from the recommended-latest
preset to warn level, to avoid blocking the frontend build while
we audit the existing code against the new rules' semantics.
Rules currently at warn:
react-hooks/static-componentsreact-hooks/use-memoreact-hooks/void-use-memoreact-hooks/preserve-manual-memoizationreact-hooks/immutabilityreact-hooks/globalsreact-hooks/refsreact-hooks/set-state-in-effectreact-hooks/error-boundariesreact-hooks/purityreact-hooks/set-state-in-renderreact-hooks/configreact-hooks/gating
Current fire count
bun run lint emits 0 warn-level fires across these 13 rules
at HEAD (measured at issue-file time).
Desired outcome
For each rule: audit the codebase, either fix the violations (if
any) and promote to error, or justify the downgrade with a WHY
comment and file a narrower per-rule issue.
Prefer batching rules that fire on 0 sites (promote immediately,
zero risk) vs rules that fire on multiple sites (separate issue +
migration).
Priority
scripts.lint in apps/desktop/package.json uses --max-warnings 0,
so warn-level rules DO fail CI when they fire. Priority depends on
the current fire count:
- Zero fires (cosmetic): P2 / low. Promotion to
erroris
zero-risk and should be done as a small follow-up PR. - Any fires (CI-impacting): P0. The build is effectively relying
on cache or ignore-paths to stay green; investigate first, then
audit per-rule.
Current fire count is 0 — this is P2 / low (cosmetic). Promotion
to error is zero-risk and can be done as a small follow-up PR.
The two critical rules (rules-of-hooks, exhaustive-deps) are
already at error level and are not in scope for this issue.
Labels
frontend— touches apps/desktop only.library-audit-followup— surfaced by the 2026-04-20 library /
stack audit's L2 follow-up bundle.needs-research— react-hooks v7's new Compiler-aware rule set
is recent (GA 2025); AI-assisted triage may emit stale semantics
for these rules. Verify each rule's intent against the plugin's
README (https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks)
before promoting toerror.
Activity