question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ESLint configuration is invalid: - Unexpected top-level property "ecmaVersion".

See original GitHub issue

Tell 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:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
txusinhocommented, Oct 17, 2017

@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 👍

0reactions
diligiantcommented, Aug 13, 2017

@not-an-aardvark, I guess @jingzhou123 is still using the now deprecated eslint-config-defaults which states here:

"ecmaFeatures": {
    "modules": false
  },

which triggers the DeprecationWarning above.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found