Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment key "es2021" is unknown #580

Open
1 task
tiny-dancer opened this issue Jul 12, 2022 · 2 comments
Open
1 task

Environment key "es2021" is unknown #580

tiny-dancer opened this issue Jul 12, 2022 · 2 comments
Assignees

Comments

@tiny-dancer
Copy link

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
@tiny-dancer
Copy link
Author

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

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

@laytong
Copy link

laytong commented Feb 10, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants