Closed
Description
My setup is CRA 3 with react-app, airbnb and prettier eslint config.
What I have is pipeline with stages that installs dependencies, build, lint, snapshot test and e2e cypress test (and deploy).
But right now, I do linting twice, because npm build only use react-app lint rules so I have to separate stage for linting.
From the discussion here I have a feeling that there is no planned support for custom eslint rules, so would it be possible to at least have option to disable linting during build?
Building takes almost 4 minutes on CI in our project so it would be nice if there were some ways to speed it up.
Activity
eladmotola commentedon May 17, 2019
Have you tried to set
CI=false
?As a command -
CI=false npm run build
alex-lechner commentedon May 21, 2019
+1
Why is linting in the production build even enabled? When I create a production build I get the error
One suggestion is to move eslint-plugin-react to production deps which I will definitely not do!
If anyone ecounters the same error with
"eslint-plugin-react": "^7.13.0"
: downgrade it to"eslint-plugin-react": "^7.11.0"
and the build process works again!heyimalex commentedon May 22, 2019
I think our eslint config is pretty minimal, no style lints all code quality, almost always a good idea to enforce. When you don't want them to fire on specific sections of code you can opt out. That's the reasoning at least.
You shouldn't need to install
eslint-plugin-react
at all because it's a dependency of react-scripts, so I'm not sure how you're getting that error.alex-lechner commentedon May 23, 2019
I have
eslint-plugin-react
in thedevDependencies
because if I remove it I get a warning by vscode:Here's the config of my
.eslintrc.json
:Do you think I can ignore this warning? I have configured vscode to automatically lint and format the code when saving.
stale commentedon Jun 22, 2019
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
stale commentedon Jun 27, 2019
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.