Closed
Description
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
- Have my eslint config:
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/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"
}
}
}
Here's my deps from package.json
{
"dependecies": {
"eslint": "^8.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-react-hooks": "^4.2.0",
}
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: