title: Silencing errors on failures for npm run-script
body: <p>When you run <code>npm test</code> and it fails, you get the test outputs + a single error message, like so:</p>
  
  <pre><code>npm ERR! Test failed.  See above for more details.
  </code></pre>
  
  <p>However, I made a custom script called <code>lint</code>, like so:</p>
  
  <pre><code>// package.json
  {
    // ...
    "scripts": {
      // ... definition for test ...
      "lint": "./node_modules/jsxhint/cli.js src/",
    }
  }
  </code></pre>
  
  <p>Alright, simple enough. But when you run <code>npm run lint</code> and it fails, Rather than the nice looking error for <code>npm test</code>, you get a massive error message after the output of the linter:</p>
  
  <pre><code>npm ERR! Darwin 14.0.0
  npm ERR! argv "node" "/usr/local/bin/npm" "run-script" "lint"
  npm ERR! node v0.10.32
  npm ERR! npm  v2.1.7
  npm ERR! code ELIFECYCLE
  # and ~15 more lines...
  </code></pre>
  
  <p>Is there a way to silence all this junk so I can have a clean output like the <code>npm test</code> script? I see how they caught the error in the <code>npm</code> source code, but I don't think I can just add a custom command without forking <code>npm</code> like that... Hope I'm wrong!</p>
  
  <p>But if I am, would I be better off just pushing off a task like this to a tool like Grunt? Thanks!</p>