I'm using the recommended Eslint rules with a lot of overrides. I assumed the recommended rules were sufficiently strict, but I found some useful rules that weren't enabled. How can I view all the rules that are available but disabled? I want to be able to read each of the rules and maybe manually enable them.
Asked
Active
Viewed 175 times
1
-
you're gonna need a list of all enabled rules and a list of all rules, then subtract enabled from all [What is the fastest or most elegant way to compute a set difference using Javascript arrays?](https://stackoverflow.com/a/36504668/12101554) – Samathingamajig Jul 20 '22 at 23:18
1 Answers
1
You can view all the rules on the ESLint Website. However, ESLint has other rules that come from plugins you might use.
To view all of these, you can use eslint-find-rules
, which can show plugin rules and other available rules.
{
...
"scripts": {
"eslint-find-option-rules": "eslint-find-rules [option] <file> [flag]"
}
...
}
The -a
flag is probably what you're looking for:
eslint-find-rules -a .eslintrc.js

Quantalabs
- 379
- 2
- 14