Skip to content
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

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

Merged
merged 1 commit into from
Feb 3, 2021
Merged

Conversation

mrmckeb
Copy link
Contributor

@mrmckeb mrmckeb commented Nov 29, 2020

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

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

@eek
Copy link

eek commented Dec 1, 2020

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
Contributor

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

@silverwind
Copy link

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
Copy link
Contributor Author

mrmckeb commented Dec 17, 2020

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
Copy link
Contributor Author

mrmckeb commented Dec 20, 2020

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

@mrmckeb
Copy link
Contributor Author

mrmckeb commented Jan 6, 2021

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
Copy link
Contributor Author

mrmckeb commented Jan 24, 2021

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

@xfournet
Copy link

Thanks! Would be possible to take into account the DISABLE_ESLINT_PLUGIN variable in

to skip the check of eslint & babel-eslint versions ?

@mrmckeb
Copy link
Contributor Author

mrmckeb commented Jan 26, 2021

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

@iansu iansu added this to the 4.0.2 milestone Feb 3, 2021
@iansu iansu merged commit b9963ab into master Feb 3, 2021
@iansu iansu deleted the feature/improve-eslint-handling branch February 3, 2021 18:45
dimadk24 added a commit to dimadk24/english-fight-ui that referenced this pull request Feb 3, 2021
dimadk24 added a commit to dimadk24/english-fight-ui that referenced this pull request Feb 4, 2021
@mrmckeb
Copy link
Contributor Author

mrmckeb commented Feb 4, 2021

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

@xfournet
Copy link

xfournet commented Feb 4, 2021

@mrmckeb thanks for taking care of that

This was referenced Mar 12, 2021
Firius0408 added a commit to leofuturer/EWOD-GUI2.0 that referenced this pull request Apr 8, 2021
Due to a change in create-react-app in v4.0, eslint errors block React
apps from building. See facebook/create-react-app#9887.
To fix this, v4.0.3 of react-scripts introduces a new flag that disables
eslint. See facebook/create-react-app#10170.
This update allows the app to be built in spite of eslint errors.
Firius0408 added a commit to leofuturer/EWOD-GUI2.0 that referenced this pull request Apr 9, 2021
Due to a change in create-react-app in v4.0, eslint errors block React
apps from building. See facebook/create-react-app#9887.
To fix this, v4.0.3 of react-scripts introduces a new flag that disables
eslint. See facebook/create-react-app#10170.
This update allows the app to be built in spite of eslint errors.
blackarctic added a commit to blackarctic/create-react-app that referenced this pull request Apr 29, 2021
* Fix noFallthroughCasesInSwitch/jsx object is not extensible (facebook#9921)

Co-authored-by: Konstantin Simeonov <[email protected]>

* Add logo license to README

* Remove trailing space in reportWebVitals.ts (facebook#10040)

* docs: add React Testing Library as a library requiring jsdom (facebook#10052)

Co-authored-by: Ian Schmitz <[email protected]>

* Increase Workbox's maximumFileSizeToCacheInBytes (facebook#10048)

* Create FUNDING.yml

* replace inquirer with prompts (facebook#10083)

- remove `react-dev-utils/inquirer` public import

* Prepare 4.0.1 release

* Prepare 4.0.1 release

* Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* chore: bump web-vital dependency version (facebook#10143)

* chore: bump typescript version (facebook#10141)

Co-authored-by: Ian Schmitz <[email protected]>

* Add TypeScript 4.x as peerDependency to react-scripts(facebook#9964)

* remove chalk from formatWebpackMessages (facebook#10198)

* Upgrade @svgr/webpack to fix build error (facebook#10213)

Co-authored-by: Ian Schmitz <[email protected]>

* Improve vendor chunk names in development (facebook#9569)

* Update postcss packages (facebook#10003)

Co-authored-by: Ian Schmitz <[email protected]>

* Recovered some integration tests (facebook#10091)

* Upgrade sass-loader (facebook#9988)

* Move ESLint cache file into node_modules (facebook#9977)

Co-authored-by: Ian Schmitz <[email protected]>

* Revert "Update postcss packages" (facebook#10216)

This reverts commit 580ed5d.

* Remove references to Node 8 (facebook#10214)

* fix(react-scripts): add missing peer dependency react and update react-refresh-webpack-plugin (facebook#9872)

* Update using-the-public-folder.md (facebook#10314)

Some library --> Some libraries

* docs: add missing override options for Jest config (facebook#9473)

* Fix CI tests (facebook#10217)

* appTsConfig immutability handling by immer (facebook#10027)

Co-authored-by: mad-jose <[email protected]>

* Add support for new BUILD_PATH advanced configuration variable (facebook#8986)

* Add opt-out for eslint-webpack-plugin (facebook#10170)

* Prepare 4.0.2 release

* Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* tests: update test case to match the description (facebook#10384)

* Bump webpack-dev-server 3.11.0 -> 3.11.1 (facebook#10312)

Resolves facebook#10084 security vulnerability in websocket-driver library version 0.5.6, imported transitively by sockjs

* Upgrade eslint-webpack-plugin to fix opt-out flag (facebook#10590)

* update immer to 8.0.1 to address vulnerability (facebook#10412)

Resolves facebook#10411

Bumps immer version to 8.0.1 to address the prototype pollution
vulnerability with the current 7.0.9 version.

* Prepare 4.0.3 release

* Update CHANGELOG

* Publish

 - [email protected]
 - [email protected]
 - [email protected]

Co-authored-by: Ryota Murakami <[email protected]>
Co-authored-by: Konstantin Simeonov <[email protected]>
Co-authored-by: Ian Sutherland <[email protected]>
Co-authored-by: sho90 <[email protected]>
Co-authored-by: Anyul Rivas <[email protected]>
Co-authored-by: Ian Schmitz <[email protected]>
Co-authored-by: Jeffrey Posnick <[email protected]>
Co-authored-by: Evan Bacon <[email protected]>
Co-authored-by: Sahil Purav <[email protected]>
Co-authored-by: Hakjoon Sim <[email protected]>
Co-authored-by: Chris Shepherd <[email protected]>
Co-authored-by: Jason Williams <[email protected]>
Co-authored-by: Jabran Rafique⚡️ <[email protected]>
Co-authored-by: John Ruble <[email protected]>
Co-authored-by: Morten N.O. Nørgaard Henriksen <[email protected]>
Co-authored-by: Sergey Makarov <[email protected]>
Co-authored-by: EhsanKhaki <[email protected]>
Co-authored-by: Kristoffer K <[email protected]>
Co-authored-by: Aviv Hadar <[email protected]>
Co-authored-by: Tobias Büschel <[email protected]>
Co-authored-by: mad-jose <[email protected]>
Co-authored-by: mad-jose <[email protected]>
Co-authored-by: Andrew Hyndman <[email protected]>
Co-authored-by: Brody McKee <[email protected]>
Co-authored-by: James George <[email protected]>
Co-authored-by: Dion Woolley <[email protected]>
Co-authored-by: Walker Clem <[email protected]>
wombleton pushed a commit to AurorNZ/create-react-app that referenced this pull request Jun 1, 2021
penguineer added a commit to penguineer/cleanURI-webui that referenced this pull request Aug 3, 2022
abhiisheek pushed a commit to abhiisheek/create-react-app that referenced this pull request May 19, 2023
abhiisheek pushed a commit to abhiisheek/create-react-app that referenced this pull request May 24, 2023
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