I would like to trigger fail CI/CD gitlab job on eslint warnings.
Eslint will fail on error, but in CI/CD I would like to fail on warnings too.
How can I do it?
You can fail eslint on any warnings by adding the --max-warnings=0
flag. For example:
eslint '**/*.js' --max-warnings=0
You could use eslint-plugin-only-error
to convert all your warnings to errors
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With