Skip to content

Add opt-out for eslint-webpack-plugin#10170

Merged
iansu merged 1 commit into
masterfrom
feature/improve-eslint-handling
Feb 3, 2021
Merged

Add opt-out for eslint-webpack-plugin#10170
iansu merged 1 commit into
masterfrom
feature/improve-eslint-handling

Conversation

@mrmckeb

@mrmckeb mrmckeb commented Nov 29, 2020

Copy link
Copy Markdown
Contributor

This PR adds two new flags, documented under "Advanced Configuration".

  • ESLINT_NO_DEV_ERRORS - converts errors to warnings in development (no error overlay).
  • DISABLE_ESLINT_PLUGIN - the plugin is completely disabled. This will also bring performance benefits for some users.

It was tested with a mixture of warnings and errors, both flags were tested individually.

Resolves #9887.

@chrisahardie

Copy link
Copy Markdown

Instead of removing the plugin entirely, would it be better just to flip the switch on the failOnError option?

@eek

eek commented Dec 1, 2020

Copy link
Copy Markdown

Instead of removing the plugin entirely, would it be better just to flip the switch on the failOnError option?

I also agree to not remove the plugin altogether. The plugin also has an option emitWarning that will force to only emit warnings instead of errors, leaving the compile to succeed but still show the warnings.

@ianschmitz

Copy link
Copy Markdown
Contributor

Not a bad idea! What do you think @mrmckeb?

@silverwind

Copy link
Copy Markdown

I think generally one wants to treat errors as warnings during dev build and to treat warnings as errors during prod build (with an opt-out maybe for that one).

@mrmckeb

mrmckeb commented Dec 17, 2020

Copy link
Copy Markdown
Contributor Author

Sorry for the slow response, yes we can make this change. I'll take a look this weekend!

@mrmckeb mrmckeb force-pushed the feature/improve-eslint-handling branch from 7e2983e to ef8d5d3 Compare December 20, 2020 18:57
@mrmckeb

mrmckeb commented Dec 20, 2020

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback on this everyone, this has been adjusted and now emits warnings only when this flag is set.

@mrmckeb

mrmckeb commented Jan 6, 2021

Copy link
Copy Markdown
Contributor Author

Please see this discussion, we'd love to get more input before moving forward with this: #10344

@mrmckeb mrmckeb force-pushed the feature/improve-eslint-handling branch from ef8d5d3 to 41f8c71 Compare January 24, 2021 13:58
@mrmckeb

mrmckeb commented Jan 24, 2021

Copy link
Copy Markdown
Contributor Author

This has been updated to reflect the outcome of #10344.

@xfournet

Copy link
Copy Markdown

Thanks! Would be possible to take into account the DISABLE_ESLINT_PLUGIN variable in https://github.com/facebook/create-react-app/blob/0f6fc2bc71d78f0dcae67f3f08ce98a42fc0a57c/packages/react-scripts/scripts/utils/verifyPackageTree.js#L20 to skip the check of eslint & babel-eslint versions ?

@mrmckeb

mrmckeb commented Jan 26, 2021

Copy link
Copy Markdown
Contributor Author

That's a good call @xfournet - @iansu @ianschmitz, what do you think?

@mrmckeb

mrmckeb commented Feb 4, 2021

Copy link
Copy Markdown
Contributor Author

@xfournet, please see #10499. We'll aim for this to go out with the next release. Thanks for the suggestion!

@xfournet

xfournet commented Feb 4, 2021

Copy link
Copy Markdown

@mrmckeb thanks for taking care of that

This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After update to 4.0 lint errors are blocking the rendering

10 participants