Closed loadx closed 10 years ago
Can you suppress the warning if the error is that the file is missing? Also, you should test a malformed .jshintrc file, as that's the entire motivation behind adding this.
Also, why aren't newlines being inserted between errors in the second example?
Jumped the gun on me there @paulmillr :smile:
The errors's i'll admit are a little verbose when options are bad in the jshintrc file but unless we throw
not much I think we can do about it without buffering the whole report and parsing it back out...which would be slow.
See the second line of the gist, that's a file with a bad option.. syntax error's are almost identical. I can update the gist with one if you'd prefer though?
Oh ok, I misinterpreted. Yes that's fine on the second example.
But what if it's not even valid JSON?
And I don't think we ought to be warning about a missing .jshintrc file, but I can make that tweak.
Gist updated, see the comment :)
If you for example made a jshintrc file that was an array not an object it's a very similar error. The parser will just die on the first character it doesn't like.
Cool. Looks good. Thanks for all your contributions on this @loadx. You too @jas.
All good man, I appreciate all the feedback from both yourself, @paulmillr and @jas. Enjoy
See thread: https://github.com/brunch/jshint-brunch/commit/fb012cc4268b8610a59e097e5bc6ca69f5556d89#commitcomment-4708675
Errors will return as such: https://gist.github.com/loadx/7667431