codeclimate / codeclimate-eslint

Code Climate Engine for ESLint
MIT License
95 stars 93 forks source link

Upgrade eslint to v.6.8.0 in order to support new environment keys #482

Closed MDSLKTR closed 10 months ago

MDSLKTR commented 4 years ago

The following shows output from code climate where our eslintrc.js can't be used because the eslint version on the eslint 6 channel, doesn't support it.

Actual Behavior

/usr/local/node_modules/eslint/lib/shared/config-validator.js:169
            throw new Error(message);
            ^

Error: --config:
    Environment key "es2020" is unknown

    at Object.keys.forEach.id (/usr/local/node_modules/eslint/lib/shared/config-validator.js:169:19)
    at Array.forEach (<anonymous>)
    at validateEnvironment (/usr/local/node_modules/eslint/lib/shared/config-validator.js:163:30)
    at validateConfigArray (/usr/local/node_modules/eslint/lib/shared/config-validator.js:334:9)
    at CascadingConfigArrayFactory._finalizeConfigArray (/usr/local/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:392:13)
    at CascadingConfigArrayFactory.getConfigArrayForFile (/usr/local/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:248:21)
    at FileEnumerator._iterateFilesWithFile (/usr/local/node_modules/eslint/lib/cli-engine/file-enumerator.js:321:43)
    at FileEnumerator._iterateFiles (/usr/local/node_modules/eslint/lib/cli-engine/file-enumerator.js:302:25)
    at FileEnumerator.iterateFiles (/usr/local/node_modules/eslint/lib/cli-engine/file-enumerator.js:254:59)
    at iterateFiles.next (<anonymous>)

Expected Behavior

All Environment Keys should work, when selected the channel eslint-6

Steps to reproduce

Use env: { es2020: true } in your eslintrc config


simonv3 commented 4 years ago

This also affects new eslint keys like ignorePatterns. This is ultimately blocking on us using codeclimate & eslint (and honestly using codeclimate in any meaningful way).

MDSLKTR commented 4 years ago

Same same @simonv3

shadiramadan commented 3 years ago

I'm having the same issue with eslint 2021 not having been added until es 7.8.0 and this plugin is only up to 7.6.0.

https://github.com/codeclimate/codeclimate-eslint/blob/channel/eslint-7/package.json#L21

What is codeclimate's plugin update schedule?

blombard commented 2 years ago

Using eslint version 7 solved the problem for me. But indeed it would be nice to find a solution for those who can not update from v6 to v7.

plugins:
  eslint:
    enabled: true
    channel: "eslint-7"