-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Add opt-out for eslint-webpack-plugin #10170
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think adding this
emitWarning
flag had the unintended effect of hiding warnings entirely ifESLINT_NO_DEV_ERRORS
is nottrue
. I was able to confirm that the warnings correctly appear if I set that env variable but then eslint errors are downgraded to warnings. I dug around theeslint-webpack-plugin
codebase a bit and I think we might not even need to set this option since the default is true already.There was also a bug fix recently in
[email protected]
to fix an issue withemitWarning
andemitError
soreact-scripts
might also want to bump up that version requirement if this option is staying in.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read through the linked issue and I think the
failOnError
option was the one people wanted here - maybe something like this?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @DarkAce65, are you able to provide a reproduction of this?
Our error logging won't show warnings when errors are present (as far as I remember), so could that be what you mean?
I can see locally that if I have only a warning, no errors, I see that warning. If I have errors and warnings, I see only errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @mrmckeb, that's odd, it's not what I was seeing. You're right that if there's an error, no warnings show up but I'm also not seeing any warnings if there are no errors :(
There's an example in #10509 but I can try and make a reproduction repo in a few hours.
Out of curiosity, what version of
eslint-webpack-plugin
do you have locally? Also, you haveESLINT_NO_DEV_ERRORS
set to false right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update, I have
[email protected]
.If I run
npx create-react-app --info
, I see:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a bit more testing, seems like the combination of
ESLINT_NO_DEV_ERRORS
being false or unset,[email protected]
, and[email protected]
causes the missing warnings: https://github.com/DarkAce65/cra-eslint-warnings