Trying to install eslint into create-react-app, but get next error when running linter:
Here is my .eslintrc
config file:
{
"extends": ["airbnb", "prettier", "prettier/react"],
"plugins": ["prettier"],
"parser": "babel-eslint"
}
If install babel-eslint
manually it'll potentially produce another error based on package conflict between project and react-scripts
dependencies:
To fix this issue just reuse babel-eslint
dependency from react-scripts
, that already installed. Update your config:
{
"extends": ["airbnb", "prettier", "prettier/react"],
"plugins": ["prettier"],
"parser": "react-scripts/node_modules/babel-eslint"
}