-
Notifications
You must be signed in to change notification settings - Fork 1.7k
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Expose loadConfig
from CLI for use from external tools
#741
Comments
+1 for this idea. |
+1 |
…lity. This path adds `gather(opts)` to the cli export which the intention of allowing third parties to hook into the file resolution, including file ignore logic. `cli.gather` is only concerned with the follow opts: - cli args (files to linted) - ignores (as would be parse from .jshintignores) - extensions (as would be supplied by --extra-ext cli flag) Called these, it will return an array of file paths that should be linted.
…lity. This patch adds `gather(opts)` to the cli export with the intention of allowing third parties to hook into the file resolution, including file ignore, logic. `cli.gather` is only concerned with the following opts: - cli args (files to linted) - ignores (as would be parse from .jshintignores) - extensions (as would be supplied by --extra-ext cli flag) It would return an array of file paths that should be linted.
…lity. This patch adds `gather(opts)` to the cli export with the intention of allowing third parties to hook into the file resolution, including file ignore, logic. `cli.gather` is only concerned with the following opts: - cli args (files to linted) - ignores (as would be parse from .jshintignores) - extensions (as would be supplied by --extra-ext cli flag) It would return an array of file paths that should be linted.
+1 |
This has been fixed in 11a3a8e and is now available in the 2.x release: |
Nevermind, |
…lity. This patch adds `gather(opts)` to the cli export with the intention of allowing third parties to hook into the file resolution, including file ignore, logic. `cli.gather` is only concerned with the following opts: - cli args (files to linted) - ignores (as would be parse from .jshintignores) - extensions (as would be supplied by --extra-ext cli flag) It would return an array of file paths that should be linted.
Is this publicly documented somewhere? I just want to make sure using comments in my |
Currently only the CLI version of JSHint loads the
.jshintrc
file.It would be nice if the config file would still be respected when jshint is used from tools like Grunt.
If
loadConfig
function was exposed, that would be possible.And I can't just use
grunt.file.readJSON()
because .jshintrc
isn't strictly a JSON file since it may contain comments (which I think is a great idea).Please see related discussion here: gruntjs/grunt-contrib-jshint#2
The text was updated successfully, but these errors were encountered: