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
Allow result override #3229
Comments
This functionality goes beyond typical expectations for "reporting", so I don't I can appreciate the desire, but I'd like to see a bit more interest from In the mean time, you can use JSHint to do what you're looking for today. |
Thanks for looking into this @jugglinmike -- agreed 100%! Using a dedicated API is definitely the right way to implement this. Let's see if others would also find this useful. |
My pleasure! Also: I'd like to rescind my recommendation to parse the output of JSHint's |
Currently there is no way to limit linting to only parts of code. This would be really helpful for legacy projects where coding standards are implemented in chunks instead of rewriting the whole files.
A simple solution is to allow the reporter to override the
results
array:jshint/src/cli.js
Line 673 in badc7a4
For example, a custom reporter could use the git diff range for the currently staged changes and use that to remove all JSHint errors that don't apply to that changeset.
The text was updated successfully, but these errors were encountered: