I’ve got an Angular 10 project that uses eslint.
I run my linting with:
There are no errors but some warnings. I want
ng lint to fail with a non zero exit code when there are only warnings. I’ve tried using the eslint flag –max-warnings=0 as follows:
ng lint --max-warnings=0
but it says:
unknown option ‘–max-warnings’
This SO post suggests –max-warnings is an eslint CLI option only and cannot be configured via an .eslintrc file
How can I force linting to fail when there are only warnings when running
ng lint? Many thanks
--max-warnings 0 try this. The
= is not required.