ESLint configuration is invalid: - Unexpected top-level property "ecmaVersion".
See original GitHub issueTell us about your environment
- ESLint Version: 4.4.1
- Node Version: 7.2.1
- npm Version: 3.10.10 What parser (default, Babel-ESLint, etc.) are you using? default Please show your full configuration: module.exports = { “env”: { “browser”: true, “commonjs”: true, “es6”: true }, “extends”: “eslint:recommended”, “parserOptions”: { “ecmaFeatures”: { “experimentalObjectRestSpread”: true, “jsx”: true }, “sourceType”: “module” }, “plugins”: [ “react” ], “rules”: { “indent”: [ “error”, 4 ], “linebreak-style”: [ “error”, “unix” ], “quotes”: [ “error”, “single” ], “semi”: [ “error”, “always” ] } };
Configuration
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
};
What did you do? Please include the actual source code causing the issue.
What did you expect to happen?
What actually happened? Please include the actual, raw output from ESLint. in VScode eslint terminal, I got: [Info - 5:15:15 PM] ESLint server is running. [Info - 5:15:15 PM] ESLint library loaded from: /Users/jz/node_modules/eslint/lib/api.js [Info - 5:16:32 PM] ESLint library loaded from: /Users/jz/workspace/pai-internal/node_modules/eslint/lib/api.js (node:41610) DeprecationWarning: [eslint] The ‘ecmaFeatures’ config file property is deprecated, and has no effect. (found in /Users/jz/workspace/pai-internal/node_modules/eslint/conf/eslint-recommended.js)
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ESLint configuration is invalid: - Unexpected top-level property ...
4.0.0: ESLint configuration is invalid: - Unexpected top-level ... The issue is that you have a top-level ecmaFeatures property in your ...
Read more >ESLint configuration in .eslintrc.js is invalid: - Unexpected top ...
The top-level rules and config apply to all the matched files according to your command line options ( --ext etc.).
Read more >eslint/eslint - Gitter
I'm getting this error: Error: ESLint configuration in .eslintrc.js is invalid: - Unexpected top-level property " ...
Read more >ESLINT Configuration Error - Visual Studio Feedback
I got an warning: internal-error (ESLint) ESLint configuration in .eslintrc is invalid: - Unexpected top-level property “overrides[1].extends”.
Read more >https://unpkg.com/@eslint/eslintrc@1.1.0/dist/esli...
@returns {void} */ function normalizeToStrings(config) { if (config.rules) ... additionalProperty; return `Unexpected top-level property ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@diligiant just wanted to confirm that I was using the eslint-config-defaults, and those are the ones triggering the error.
Thanks for the response, since it helped others afterwards 👍
@not-an-aardvark, I guess @jingzhou123 is still using the now deprecated eslint-config-defaults which states here:
which triggers the
DeprecationWarning
above.