Javascript: Error (after update): Configuration for rule "no-restricted-syntax" is invalid: Value "[object Object]" is the wrong type.

Created on 4 Apr 2017  路  2Comments  路  Source: airbnb/javascript

Fails on:
eslint: 3.19.0
eslint-config-airbnb-base: 11.1.3

Works on:
eslint: 3.15.0
eslint-config-airbnb-base: 11.1.0

.eslintrc.js

When I disable airbnb-base value in extends section, the error disappears.

Error: /Users/sergii/code/project/node_modules/eslint-config-airbnb-base/rules/style.js:
Configuration for rule "no-restricted-syntax" is invalid:
Value "[object Object]" is the wrong type.

Referenced from: airbnb-base
Referenced from: /Users/sergii/code/project/.eslintrc.js

Error: /Users/sergii/code/project/node_modules/eslint-config-airbnb-base/rules/style.js:
Configuration for rule "no-restricted-syntax" is invalid:
Value "[object Object]" is the wrong type.

Referenced from: airbnb-base
Referenced from: /Users/sergii/code/project/.eslintrc.js
at validateRuleOptions (/Users/sergii/code/project/node_modules/eslint/lib/config/config-validator.js:109:15)
at Object.keys.forEach.id (/Users/sergii/code/project/node_modules/eslint/lib/config/config-validator.js:156:13)
at Array.forEach (native)
at Object.validate (/Users/sergii/code/project/node_modules/eslint/lib/config/config-validator.js:155:35)
at load (/Users/sergii/code/project/node_modules/eslint/lib/config/config-file.js:559:19)
at configExtends.reduceRight (/Users/sergii/code/project/node_modules/eslint/lib/config/config-file.js:424:36)
at Array.reduceRight (native)
at applyExtends (/Users/sergii/code/project/node_modules/eslint/lib/config/config-file.js:408:28)
at load (/Users/sergii/code/project/node_modules/eslint/lib/config/config-file.js:566:22)
at configExtends.reduceRight (/Users/sergii/code/project/node_modules/eslint/lib/config/config-file.js:424:36)
at Array.reduceRight (native)
at applyExtends (/Users/sergii/code/project/node_modules/eslint/lib/config/config-file.js:408:28)
at Object.load (/Users/sergii/code/project/node_modules/eslint/lib/config/config-file.js:566:22)
at loadConfig (/Users/sergii/code/project/node_modules/eslint/lib/config.js:63:33)
at new Config (/Users/sergii/code/project/node_modules/eslint/lib/config.js:229:42)
at CLIEngine.executeOnText (/Users/sergii/code/project/node_modules/eslint/lib/cli-engine.js:741:28)

Most helpful comment

Your eslint is out of date. If you run npm ls you will see the error.

Run the install command in the readme to properly update peer deps.

All 2 comments

Your eslint is out of date. If you run npm ls you will see the error.

Run the install command in the readme to properly update peer deps.

@ljharb Thanks, it works. In some reason yarn upgrade didn't work as expected due to confirmed bug.
But yarn upgrade-interactive resolved this issue.

If it doesn't help for others facing the issue, try:

rm -rf node_modules
rm yarn.lock
yarn install
yarn upgrade-interactive

Note: This will upgrade all your packages.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

felixsanz picture felixsanz  路  3Comments

graingert picture graingert  路  3Comments

vsemozhetbyt picture vsemozhetbyt  路  3Comments

tunnckoCore picture tunnckoCore  路  3Comments

ryankask picture ryankask  路  3Comments