question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configuration for rule "no-labels" is invalid

See original GitHub issue

Hello,

I created a new .eslintrc and copy/paste in it:

{
  "extends": "airbnb"
}

Then I’ve installed packages as specified in airbnb doc.

When I run eslint, I have the error:

D:\_PROJECTPATH_>gulp eslint
[12:37:06] Using gulpfile D:\_PROJECTPATH_\gulpfile.js
[12:37:06] Starting 'eslint'...
D:\_PROJECTPATH_\node_modules\gulp-eslint\node_modules\eslint\lib\config\config-file.js:332
            throw e;
                  ^
Error: D:\_PROJECTPATH_\node_modules\eslint-config-airbnb\rules\best-practices.js:
        Configuration for rule "no-labels" is invalid:
        Value "2,[object Object]" has more items than allowed.

Referenced from: D:\_PROJECTPATH_\node_modules\eslint-config-airbnb\legacy.js
Referenced from: D:\_PROJECTPATH_\node_modules\eslint-config-airbnb\base.js
Referenced from: airbnb
Referenced from: D:\_PROJECTPATH_\.eslintrc
    at validateRuleOptions (D:\_PROJECTPATH_\node_modules\gulp-eslint\node_modules\eslint\lib\config\config-validator.js:102:15)
    at D:\_PROJECTPATH_\node_modules\gulp-eslint\node_modules\eslint\lib\config\config-validator.js:148:13
    at Array.forEach (native)
    at Object.validate (D:\_PROJECTPATH_\node_modules\gulp-eslint\node_modules\eslint\lib\config\config-validator.js:147:35)
    at load (D:\_PROJECTPATH_\node_modules\gulp-eslint\node_modules\eslint\lib\config\config-file.js:390:19)
    at D:\_PROJECTPATH_\node_modules\gulp-eslint\node_modules\eslint\lib\config\config-file.js:326:36
    at Array.reduceRight (native)
    at applyExtends (D:\_PROJECTPATH_\node_modules\gulp-eslint\node_modules\eslint\lib\config\config-file.js:309:28)
    at load (D:\_PROJECTPATH_\node_modules\gulp-eslint\node_modules\eslint\lib\config\config-file.js:395:22)
    at D:\_PROJECTPATH_\node_modules\gulp-eslint\node_modules\eslint\lib\config\config-file.js:326:36

Someone else has the same problem here

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
andreyvolokitincommented, Apr 7, 2016

@ljharb yes, I have different versions — 2.7.0 locally, and 2.5.3 globally, but also I had gulp-eslint 1.0.0 which I updated to 2.0.0 and then error disappeared

0reactions
ljharbcommented, Apr 7, 2016

@andreyvolokitin do you have eslint 2.7.0 installed locally or globally? Does npm ls -g --depth=0 include a version of eslint that’s different than npm ls --depth=0?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration for rule "no-labels" is invalid · Issue #23 - GitHub
I use eslint 2.0.0 and eslint-config-standard 5.1.0. I still get: Error: standard: Configuration for rule "no-labels" is invalid: Value "2,[ ...
Read more >
no-labels - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
Eslint error, configuration for rule "import/no-cycle" is invalid
I changed the node_modules/eslint-config-airbnb-base/rules/imports.js "∞" to an integer to continue debugging. Next run showed this error, ...
Read more >
Setting the record straight about No Labels | The Hill
In June, No Labels released a roadmap to force through real rules reforms in the next Congress with our Speaker Project reform booklet....
Read more >
No Labels
A national movement of people who believe in America and in bringing our leaders together to solve our toughest problems.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found