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

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

Closed
matrunchyk opened this issue Apr 4, 2017 · 2 comments

Comments

@matrunchyk
Copy link

matrunchyk commented Apr 4, 2017

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)

@ljharb
Copy link
Collaborator

ljharb commented Apr 4, 2017

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 ljharb closed this as completed Apr 4, 2017
@matrunchyk
Copy link
Author

matrunchyk commented Apr 5, 2017

@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.

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

2 participants