I have upgraded to current gulp-eslint version 5.0.0.
When i now try to lint my code i get usual errors at the beginning of my JSX code:
127:26 error Parsing error: Unexpected token =
I assumed it's an issue with eslint by itself. So i tried to lint my code with a global installed eslint (5.9.0) and got no errors on jsx part. All other linting is identical.
My eslintrc.json
's:
{
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 6
},
"rules": {
},
"env": {
"node": true
}
}
And a folder downwards:
{
"extends": ["../.eslintrc.json", "plugin:react/recommended"],
"settings": {
"react": {
"pragma": "React",
"version": "15.0"
}
},
"plugins": ["react"],
"parserOptions": {
"ecmaVersion": 5,
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"node": false,
"browser": true
},
"globals": {
"angular": true,
"React": true,
"ReactDOM": true,
"Uint8Array": true
},
"rules": {
"jsx-quotes": [1, "prefer-single"],
"react/prop-types": 0,
"react/no-deprecated": 0
}
}
Additional info: gulp-eslint 3.x and 4.x works fine with the same configuration.
Any tips or suggestions?
Solved it after hours of searching! It seems there were old dependencies in the package-lock.json
.
I've deleted the package-lock.json
und reinstalled all packages with npm i
. Now it works as expected.