Proposal: Option to build without linting
See original GitHub issueIs your proposal related to a problem?
I’m always frustrated when the build command is linting my code and there is no way for me to skip the linting step. My pipeline is lint > test > build
. I want to lint before testing because my test files are also linted. With the current setup, linting happens twice.
Describe the solution you’d like
I would like to be able to opt out of linting: "build" : "react-scripts built --no-lint"
Or (even better) have linting separated from the build command so I can remove it. It would appear this way in the default setup:
"build": "react-scripts lint && react-scripts build"
The README never mentions that linting will happen within the build step, so this makes the actual process much more visible.
Describe alternatives you’ve considered
Somehow disabling linting by configuration before the build step happens.
Additional context
A related issue was auto-staled without solution: https://github.com/facebook/create-react-app/issues/7078
Issue Analytics
- State:
- Created 4 years ago
- Reactions:22
- Comments:10 (5 by maintainers)
Top GitHub Comments
There is another scenario that happens to our team quite a lot.
We have a git hook to ensure that all files committed are fine, running prettier and linters.
When we are bugfixing in the browser, sometimes we comment out pieces of code, just to have the browser throw us an error of “you are importing stuff and then not using it”. It makes quick checks way less trivial.
I’d rather have the option to avoid linting on dev build, since we know that we’re not committing offending code, plus we have the linters in our editors.
@Primajin Opting out of eslint has been added here: https://github.com/facebook/create-react-app/pull/10170 (added in v4.0.2)