How to use the gulp-htmlhint.failReporter 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 dexteryy / Project-WebCube / packages / webcube / configs / gulpfile.js View on Github external
gulp.task('check:html', [], () =>
  gulp
    .src('staticweb/**/*.html', { cwd: projectPath })
    .pipe(
      gulpif(
        !process.env.WEBCUBE_DISABLE_HTMLHINT,
        htmlhint({
          // https://github.com/yaniswang/HTMLHint/wiki/Rules
          htmlhintrc: htmlhintrcPath,
        })
      )
    )
    .pipe(
      gulpif(!process.env.WEBCUBE_DISABLE_HTMLHINT, htmlhint.failReporter())
    )
);
github marvinpinto / ledger-reconciler / gulpfile.babel.js View on Github external
const analyzeHtmlContent = () => {
  return gulp
    .src(files.html)
    .pipe(htmlhint('.htmlhintrc'))
    .pipe(htmlhint.reporter('htmlhint-stylish'))
    .pipe(htmlhint.failReporter({suppress: true}));
};
github dwst / dwst / gulpfile.babel.js View on Github external
export function htmlhint() {
  return gulp.src(lintingPaths.html)
    .pipe(gulpHtmlhint('.htmlhintrc'))
    .pipe(gulpHtmlhint.failReporter());
}
github michaelnew / web-piano / gulpfile.js View on Github external
gulp.task( 'lint:htmlhint', () =>
	gulp.src( [ '*.html' ] )
	.pipe( htmlhint( '.htmlhintrc' ) )
	.pipe( htmlhint.reporter( 'htmlhint-stylish' ) )
	.pipe( htmlhint.failReporter( { suppress: true } ) )
);
github eisbehr- / angular-best-practice / build / tasks / partials.js View on Github external
pipes.scriptedPartialsProd = function() {
    return pipes.validatedPartials()
                .pipe(htmlhint.failReporter())
                .pipe(htmlmin({collapseWhitespace: true, removeComments: true}))
                .pipe(partials.compilePartialsInProd ? ngHtml2js({
                    moduleName: partials.partialsModuleName,
                    declareModule: false,
                    template: "$templateCache.put('<%= template.url %>','<%= template.escapedContent %>');"
                }) : pipes.noop())
                .pipe(partials.compilePartialsInProd ? concat("templates.min.js") : pipes.noop())
                .pipe(partials.compilePartialsInProd ? tap(function(file) {file.contents = Buffer.concat([
                    new Buffer("(function(module){" +
                               "try{module=angular.module('" + partials.partialsModuleName + "');}" + 
                               "catch(e){module=angular.module('" + partials.partialsModuleName + "', []);}" + 
                               "module.run(['$templateCache',function($templateCache){"),
                    file.contents,
                    new Buffer("}]);})();")]);
                }) : pipes.noop())
                .pipe(partials.compilePartialsInProd ? uglify() : pipes.noop())
github classeur / classeur / gulpfile.js View on Github external
gulp.task('lint-html', function () {
  var htmlhint = require('gulp-htmlhint')
  return gulp.src(htmlSrc)
    .pipe(htmlhint('.htmlhintrc'))
    .pipe(htmlhint.failReporter())
})
github palant / pfp / gulpfile.js View on Github external
gulp.task("htmlhint", function()
{
  return gulp.src(["ui/**/*.html", "web/**/*.html"])
             .pipe(htmlhint(".htmlhintrc"))
             .pipe(htmlhint.failReporter());
});
github topheman / vanilla-es6-jspm / gulp / tasks / html.js View on Github external
function generateHtmlhintTask(env) {
  var src;
  switch (env.toLowerCase()) {
    case 'test':
      src = [].concat(paths.app.html, paths.app.templates, paths.test.unit.fixtures);
      break;
    default: //(dev)
      src = [].concat(paths.app.html, paths.app.templates);
      break;
  }
  return gulp.src(src)
    .pipe(htmlhint('.htmlhintrc'))
    .pipe(htmlhint.reporter())
    .pipe(htmlhint.failReporter());
}
github b12io / orchestra / gulpfile.js View on Github external
gulp.task('htmllint', function() {
    return gulp.src(files.htmllint)
      .pipe(cache('htmllint'))
      .pipe(htmlhint('.htmlhintrc'))
      .pipe(htmlhint.reporter())
      .pipe(gulpif(argv.production, htmlhint.failReporter()));
  });

gulp-htmlhint

A plugin for Gulp

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis