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

Configuration for rule "no-labels" is invalid #23

Closed
unindented opened this issue Feb 6, 2016 · 16 comments
Closed

Configuration for rule "no-labels" is invalid #23

unindented opened this issue Feb 6, 2016 · 16 comments

Comments

@unindented
Copy link

eslint version: 1.10.3
eslint-config-standard version: 5.0.0
eslint-plugin-promise version: 1.0.8
eslint-plugin-standard version: 1.3.1

Full error:

Error: standard:
    Configuration for rule "no-labels" is invalid:
    Value "2,[object Object]" has more items than allowed.

Referenced from: /private/tmp/immutable-redux/.eslintrc
    at validateRuleOptions (/private/tmp/immutable-redux/node_modules/eslint/lib/config/config-validator.js:102:15)
    at /private/tmp/immutable-redux/node_modules/eslint/lib/config/config-validator.js:148:13
    at Array.forEach (native)
    at Object.validate (/private/tmp/immutable-redux/node_modules/eslint/lib/config/config-validator.js:147:35)
    at load (/private/tmp/immutable-redux/node_modules/eslint/lib/config/config-file.js:390:19)
    at /private/tmp/immutable-redux/node_modules/eslint/lib/config/config-file.js:326:36
    at Array.reduceRight (native)
    at applyExtends (/private/tmp/immutable-redux/node_modules/eslint/lib/config/config-file.js:309:28)
    at Object.load (/private/tmp/immutable-redux/node_modules/eslint/lib/config/config-file.js:395:22)
    at loadConfig (/private/tmp/immutable-redux/node_modules/eslint/lib/config.js:74:33)

Wasn't seeing this issue with eslint-config-standard 4.x.x...

@oliverturner
Copy link

PR submitted

@zmarty
Copy link

zmarty commented Feb 6, 2016

+1 (sorry that Github does not have a simple +1 button)

@feross
Copy link
Member

feross commented Feb 7, 2016

eslint-config-standard v5.0.0 is designed for use with eslint v2.0.0, which is due to be released soon.

Try updating eslint: npm install eslint@2.0.0-rc.0.

The release candidate (RC) version of eslint v2.0.0 is quite stable and already ready for use, IMO. But if you're conservative, I'd wait until the stable v2.0.0 release before upgrading to eslint-config-standard v5.0.0.

@im-martijn
Copy link

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,[object Object]" has more items than allowed.
error is thrown at line 332 of eslint/lib/config/config/config-file.js

@knownasilya
Copy link

Same here, with node 5.6 but not with 4.2

https://travis-ci.org/Strider-CD/core/jobs/109235175

@zmarty
Copy link

zmarty commented Feb 15, 2016

Please re-open this issue.

@feross
Copy link
Member

feross commented Feb 18, 2016

@knownasilya It looks like your issue is caused by using an old version of snazzy. You're using 2.x instead of 3.0.0.

@zmarty This configuration works fine with eslint 2.x. Your issue is due to eslint 1.x getting used somehow. Try updating snazzy if you use that.

@knownasilya
Copy link

@feross yes, thanks I saw your comment in the other repo and that solved my issue. Although still having that issue with Node 5.6 and the react error with snazzy.

@feross
Copy link
Member

feross commented Feb 18, 2016

@knownasilya this issue? standard/snazzy#8 let's discuss over there.

@im-martijn
Copy link

Like I said, I have the issue with 2.0.0. And 5.10. Any ideas on that?
Op 18 feb. 2016 22:37 schreef "Feross Aboukhadijeh" <
notifications@github.com>:

@knownasilya https://github.com/knownasilya this issue? standard/snazzy#8
standard/snazzy#8 let's discuss over there.


Reply to this email directly or view it on GitHub
#23 (comment)
.

@feross
Copy link
Member

feross commented Feb 18, 2016

@im-martijn Can you run npm ls --depth=50 and paste what you get here?

I bet you'll find eslint 1.x somewhere in the tree.

@im-martijn
Copy link

Yes. I have eslint@^2.0.0 in my package.json, but also gulp-eslint@^1.1.1
and mocha-eslint@^1.0.0. These both use eslint@1.10.3. Is there something I
can do about this? Must I wait until these packages start supporting eslint@
^2.0.0?
Op 18 feb. 2016 22:43 schreef "Feross Aboukhadijeh" <
notifications@github.com>:

@im-martijn https://github.com/im-martijn Can you run npm ls --depth=50
and paste what you get here?

I bet you'll find eslint 1.x somewhere in the tree.


Reply to this email directly or view it on GitHub
#23 (comment)
.

@feross
Copy link
Member

feross commented Feb 18, 2016

@im-martijn Yeah, gulp-eslint and mocha-eslint are using eslint 1.x to read the config file which is meant for eslint 2.x.

Why don't you just depend on the older version of eslint-config-standard? Putting in ^4.0.0 would work.

@feross
Copy link
Member

feross commented Feb 18, 2016

@im-martijn See standard/snazzy#8 (comment). That might also be the cause of your issue, if you're using snazzy.

@chibicode
Copy link

I had the exact same issue with Atom editor:

screenshot 2016-06-14 at 12 48 11 am

Turns out that the issue was that I was using global eslint installation, which was on 1.x. I fixed it by going to linter-eslint's setting and set it to use local eslint installation:

image

@feross
Copy link
Member

feross commented Jul 15, 2016

@chibicode Thanks for sharing that info. Should help future folks coming in from Google :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

7 participants