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
eslint-index #1205
Comments
@wagerfield how does this work in a repo with multiple nested eslintrc files? Is there any chance your tool could be used to report when a non-top-level config override isn't needed? (ie, when if removed, additional warnings wouldn't appear) |
@ljharb right now
If I understand correctly, you would like an interface for flagging when override rules within nested Example:
Implementing an interface for this is certainly possible, though it would be helpful to know how you might want to use such a feature and what effect it would have on the rest of the tool. One option would be to specify a project directory rather than a specific
Alternatively a more manual approach (that could work in conjunction with the above) would allow for a number of
If I add the ability to specify both
A side effect of this would mean that the output would need to branch for each With multiple Please do let me know what your thoughts are on all this and I can go about implementing this functionality. |
I'm not looking for duplicated rule overrides - I'm looking for unnecessary ones. In other words, given s project dir, which non-top-level rule overrides could I remove without making the linter fail? |
When you refer to non-top-level rule overrides, do you mean those that are specified in This tool does not run your config[s] against your source code. All In order to achieve what you are suggesting, the tool would need to:
Is that correct? |
Correct - that's what i'm hoping for :-) Absent that, this tool might still be very useful, but I haven't yet grasped what specific problem it solves for me. |
I developed the tool to assist me in writing a config for my company (
For example, if I upgrade
|
I have created a ESLint utility module inspired by
eslint-find-rules
that I thought you might find useful foreslint-config-airbnb-base
andeslint-config-airbnb
.The module is called
eslint-index
and you can read the full documentation on npm.eslint-index
provides a great deal of functionality including:omitted
(not declared anywhere in you ESLint config file)0|off
(declared, but set to0|off
)1|warn
2|error
status
and/or theirgroup
status
is as described above (omitted|off|warn|error
)group
iseslint
for the core ESLint rules or the name of any of your plugins likereact|import|flowtype
filter
omitted
andoff
rules, output them as alist
and display the ruledoc
links alongsidefilter
eslint
rules and display the rule setting counters in atable
I wrote this plugin to aid the development of my own ESLint config settings and found it incredibly useful for keeping track of everything. I hope you find this module useful and please do let me know if you have any ideas on how to improve it.
The text was updated successfully, but these errors were encountered: