jem
jem

Reputation: 21

ESLINT An error occurred while generating your JavaScript config file. How to fix?

Oops! Something went wrong! :(

ESLint: 7.3.0

Error: An error occurred while generating your JavaScript config file. A config file was still generated, but the config file itself may not follow your linting rules. Error: BaseConfig » eslint-config-airbnb-base » D:\dev_ongoing\fullstack-twitter-clone\server\node_modules\eslint-config-airbnb-base\rules\imports.js: Configuration for rule "import/no-cycle" is invalid: Value null should be integer.

at validateRuleOptions (D:\dev\_ongoing\fullstack-twitter-clone\server\node_modules\eslint\lib\shared\config-validator.js:132:19)
at D:\dev\_ongoing\fullstack-twitter-clone\server\node_modules\eslint\lib\shared\config-validator.js:187:9
at Array.forEach (<anonymous>)
at validateRules (D:\dev\_ongoing\fullstack-twitter-clone\server\node_modules\eslint\lib\shared\config-validator.js:184:30)
at validateConfigArray (D:\dev\_ongoing\fullstack-twitter-clone\server\node_modules\eslint\lib\shared\config-validator.js:312:9)
at CascadingConfigArrayFactory._finalizeConfigArray (D:\dev\_ongoing\fullstack-twitter-clone\server\node_modules\eslint\lib\cli-engine\cascading-config-array-factory.js:464:13)
at CascadingConfigArrayFactory.getConfigArrayForFile (D:\dev\_ongoing\fullstack-twitter-clone\server\node_modules\eslint\lib\cli-engine\cascading-config-array-factory.js:275:21)
at CLIEngine.executeOnText (D:\dev\_ongoing\fullstack-twitter-clone\server\node_modules\eslint\lib\cli-engine\cli-engine.js:869:47)
at writeJSConfigFile (D:\dev\_ongoing\fullstack-twitter-clone\server\node_modules\eslint\lib\init\config-file.js:92:31)
at Object.write (D:\dev\_ongoing\fullstack-twitter-clone\server\node_modules\eslint\lib\init\config-file.js:120:13)

Upvotes: 0

Views: 3391

Answers (1)

ijmorales
ijmorales

Reputation: 164

UPDATE: ESLint have pushed the version 7.3.1 that should fix your problem. ESLint merged patch

Have in mind that currently ESLint v7.3.0 won't work with eslint-airbnb-config. There's a bug being discussed in both the ESLint and Airbnb config repos, and for the moment there are no other fix rather than downgrading to ESLint v7.2.0. airbnb-eslint-config issue caused by ESLint bug

I suggest downgrading to ESLint v7.2.0 like so:

npm uninstall eslint
npm install [email protected]

And then you can use the ESLint included assistant to create a new config:

eslint --init

Upvotes: 3

Related Questions