-
Notifications
You must be signed in to change notification settings - Fork 46.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Rules with suggestions must set the meta.hasSuggestions
property to true
#22545
Comments
Straight from the horses mouth. Install: And changed the eslint config to: {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 13,
"sourceType": "module"
},
"plugins": ["react", "react-hooks", "@typescript-eslint"],
"rules": {
"react-hooks/exhaustive-deps": "error",
},
"settings": {
"react": {
"version": "detect"
}
}
}
@gaearon why didn't this just work out of the box? |
There was just a major version release of eslint (with breaking changes), so a few dep packages are still catching up. |
Fixed in #22248 which hasn't been released yet. Keeping this open for visibility. We've had similar reports before and open issues have better visibility. |
Is there a release date for this yet? Looks like the fix was merged on 6 Sept. |
@caribou-code yeah, it's pity, but you can get the next version with the fix through your package manager: pnpm add -DW eslint-plugin-react-hooks@next |
try to install "eslint-plugin-react-hooks@next" can resolve the question. |
Running |
Looks like we're still waiting on a new release. Is there any ETA? I'm going to move to |
This works for me, thanks! |
Looks like See as well #22248 |
I'm basically running into an issue where eslint is asking me to set meta.hasSuggestions to true. When I use
"react-hooks/exhaustive-deps": "error"
. Is there something I'm doing wrong or is this a dep version thing?React version:
Steps To Reproduce
Here's my deps from package.json
If I try to remove the react-hook plugin and extension this happens:
Definition for rule 'react-hooks/exhaustive-deps' was not found
Link to code example:
The current behavior
The expected behavior
The text was updated successfully, but these errors were encountered: