ESLint/Prettier throw errors after node upgrade

Viewed 765

I am currently using ESLint and Prettier to lint my React project. This is currently using node version 10. When running the lint command, no errors were given

I have recently upgraded to version 12 without upgrading any other package. I now get linting errors

Does ESLint/Prettier rules/errors differ based on the node version?

1 Answers

You can reinstall linters, formatters in your project with the compatible ones. First copy their name from package.json. After uninstall them with yarn or npm command. After removing all the linters, formatters in your package.json.


rm -fr node_modules/ package-lock.json

npm cache clean --force

# install the packages you have removed
npm i package1 package2 package3 --unsafe-perm

# install other dependencies 
npm i --unsafe-perm

Related