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
pass config with flag/args #692
Comments
Just to clarify: you're asking to be able to configure rules and environments by passing flags on the command line, correct? If so, do you have a format in mind? We currently have 110 rules, so we probably don't want to create an individual flag for every rule. Regarding defaults: I don't see removing those. We've tried to keep them to things that are either most problematic or most common, because there are far too many rules to force every developer to go through and manually specify everything up front. I wouldn't be opposed to having a flag that resets everything to being off, though, for those who want it. |
Yup, even if it was still json that would be ok with me, but some sugar like Things like curlies / quotes really don't make good defaults, they're not errors, but a reset would instantly make it better than the other tools |
Cool, I think the task list for this is (in increasing order of complexity):
|
Sweet thanks for considering the changes, I'll try and help today if I get some time |
FWIW, I think the flag for wiping the slate clean can just avoid loading conf/eslint.json. |
It would be nice to still enable some, just errors though, maybe eslint core can provide a few boilerplate configurations? |
Oh yeah, what I mean is that we load Also, you've said "errors" a couple times, but I'm not clear on what those |
Yeah pretty much just syntax errors and dead code, most of the "Possible Error" rules are reasonable as defaults, the rest definitely not |
Is it worth having a command line flag/s to turn sections of the rules off to simplify specification? So the sections would be those set out in the rules page
|
that would be cool too, but the granularity we were talking about earlier would definitely be helpful as well |
The categorization is for documentation purposes only right now, there was very little though put into them and they're still changing as rules get added, changed, and removed. I wouldn't want to formalize the grouping into code at this point. |
@nzakas I was feeling you were going to say that, was worth the suggestion anyway. |
Totally, never hold back with suggestions. :) |
Adds a --reset (-r) flag to the cli options that resets all default rules to be off.
Adds a --reset (-r) flag to the cli options that resets all default rules to be off.
Adds a --reset flag to the cli options that resets all default rules to be off.
Adds a --globals cli flag to define global variables. Takes a comma- separated list of variable names to define. By default, all varibles are read-only, but appending `:true` to the name will mark it as writable. Example: eslint --globals require,exports:true file.js
Adds a --globals cli flag to define global variables. Takes a comma- separated list of variable names to define. By default, all variables are read-only, but appending `:true` to the name will mark it as writable. Example: eslint --globals require,exports:true file.js
Adds a --global cli flag to define global variables. To define multiple variables, either separate them using commas, or use the flag multiple times. By default, all variables are read-only, but appending `:true` to the name will mark it as writable. Example: eslint --global require,exports:true file.js eslint --global require --global exports:true file.js
Adds a --global cli flag to define global variables. To define multiple variables, either separate them using commas, or use the flag multiple times. By default, all variables are read-only, but appending `:true` to the name will mark it as writable. Example: eslint --global require,exports:true file.js eslint --global require --global exports:true file.js
Adds a --globals cli flag to define global variables. To define multiple variables, either separate them using commas, or use the flag multiple times. By default, all variables are read-only, but appending `:true` to the name will mark it as writable. Example: eslint --globals require,exports:true file.js eslint --globals require --globals exports:true file.js
Adds a --globals cli flag to define global variables. To define multiple variables, either separate them using commas, or use the flag multiple times. By default, all variables are read-only, but appending `:true` to the name will mark it as writable. Example: eslint --globals require,exports:true file.js eslint --globals require --globals exports:true file.js
With Optionator, it is possible to add a flag called
results in:
pretty easy! |
Sweet! By extension, will |
Actually I was just thinking about that. |
if you repeat a flag, which contains an object value, (eg. of type [Object]), it will merge the objects rather than overwrite the whole thing stemming from eslint/eslint#692
As of |
We basically need to treat these the same as do the |
@visionmedia all of these are in 0.6.1 now. The |
personally I don't want to put comments in a file, or have a global config, Ideally we would just be able to do:
and specify --node or whatever directly with the executable. Looks like a bunch of non-error defaults are enabled as well :s those should definitely be removed IMO
The text was updated successfully, but these errors were encountered: