I have installed eslint globally using npm and I have added my own .eslintrc file which contains following code:
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"indent": [
"error",
"tab"
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
}
I have added following dev dependencies:
"eslint": "3.19.0",
"eslint-config-standard": "10.2.1",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-markdown": "1.0.0-beta.6",
"eslint-plugin-node": "5.1.1",
"eslint-plugin-promise": "3.5.0",
"eslint-plugin-standard": "3.0.1"
and also installed eslint-plugin-react
in my react native project.
Still no indentation, semi colon, double quotes errors are shown, although parsing errors are shown.
P.S. eslint plugin is enabled in VScode.
Exact same thing happened to me. And I found out the cause of this issue by looking at the Eslint log:
Ctrl + Shift + P
Eslint: Show Output Channel
In my case, the output channel displayed this:
Failed to load config "airbnb-base" to extend from. Referenced from: ...eslintrc.js
I just forgot to do npm install
after adding the dev dependencies!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With