Reputation: 3
I can't seem to get my eslint to work.
I have the eslint extenstion on vscode. I created a new node project and npm installed eslint as a dev dependency. I chose the Air-BNB style and then went to check if it worked. Whenever I open a file I get a notification saying there is an error with eslint.
Vscode notification error message
ESlint stack trace error output
Some things I did:
I installed eslint locally.
At one point I found out that I had eslint installed globally so I removed it and stuck with the local install per project basis.
Ive disabled and enabled vscode eslint (Extension ESlint 2.1.8).
My Config File:
module.exports = {
env: {
browser: true,
commonjs: true,
es2020: true,
},
extends: [
'airbnb-base',
],
parserOptions: {
ecmaVersion: 11,
},
rules: {
},
};
Here are my dev dependencies:
"devDependencies": {
"eslint": "^7.7.0",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-require": "0.0.1"
}
Upvotes: 0
Views: 5902
Reputation: 13077
The problem is right their in the error message, you have two different versions of eslint-plugin-import
in your node-modules tree. You just need to make sure you only have one version.
I expect you tried to add a newer version than the one used by CRA.
Upvotes: 1