Support glob path on command line #3402
Similar to mocha cli's ability to determine which files to run as tests by looking at a glob, it would be great if eslint could accept a glob pattern on the command line.
This would be nice when you could very concisely describe the set of directories and files to include or exclude with a single glob.
In my case, I would love to be able to write:
Thanks for the issue! We get a lot of issues, so this message is automatically posted to each one to help you check that you've included all of the information we need to help you.
Reporting a bug? Please be sure to include:
Requesting a new rule? Please be sure to include:
Requesting a feature? Please be sure to include:
Including this information in your issue helps us to triage it and get you a response as quickly as possible.
Shell is limited, especially in windows.
So something simple and recursive would help bring more developers (on different platforms) on board.
We're setting up package template for all our internal modules and would like to have eslint as default linter, but it doesn't work for us now.
For example is we set
Closest option to the desired solution we have now is
So native support for recursive search is very crucial for us to adopt eslint as default linting tool.
@nzakas using shell to expand globs directly isn't really ideal. @alexindigo brings up the good point that different shells support different features, which can make writing universal scripts quite hard.
Also, expanding the glob in a shell script would result in a node process running eslint for every matched file, which I would imagine would run less efficiently that allowing eslint to determine how to lint many files.
Mocha uses node-glob to walk a filesystem and find files which identify as tests. It's a really nice usability detail of that tool. It would be awesome if eslint did the same.