How to use the gulp-htmlhint.failAfterError function in gulp-htmlhint

To help you get started, we’ve selected a few gulp-htmlhint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Monogatari / Monogatari / gulpfile.js View on Github external
gulp.task("lint:html", () => {
	return gulp.src("./*.html")
		.pipe(htmlhint())
		.pipe(htmlhint.reporter())
		.pipe(htmlhint.failAfterError());
});
github thecreation / gulp-starter-kit / tasks / html.js View on Github external
gulp.task('lint:html', () => {
  return gulp
    .src(`${config.html.build}/**/*.html`, {
      since: gulp.lastRun('lint:html'),
    })
    .pipe(htmlhint('.htmlhintrc'))
    .pipe(htmlhint.reporter())
    .pipe(gulpif(config.failOnError, htmlhint.failAfterError()));
});

gulp-htmlhint

A plugin for Gulp

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis