eslint-plugin-react-hooks: support ESLint 10 in peerDependencies#35765
Closed
Ashking07 wants to merge 1 commit intofacebook:mainfrom
Closed
eslint-plugin-react-hooks: support ESLint 10 in peerDependencies#35765Ashking07 wants to merge 1 commit intofacebook:mainfrom
Ashking07 wants to merge 1 commit intofacebook:mainfrom
Conversation
Member
|
Duplicate of #35720 |
Author
|
Thank for informing about the duplicate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.