codeclimate/codeclimate-eslint

Environment key "es2021" is unknown

Opened this issue · 2 comments

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

To try and resolve added .codeclimate.yml with the below

version: "2"         # required to adjust maintainability checks
plugins:
  eslint:
    enabled: true
    channel: eslint-8

I think it needs to be bumped to eslint v8.9.0