Skip to content

eslint-plugin-react-hooks: support ESLint 10 in peerDependencies#35765

Closed
Ashking07 wants to merge 1 commit intofacebook:mainfrom
Ashking07:fix/hooks-eslint10-peerdeps
Closed

eslint-plugin-react-hooks: support ESLint 10 in peerDependencies#35765
Ashking07 wants to merge 1 commit intofacebook:mainfrom
Ashking07:fix/hooks-eslint10-peerdeps

Conversation

@Ashking07
Copy link

Summary

eslint-plugin-react-hooks@7.x currently declares a peer dependency range for eslint that stops at ^9.0.0.

With ESLint 10.0.0, npm fails install resolution (ERESOLVE) even though the plugin rules run correctly.

This change extends peerDependencies.eslint to include ^10.0.0 to unblock ESLint 10 users.
Fixes #35758.

How did you test this change?

In the React repo:

yarn workspace eslint-plugin-react-hooks test

Runtime validation using the published npm package (to ensure ESLint 10 can load and execute the plugin):

npm i -D eslint@^10.0.0 eslint-plugin-react-hooks@^7.0.1 --legacy-peer-deps

npx eslint test.js using an eslint.config.js (flat config) that enables:

react-hooks/rules-of-hooks

react-hooks/exhaustive-deps

Notes:

The npm install used --legacy-peer-deps only to bypass the current peer range so runtime behavior could be verified until this PR lands.

@josephsavona
Copy link
Member

Duplicate of #35720

@josephsavona josephsavona marked this as a duplicate of #35720 Feb 12, 2026
@Ashking07
Copy link
Author

Thank for informing about the duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: eslint-plugin-react-hooks does not support ESLint 10 in peerDependencies

2 participants