We recently updated several NPM packages and other parts of our React application, and now no-unused-vars is throwing an error rather than a warning.
One of the updates to our application was updating from babel-eslist to @babel/eslint-parser in our package.json (now have "@babel/eslint-parser": "^7.18.2"), and updating the parser in our .eslintrc accordingly.
// "parser": "babel-eslint", //
"parser": "@babel/eslint-parser",
Another potentially-relevant update is that we updated react-scripts to the latest version "react-scripts": "^5.0.1". Is it possible to have no-unused-vars return warnings again, rather than errors?
We have the following rule for no-unused-vars
"rules": {
...
"no-unused-vars": 2, // disallow declaration of variables that are not used in the code
