-
We want to thank everyone for their feedback on the ESLint changes in Create React App v4. We want to make this experience more flexible, and wanted to gather more feedback from the community before making changes. We understand that for some users, this change meant more errors showing in our error overlay, and for others, blocking builds. To help us prioritise improvements, we'd like to hear from you. Vote with 👀 if you'd like the option to omit ESLint errors from error overlay, and/or 🚀 if you'd like the option to disable ESLint errors and warnings during builds. If you have an other thoughts, please let us know in the comments below! |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 7 replies
-
Thank you for opening up this issue and coming back to the community. Is there a philosophy why ESLint itself shouldn't be an optional feature in the build process? In addition to the recent breaking builds I've also run into trouble with ESLint and CRA before when trying to customise its rules to ones that fit the organisation I'm working with. The main reason that comes to mind is possibly the CRA team wanting to keep changes in environment as minimal as possible so the library is stable and easy to debug. |
Beta Was this translation helpful? Give feedback.
-
Thanks for creating this discussion. Indeed eslint during build is a pain in the ass. Except maybe for unexperienced developer's, it's counter productive. Our context/setup:
Adding an option to completely disable eslint handling by CRA would help us. This option would permit:
|
Beta Was this translation helpful? Give feedback.
-
It should be noted that by
it is meant that you will be able to disable the errors only for specific environments, such as I also assume that you would be able to disable just |
Beta Was this translation helpful? Give feedback.
-
I mostly use ESLint 1) in my editor, and 2) on the command-line in CI. The only time I don't mind CRA running lint for me is in a production-mode build, e.g., The rest of the time, it's not just that I don't want errors to appear -- I don't want to pay the performance cost at all. Reasons I don't want to always pay the performance cost:
(so, for my case, the current Don't get me wrong, I think the dev server integration is a cool feature, especially for the out-of-the-box experience for a new developer on a new project. It just loses its utility as the project grows, so it ought to be disable-able without hacks. |
Beta Was this translation helpful? Give feedback.
-
For our use case we'd like to suppress any warnings or errors in our production builds. |
Beta Was this translation helpful? Give feedback.
-
I would like to refer to my proposal from a few months ago, which asks for the recommended way of config integration with ESLint, TypeScript, Prettier and VS Code. It has a 65 "thumbs up", so this is maybe something you could look into. The two main questions are:
These are questions a lot of people have and it would be nice to have an "official" documentation on the CRA website. |
Beta Was this translation helpful? Give feedback.
-
Thanks for all of the valuable input here. We've decided to address both issues at once. PR #10170 has been updated to reflect this. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your work on this! When trying the new flags I ran into the issue that I must use typescript eslint dependencies in my non-typescript project in order to extend the base config: #10502 Would be great to just have to extend |
Beta Was this translation helpful? Give feedback.
-
Thanks for bringing up this discussion. Looking at the different feedbacks, I realise that I have an other concern about the ESLint experience. I'm fine with having the ESLint plugin running, as long as it doesn't hurt build performance too much, but the thing I'm very annoyed by is the fact that ESLint warnings are treated as errors on CI builds: create-react-app/packages/react-scripts/scripts/build.js Lines 190 to 203 in 3f5dea9 This is honestly completely unrealistic. Most production-ready projects live with ESLint warnings (because technical debt, because sometimes you need a temporary hack, etc...) and failing the build because of those is counterproductive. I get that we can still do |
Beta Was this translation helpful? Give feedback.
Thanks for all of the valuable input here. We've decided to address both issues at once. PR #10170 has been updated to reflect this.