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 pr to resolve #743. upon thinking about the cause of this problem more i realized that the output causing the false positive was output emitted by yarn. my initial thought was to write a regex that would capture output that was yarn specific and ignore it, however this makes several assumptions about how other people may be using overcommit. i think it can be much more simple than that. the regex used to capture eslint messages here:
overcommit/lib/overcommit/hook/pre_commit/es_lint.rb
Line 33 in 6b25f5d
actually does a really good job at capturing the data needed for overcommit to output information and adding a small tweak to that rule fixes the issue at hand. eslint messages have no whitespace before a file or filepath that has a linting issue, but something like
does. if we can just simply ignore any lines that DO have whitespace before the
<file>
capture group we can presume that line is not an eslint error or warning message, but some output emitted by some other program (such as yarn).