-
-
Notifications
You must be signed in to change notification settings - Fork 27k
CI variable used for both single test run and treating warnings as errors #3925
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
Comments
Can you explain more about your use case? |
Use case is trying to get CI build for PR's running successfully without first having to fix all the tslint warnings. I would understand it's good to keep the defaults as best practices and treating these warnings as errors, but I was hoping there was something extra I could configure to avoid this. If I remove/unset CI environment variable this would prevent treating the warnings as errors, but would make the test command go into watch mode and block As it is now it seems I have 2 options:
I was hoping for a 3rd options which would be middle ground which allows to keep tslint rules, but not fail the build while still having jest configured for single test run. If you think it's too risky to allow production builds to run with warnings not as errors then I'll likely go with one of options above, but I assumed someone else has come across this conflict and there would be a way to configure this. Perhaps in the .travis.yml I could do something like:
|
This sounds like you're using Assuming they haven't diverged much, this should work in the mean time:
|
Yes, I am using
Ok. Yea I think we can close this one then. I didn't realize they diverged as much in behavior. (was thinking they only swapped eslint for tslint and babel for typescript, but it seems that this package doesn't have same type of linting by default which means treating these warnings as errors is not relevant here. I will try the suggested script. |
Correct, which is the behavior you desired. 😄 (this works on |
Background:
https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration
https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#continuous-integration
Info:
I would like to be able to manage these features independently so I may have single test run in Travis but not treat warnings as errors. However, both are set to true because CI is enabled by default
Is there a way to specifically toggle one of these parameters? Perhaps a custom flag I can pass to jest test runner through npm script?
The text was updated successfully, but these errors were encountered: