-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
CRA v4 build with CI=true fails when eslint warnings are present #10062
Comments
this behavior is pre v4 |
@9jaboy checking... It looks like you are correct. There is also this discussion from years ago on the topic #3657 We are definitely seeing builds break after upgrade to v4 that passed on v3.4.1 but it could be something different on our end. |
@gone-skiing The linting rules changed with 4.0 and that is likely the source of new warnings that will fail a CI build. We noticed a few in our apps for the new rule See the breaking changes section in the release notes: https://github.com/facebook/create-react-app/releases/tag/v4.0.0 |
Hola, This #9887 seems to be related to this issue. |
This has been the behavior of our lint warnings for a few years now. You may just be noticing that we respect your eslint configuration now which is new in 4.0 |
@ianschmitz gotcha, that makes sense - we were trying to figure out what changed. |
@ianmcnally This issue is still present in 4.0.1 - respecting our eslint configuration or not does not change the fact that it fails on warnings... |
any update? |
Describe the bug
After upgrade to v4 of react scripts our CI builds fail due to eslint warnings. In versions 3.x same build passed.
This is problematic for large codebases where there are many pre-existing warnings and we still want to flag them in builds and IDEs to allow engineers to clean them up gradually without blowing up CI builds. We do not want to turn off the rules because the new code they keep us from creating more tech debt. For pre-existing code, it is not feasible to fix all warnings before upgrade to v4.
Steps to reproduce
This is a freshly created app with create-react-app, with single line change to introduce unused variable to simulate eslint warning.
npm i
npm run build
= PASSES (good)npm run build-with-ci
= FAILS (bad)The only difference here is CI=true added to the build script.
Expected behavior
It is expected that the build will pass with warnings.
Actual behavior
Build fails which blocks the rest of our pipeline.
The text was updated successfully, but these errors were encountered: