title: gulp-jshint: How to fail the build?
body: <p>I want my Gulp build to fail, if there are errors in JSHint.</p>
  
  <p>According to the <a href="https://www.npmjs.com/package/gulp-jshint">documentation of gulp-jshint</a> I can use the "fail reporter".</p>
  
  <p>However the following does not work:</p>
  
  <pre><code>gulp.task("lint", function() {
       return gulp.src(JS_SOURCES)
          .pipe(jshint())
          .pipe(jshint.reporter("jshint-stylish"))
          .pipe(jshint.reporter("fail"));
  });
  </code></pre>
  
  <p>The task above always returns with exit code 0, even when there are errors in JSHint.</p>
  
  <p>I am using gulp 3.8.10 and gulp-jshint 1.9.0.</p>
  
  <p>There are discussions in the github issues of gulp-jshint <a href="https://github.com/spenceralger/gulp-jshint/issues/10">here</a> and <a href="https://github.com/spenceralger/gulp-jshint/issues/28">here</a> ... but according those discussions I gather that above code should work with the latest versions of gulp and gulp-jshint. However it does not ...</p>
  
  <p>Has anybody figured out how to fail the build properly with gulp-jshint?</p>