Skip to content

react-hooks v7: audit 13 warn-downgraded rules in apps/desktop #116

Open

Description

@utof

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:

  1. react-hooks/static-components
  2. react-hooks/use-memo
  3. react-hooks/void-use-memo
  4. react-hooks/preserve-manual-memoization
  5. react-hooks/immutability
  6. react-hooks/globals
  7. react-hooks/refs
  8. react-hooks/set-state-in-effect
  9. react-hooks/error-boundaries
  10. react-hooks/purity
  11. react-hooks/set-state-in-render
  12. react-hooks/config
  13. react-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 error is
    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

Activity

  1. added
    status/needs-research
    area/frontend
    on Apr 20, 2026
  2. added this to the Library audit follow-ups milestone on May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/frontendstatus/needs-research

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions