Skip to content

Enable new react-hooks v7 lint rules and lint scripts directory #73

Description

@kraenhansen

Context

In #72, we upgraded eslint-config-next from 15.x to 16.x to fix CI. The upgrade brought in eslint-plugin-react-hooks v7 which introduces several new rules. These were temporarily disabled to keep the fix focused.

Additionally, the scripts/ directory was excluded from linting since next lint never covered it, but it should be linted going forward.

Tasks

Enable new react-hooks v7 rules

The following rules are currently disabled in eslint.config.mjs and should be enabled (fixing violations as needed):

  • react-hooks/set-state-in-effect (23 warnings)
  • react-hooks/refs (18 warnings)
  • react-hooks/exhaustive-deps — already enabled as warning, review remaining 17 violations
  • react-hooks/immutability (5 warnings)
  • react-hooks/purity (4 warnings)
  • react-hooks/static-components (3 warnings)
  • react-hooks/incompatible-library (1 warning)
  • react-hooks/globals (1 warning)
  • react-hooks/preserve-manual-memoization (1 warning)

Lint the scripts directory

  • Remove scripts/ from the ESLint ignores in eslint.config.mjs
  • Fix the 3 @typescript-eslint/no-explicit-any errors in scripts/build-registry.mts

🤖 Generated with Claude Code

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions