-
-
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
Missing documentation for process.env.CI #7344
Comments
There is a good reason why linting rules separate warning and errors. Warnings are intended to alert the developer to take a look at something. The developer then makes a judgement call on whether there is a real issue. I don't want tooling to make that decision for me. If there is an option that can be set to treat warning as errors that could be very useful and many people might use it. However, it should be an option that is not combined with other behavioural modifications in the build. |
I see half a dozen issues with developers asking why this would be a default setting (CI=true means warnings are treated as errors). It's bizarre. These other issues are closed and locked without explanation—as I'm sure this one will be too—but instead are brushed off with a "we know best" type of answer. If my team decides that some lint violation is acceptable as a warning instead of an error, and we make that change to our config, I very much expect any CI to abide by that. Setting I appeal to @gaearon and @Timer to stop shutting this down, and either shed a light on the internal discussions y'all had surrounding this, or listen to the community. Over the years of working with CRA I've started to find this kind of cold shoulder (coldly shutting down issues and locking discussions) really off-putting. I apologize for my tone, I respect the work that's been done, and I realize you owe me nor any of us anything, but it's frustrating none-the-less. 😕
Edit: I'm commenting here because all of the directly-related issues have been locked |
The
npm run build
command is affected by the environment variableCI
, but it is not well documented.This is what the existing documentation says about it:
By looking at the source code or playing with the command, there are several side effects:
create-react-app/test/fixtures/__shared__/util/setup.js
Line 105 in 7b196fa
I believe it would be a good choice to have no undocumented side effect.
Use cases where it is a problem:
CI
option (this is a problem in intslef): I would also like to know what it does and keep the colors in the output.npm build
don't talk about the envinroment variables, neither doesnpm help build
, it is then confusing to see the behavior change between computers.Thank you for reading this.
Best,
Simon
The text was updated successfully, but these errors were encountered: