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.

New CLI Option: --select-rule

See original GitHub issue

Hi guys,

We have started to introduce ESLint on a couple of fairly large code bases and the rules we have established generate thousands of errors and warnings 😃

I tend to fix on a rule by rule basis but I find it a bit cumbersome sometimes as I need to copy the rule from the eslintrc.json file, wrap it in a json-like string and paste it to the command line. e.g.:

eslint --rule '{new-cap: [2, {"capIsNewExceptions": ["Q", "Q.Promise", "$.Deferred", "jQuery.Deferred"]}] }' src/

It would be easier if I could just pick a rule from my config (or the compiled config):

eslint --select-rule new-cap

Is there a way to achieve this already? Does that seem a good idea?

Thanks

PS: I’m running the latest ESLint on the 1.x branch

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

8reactions
shangxiaocommented, Nov 15, 2016

Please note this issue is useful with the --fix option

1reaction
niedzielskicommented, Nov 16, 2016

@rapilabs, I had a similar issue and followed the advice by @platinumazure in #6333. eslint --no-eslintrc --parser-options ecmaVersion:6 --rule no-var:error --fix ., in my case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

General [Configuration (Client)] policy — CLI Settings tab
Specifies the password to access McAfee Solidcore Client CLI console. Confirm Password, Confirms the new password. Local CLI Access Configuration, Enable ...
Read more >
Command Line Interface - ESLint - Pluggable JavaScript Linter
This option allows you to specify another directory from which to load rules files. This allows you to dynamically load new rules at...
Read more >
Change Local CLI Access client task
Allow or restrict access to the CLI console on the endpoints. Option definitions. Option, Definition. Change CLI Status. Restrict — Allows only authorized ......
Read more >
Command line options - AWS Documentation
In the AWS CLI, command line options are global parameters you can use to override the default configuration settings, any corresponding profile setting, ......
Read more >
Command line interface — Snakemake 7.19.1 documentation
All command line options can be printed by calling snakemake -h . ... (e.g. new input files were added in the rule definition...
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