A way to not list core rules
See original GitHub issueHi all!
I’m updating a eslint config package we use at my company (https://github.com/CoorpAcademy/eslint-plugin-coorpacademy, if you need to know. It’s a eslint-plugin rather thant eslint-config because it allows us to bring external dependencies with it), and I’m using this tool to find what rules are new and missing in my config files.
We have a core config, which configures all core ESLint rules, and I can use eslint-find-rules --unused ./config/core.js
to get the list of missing rules, works great here 👍, it even includes the missing rules in the plugins I declared in the file.
We also have multiple configs for certain cases, to activate on each project depending on the needs, mostly focused on the libraries we use, for instance mocha
and AVA
. For those plugins, I’d like to get the list of missing rules, but only for the plugins that I declared in that configuration, and not the core rules, as I have defined them in another file anyway.
When doing eslint-find-rules --plugin ./config/ava.js
, it prints all rules, but not the unused ones.
When doing eslint-find-rules --unused ./config/ava.js
, it prints all missing rules, but also the core ESLint rules.
When doing eslint-find-rules --unused --plugin ./config/ava.js
, it prints all rules, and the plugin rules twice.
Having the core rules listed causes two problems for me:
- It’s hard to find whether or not I actually have missing rules in the big blob of text
- The command exits with an error code, meaning I can’t chain commands like
eslint-find-rules --unused ./config/ava.js && eslint-find-rules --unused ./config/mocha.js && ...
In short, what I’d like to have is a mean to not list core rules. Maybe something like --no-core
?
Thanks a lot for the tool by the way 😃
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top GitHub Comments
Feel free to create a PR. It’s the same on my side considering finding the time atm.
Just report back should you start working on it 😃
A bit tight schedule, feel free to raise a PR.