Skip to content
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

List lintable files? #24

Closed
mmkal opened this issue Apr 4, 2024 · 3 comments · Fixed by #22
Closed

List lintable files? #24

mmkal opened this issue Apr 4, 2024 · 3 comments · Fixed by #22

Comments

@mmkal
Copy link

mmkal commented Apr 4, 2024

Hi - not sure if this is within the scope of this library, or whether it could be if it isn't.

I have an eslint command on a fairly large project that's hanging seemingly forever. Based on past experience, this might be because eslit is trying to find all the files in some huge generated folder.

Could this tool show all the files that eslint will pick up? That way, it'd be easier to spot when we're accidentally linting unwanted paths.

I'd imagine it could be done by iterating through the configs and checking the various files globs, then running fast-glob on them?

@antfu
Copy link
Collaborator

antfu commented Apr 5, 2024

It actually already has that information:

Screenshot 2024-04-05 at 10 43 03

But only used as autocomplete at this moment - would need to think more about how we could present it in a dedicate view of different ways

@mmkal
Copy link
Author

mmkal commented Apr 5, 2024

How about another tab, next to Config and Rules, named Files. It could just list all file paths matched by any config. The searchbar could filter down based on the user's glob input, and clicking a file path could show the configs that do/don't apply to it.

It might be useful too to be able to also search for files that aren't linted, so the UI could show either "no files found" or if a file exists but isn't linted, highlight the config that told eslint to ignore it. That would help when re-exporting flat configs from another library, which has unsuitable ignores, say.

@mmkal
Copy link
Author

mmkal commented Apr 5, 2024

Wow - that was fast. Looking forward to trying it. 🚀🚀🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants