Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a feature proposal. I'm well aware that inlining JavaScript into HTML files is a bad practice in so many cases, but there is a few defendable usages.
At my work, we develop widgets mainly self-contained into a single HTML file (that's what we did since day one and it works great). In order to lint the JS contained into those files, I had to fork node-jslint in order to extract the source code from the HTML. As we now want to migrate to Jshint, I did the same, and now proposing my changes to the community, as I am sure that it can be useful to someone else.
As this is my first work on jshint, feel free to comment my code and ask me to reshape it if needed.
Edit: I didn't see the ticket #510 before pull requesting, I'm sorry. But I stay on my position that this feature would be better integrated to jshint cli, in order to be compatible with all IDE / text editor jshint plugins. This is also why I don't want to have to pipe the output of a command to jshint in order to validate HTML files.