ESLint options - overrideConfig not loading

Viewed 1132

I installed ESLint and set these settings in setting.json but EsLint does not start properly globally for VS Code.

Invalid Options: - Unknown options: envs, globals, parserOptions, rules
 - 'envs' has been removed. Please use the 'overrideConfig.env' option instead.
 - 'globals' has been removed. Please use the 'overrideConfig.globals' option instead.
 - 'parserOptions' has been removed. Please use the 'overrideConfig.parserOptions' option instead. 
 - 'rules' has been removed. Please use the 'overrideConfig.rules' option instead.

These are my settings:

"eslint.options": {
        "envs": [
            "es6",
            "browser",
            "node",
            "mocha"
        ],
        "globals": [
            "expect"
        ],
        "parserOptions": {
            "ecmaVersion": 2019,
            "sourceType": "module",
            "ecmaFeatures": {
                "jsx": true
            }
        },
        "rules": {
            "semi": "error",
            "curly": "error",
            "quotes": [
                "warn",
                "single"
            ],
            "no-undef": "error"
        }
    },
1 Answers

In case you are still looking for an answer, I just had the same issue.. You need to wrap your eslint options into an overrideConfig object. In this case the aimed object in the error message overrideConfig.(...) will be provided correctly. Similar issue here

Related