jscs-dev / node-jscs

:arrow_heading_up: JavaScript Code Style checker (unmaintained)
https://jscs-dev.github.io
MIT License
4.96k stars 513 forks source link

disabling rules that are set inside of a preset? #2187

Closed tconroy closed 8 years ago

tconroy commented 8 years ago

Hi, I have a .jscsrc in my project root structured like so:

{
  "preset": "airbnb"
}

I'm using this preset because most of the rules apply to me, however I wish to override a particular rule, validateIndentation.

Per the JSCS docs, there's no "disable"/false/etc. value for this rule. Since it's set in the preset, it seems there's no way for me to "unset" it.

Is there a way to override this value as set in the preset? I'd like to simply disable it.

hzoo commented 8 years ago

Hey @tconroy, there's always the ability to set null or false for any rule. It's not the doc for each individual rule since you can do it for all of them. See http://jscs.info/overview#presets

tconroy commented 8 years ago

interesting, not sure why setting false is not working for me, but setting null works.

Thanks for your help, apologies for not reading the docs at a higher level. :)

Cheers! :+1:

hzoo commented 8 years ago

false should work too (added in later, so maybe update your version)