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.

A way to not list core rules

See original GitHub issue

Hi 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ta2edchimpcommented, Jul 29, 2016

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 😃

0reactions
sarbbottamcommented, Jul 29, 2016

A bit tight schedule, feel free to raise a PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

List of conditions includes Core conditions which do not work ...
The selection list of conditions to add to a rule includes a section named 'Other' and these conditions do not work when selected....
Read more >
Core Rules - Wahapedia
In order to play a battle of Warhammer 40,000: Kill Team, each player will need a collection of Citadel miniatures. They will also...
Read more >
Core Rules of Netiquette
Core Rules of Netiquette. Netiquette, or network etiquette, is concerned with the "proper" way to communicate in an online environment.
Read more >
CORE RULES - Warhammer Community
These rules show you how your models move, cast magic spells, shoot their missile weapons, charge into battle and fight with their close-range...
Read more >
Rules Reference — SQLFluff 1.4.5 documentation
When using GROUP BY a DISTINCT` clause should not be necessary as every non-distinct SELECT clause must be included in the GROUP BY...
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