I am getting the following eslint error after adding // eslint-disable-next-line react-hooks/exhaustive-deps in my code.
// eslint-disable-next-line react-hooks/exhaustive-deps
8:14 error Definit
Make sure you have put the rule in the rules object in your .eslintrc. Installing the plugin alone is not enough for the rules to start working
rules
.eslintrc
"react-hooks/exhaustive-deps": "warn",
and I assume you have already added react-hooks plugin into the plugins array in the .eslintrc
react-hooks
plugins