Skip to content

eslint-config: upgrade eslint-plugin-react-hooks to 7 - #1065

Closed
Aymericr wants to merge 1 commit into
mainfrom
cursor/deps-eslint-plugin-react-hooks-7-6cd4
Closed

Aymericr wants to merge 1 commit into
mainfrom
cursor/deps-eslint-plugin-react-hooks-7-6cd4

Conversation

@Aymericr

Copy link
Copy Markdown
Contributor

What does this PR do?

Upgrades eslint-plugin-react-hooks from ^5.2.0 to ^7.1.1 in packages/eslint-config. Major upgrade, so no auto-merge.

Breaking changes (CHANGELOG)

  • 6.1.0 requires Node 18+, and recommended became the flat-config preset (legacy config moved to recommended-legacy). New violations: use inside try/catch, and calling useEffectEvent functions in arbitrary closures.
  • 7.0.0 trims the presets to recommended and recommended-latest, removes recommended-latest-legacy and flat/recommended, and turns on all React Compiler rules by default in recommended: static-components, use-memo, preserve-manual-memoization, immutability, globals, refs, set-state-in-effect, purity, set-state-in-render and others.
  • 7.0.1 forbids passing inline useEffectEvent values as JSX props. 7.1.0 adds ESLint 10 support and stricter set-state-in-effect and ref validation.

Code changes: none. The shared configs spread pluginReactHooks.configs.recommended.rules, which still exists in 7, so the compiler rules now apply to packages/ui (and to any future consumer of @repo/eslint-config/next).

How to test

  1. bun install
  2. cd packages/ui && bun run lint. Expect it to be clean.
  3. bun run ci

Screenshots / screen recording

N/A — non-visual change

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

Local results: packages/ui lint is clean. bun run ci steps pass, with only the local-only test failures that main also has.

Open in Web Open in Cursor 

@Aymericr

Copy link
Copy Markdown
Contributor Author

Landed in #1071 (dc65ba0), which combined the nine major upgrades with one lockfile. Closing as superseded. #1061 stays open.

@Aymericr Aymericr closed this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants