-
-
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
Option not to fail build on warnings in CI environment #2453
Comments
What warnings specifically do you want to ignore? |
We are at the early stages of development of UI, and warning that annoys us most is 'jsx-a11y/alt-text' about no alt inside img. We intentionally don't have these for now. But I would prefer just to have control over ESlint ruleset. |
@varnav you can disable eslint warnings by adding the lines suggested to you in your development console while running |
I don't run
|
You can place |
It works as workaround, but I will have to change about 40 files. It would be better to have centralized control over this. |
Unfortunately you cannot have control of this unless if you eject; being mindful of accessibility when you are creating images doesn't take very long. Is there something wrong with adding If you explicitly would like to not provide an alt, |
You probably right, but in reality it looks different. I don't write js, I'm admin and I do DevOps things. And I have chats like this: Programmers: Hey, build of our code fails in your CI! |
FWIW this has been discussed before and warnings purposely fail CI builds by default. This is good practice. Disabling this functionality is normally done by setting To clarify, setting |
This is strange, because we have 5 more different languages built in CI, and nowhere else build fails on warnings. |
If this is the case, then this is a bug. Setting
As described in Advanced Configuration, setting Make sure you're only doing this for the |
It seems that setting As a temporary work-around, you can set CI to be blank via We're happy to accept a PR that looks for the value |
I could do this |
Sure 😁 |
Um, as I said I don't write JS. ;) I was trying to fix that bug myself, but ran into problems.
BTW, this tiny bug is not the main concern for me. |
I think |
It fails the script with exception. |
You could do this to check if is defined first. If is not, it will not run the next condition and therefore no error will be thrown. |
* Fix incorrect check if CI variable is set to true Originally build would fail on warnings with any value of CI environment variable. Now it will correctly check if it's true. Discussed here: #2453 * Check for "not false" instead of "not true" After discussion we decided that this will be closer to current functionality and not break anything.
Seems like this was fixed in #2501. Closing. |
I don't really think that it's ok to close this issue, as "Option not to fail build on warnings in CI environment" still does not exist. |
I don't think we'll be adding an option for this. But we're happy to address individual warnings that "shouldn't be warnings" on a case by case basis. If you see an unnecessary warning please file an issue. |
* Fix incorrect check if CI variable is set to true Originally build would fail on warnings with any value of CI environment variable. Now it will correctly check if it's true. Discussed here: facebook#2453 * Check for "not false" instead of "not true" After discussion we decided that this will be closer to current functionality and not break anything.
* Fix incorrect check if CI variable is set to true Originally build would fail on warnings with any value of CI environment variable. Now it will correctly check if it's true. Discussed here: facebook/create-react-app#2453 * Check for "not false" instead of "not true" After discussion we decided that this will be closer to current functionality and not break anything.
This is not a preferable solution when a lot of frameworks and libraries depend on the CI variable in different ways. My build now fails because of named imports, which are not in alphabetical order. |
We do not enforce a rule about alphabetical ordering -- it sounds like you have your own rules in place. If you have an problem, please file a new issue. Thanks! |
…eate-react-app#2453" This reverts commit 32ef089.
Currently if CI environment variable is set to true, and any warnings emitted, build fails (#944). There is no way to alter this behavior other than unsetting CI envvar that may be undesirable. You cannot even customize the rule set (#808).
Please add command-line option like --no-fail-on-warnings or add any other way to make this less strict.
https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/scripts/build.js#L115
The text was updated successfully, but these errors were encountered: