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

Expose loadConfig from CLI for use from external tools #741

Closed
dpashkevich opened this issue Nov 14, 2012 · 6 comments
Closed

Expose loadConfig from CLI for use from external tools #741

dpashkevich opened this issue Nov 14, 2012 · 6 comments

Comments

@dpashkevich
Copy link

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

@mhulse
Copy link

mhulse commented Feb 15, 2013

+1 for this idea.

@doberkofler
Copy link

+1

xzyfer added a commit to xzyfer/jshint that referenced this issue Mar 22, 2013
…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.
xzyfer added a commit to xzyfer/jshint that referenced this issue Mar 22, 2013
…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.
xzyfer added a commit to xzyfer/jshint that referenced this issue Mar 25, 2013
…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.
@OliverJAsh
Copy link

+1

@Krinkle
Copy link

Krinkle commented May 30, 2013

This has been fixed in 11a3a8e and is now available in the 2.x release:

@Krinkle
Copy link

Krinkle commented May 30, 2013

Nevermind, loadConfig is still not exposed.

@valueof valueof closed this as completed in 28dae4b Jul 1, 2013
jugglinmike pushed a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014
…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.
jugglinmike pushed a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014
@FagnerMartinsBrack
Copy link

FagnerMartinsBrack commented Dec 22, 2016

... .jshintrc isn't strictly a JSON file since it may contain comments (which I think is a great idea).

Is this publicly documented somewhere? I just want to make sure using comments in my .jshintrc files won't have side-effects in the future and it will be mentioned in changelog if something is changed.

See js-cookie/js-cookie#288 (comment).

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

No branches or pull requests

6 participants