Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Allow files with .json extension #91

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

stefounet commented Mar 13, 2012

Allow files with .json extension to be collected and analyzed.
Just modified a regex and tests.

Contributor

brentlintner commented Mar 14, 2012

Does JSHint support JSON (officially)? If this is so, I think this would be best as a CLI option because json is a subset of JavaScript and (I, for one) would not expect them to be picked up by default. I was thinking an option like --with-json, but perhaps a more ideal option would be a --extra-ext option that takes in a list of extensions to search for. Thoughts?

I also noticed there is JSONLint out there (and on NPM)... http://search.npmjs.org/#/jsonlint

Contributor

stefounet commented Mar 15, 2012

Yep, JSHint support JSON : from http://www.jshint.com/about/, "The
source can be JavaScript or JSON."
I don't think it needs an extra CLI option as most json files have the
.json ext. This should stay simple.
However, if you want me to add this option, i can do it.

Thanx for the jsonlint link, i will try it.

On 14 mars 2012, at 18:42, Brent Lintner
reply@reply.github.com
wrote:

Does JSHint support JSON (officially)? If this is so, I think this would be best as a CLI option because json is a subset of JavaScript and (I, for one) would not expect them to be picked up by default. I was thinking an option like --with-json, but perhaps a more ideal option would be a --extra-ext option that takes in a list of extensions to search for. Thoughts?

I also noticed there is JSONLint out there (and on NPM)... http://search.npmjs.org/#/jsonlint


Reply to this email directly or view it on GitHub:
#91 (comment)

Contributor

brentlintner commented Mar 15, 2012

Cool. I did not know that. :-)

I still think it should be it's own CLI option, because while it's supported, it's still a different type of file, and a user who does not want to check .json files (by default) should not have to use a CLI option to turn that off (IMO).

I reason I think (as an example) --extra-ext .json (or some other wording) is the best solution, is because it would allow the user to (ideally) specify multiple types of file extension(s) to run JSHint on, instead of adding a specific option like --check-json (or some other wording) that sticks around. FWIW, I figure --extra-ext could also take a comma delimited string (Ex: --extra-ext .json,.html).

Contributor

stefounet commented Mar 16, 2012

ok, let's go with --extra-ext !
i'll send a pull request asap

On Thu, Mar 15, 2012 at 4:56 PM, Brent Lintner <
reply@reply.github.com

wrote:

Cool. I did not know that. :-)

I still think it should be it's own CLI option, because while it's
supported, it's still a different type of file, and a user who does not
want to check .json files (by default) should not have to use a CLI option
to turn that off (IMO).

I reason I think (as an example) --extra-ext .json (or some other
wording) is the best solution, is because it would allow the user to
(ideally) specify multiple types of file extension(s) to run JSHint on,
instead of adding a specific option like --check-json (or some other
wording) that sticks around. FWIW, I figure --extra-ext could also take a
comma delimited string (Ex: --extra-ext .json,.html).


Reply to this email directly or view it on GitHub:
#91 (comment)

Contributor

brentlintner commented Mar 16, 2012

That would be epic! (thanks!!)

PS, I wonder if there is a better option name than --extra-ext... hmmm.

Contributor

brentlintner commented Mar 23, 2012

PS, mind squashing the first commit into the second? If not, I can. Thanks!

Contributor

stefounet commented Mar 23, 2012

I tried to squash the two commits in my local repo but as i already
pushed the first one to github, bam !
So I need to delete and recreate the github remote repo and then push my
squashed commits

I'do it this evening !

Le 23/03/12 18:29, Brent Lintner a écrit :

PS, mind squashing the first commit into the second? If not, I can. Thanks!


Reply to this email directly or view it on GitHub:
#91 (comment)

Stéphane RIOS - fasterize.com - 06 30 26 44 80

Contributor

brentlintner commented Mar 26, 2012

Can't you just git push remote_name branch_name -f? It might blow away our comments, but I am ok with that. Also welcome to just open another pull request and close this, instead. :-)

Contributor

brentlintner commented Mar 27, 2012

Closing since this was re-submitted with this pull request: #96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment