NPM scripts are designed specifically for this, so exit code from 1 or 2 (nothing but 0 ) will prevent the launch of post-jobs, in the same way that it will work on your operating system.
Using the --silent flag is an option, but it can become a problem where there are other problems with the script, and you will hit your head against the wall when your builds fail without any attempt / error test.
The best thing you can do here ... is to configure your process so that it does not output an exit code with an error in situations where you do not want it. In this case ... you have some errors appearing legally based on your eslint configuration. This will cause the exit code to fail and (rightfully) prevent the next task from starting. This is really very useful when you use npm scripts because you can prevent the testing / build steps from being performed if you know there are errors.
So, in this case, you want to add the .eslintrc file to your project and specify some rules that will concern enumeration errors, as well as npm errors.
I sent a quick .eslintrc sample below. When you run eslint on the command line, it will automatically detect any .eslintrc or .eslintignore and save their configurations.
In this example below, your liter erros will be cleared, but keep in mind that it changes the exit code that will be thrown when eslint picks up this βtriggerβ. When I change the rule to 0 , it means that it will not warn you when it recognizes this pattern.
You can learn more about using and configuring rule codes or ... check out the seed project I created, which uses npm as a build tool and enables the use of eslint: react-flux-npm-automation
// /path/to/project/.eslintrc { "parser": "babel-eslint", "env":{ "browser":true, "node":true, "es6":true }, "rules": { "strict":0, "quotes":0, "no-unused-vars":0 } }