Skip to content

Environment key "es2021" is unknown #580

Open
@tiny-dancer

Description

Bug Template

Actual Behavior

Code Climate

/usr/src/app/lib/validate_config.js:17
        throw e;
        ^

Error: /code/.eslintrc.js:
	Environment key "es2021" is unknown

    at /usr/local/node_modules/eslint/lib/config/config-validator.js:138:23
    at Array.forEach (<anonymous>)
    at validateEnvironment (/usr/local/node_modules/eslint/lib/config/config-validator.js:131:34)
    at Object.validate (/usr/local/node_modules/eslint/lib/config/config-validator.js:160:5)
    at Object.load (/usr/local/node_modules/eslint/lib/config/config-file.js:559:19)
    at loadConfig (/usr/local/node_modules/eslint/lib/config.js:63:33)
    at getLocalConfig (/usr/local/node_modules/eslint/lib/config.js:130:29)
    at Config.getConfig (/usr/local/node_modules/eslint/lib/config.js:260:26)
    at Config.getConfig (/usr/src/app/lib/eslint-patch.js:45:46)
    at CLIEngine.getConfigForFile (/usr/local/node_modules/eslint/lib/cli-engine.js:776:29)

Node.js v17.3.0

eslint config (fresh creation)

module.exports = {
  env: {
    node: true,
    commonjs: true,
    es2021: true,
  },
  extends: "eslint:recommended",
  parserOptions: {
    ecmaVersion: "latest",
  },
  rules: {},
};

Expected Behavior

Steps to reproduce

  1. Include configurations used in your:

    (1) .codeclimate.yml

    (2) config files for the oss analysis tool.

  1. If possible, use our CLI with the debug option to provide additional info, including any stderr produced by the engine. CODECLIMATE_DEBUG=1 codeclimate analyze -e eslint

Relevant links


  • 4-6 word issue title

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions