bezoerb/gulp-htmlhint

Added Gulp task, nothing happens

Closed this issue · 4 comments

Hi @bezoerb .
I made a Gulp task as follows:

var htmlhint     = require('gulp-htmlhint');
gulp.task('htmlhint', function() {
  return gulp.src('build/html/*.html')
    .pipe(htmlhint());
});

But if I create a broken html in my build/html, nothing is reported.

Any idea?

@caneta sorry for the late response. I'm quite busy at the moment but i'll try to take a look in the next days

Ok, thanks!

Pipe the htmlhint() output to the reporter() and you'll see the HTML errors.

gulpfile.js

const htmlHint = require('gulp-htmlhint');

gulp.task('htmlHint', () => {
   return gulp.src('build/html/*.html')
      .pipe(htmlHint())
      .pipe(htmlHint.reporter());  //add this line to output the report
   });

Thanks @dpilafian!