How to use gulp-htmlhint - 10 common examples

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 salesforce-ux / design-system / scripts / gulp / lint / index.js View on Github external
export const html = () =>
  gulp
    .src('.html/*.html')
    .pipe(
      htmlhint({
        // Rules documentation:
        // https://github.com/yaniswang/HTMLHint/wiki/Rules
        'alt-require': true,
        'attr-lowercase': [
          'viewBox',
          'preserveAspectRatio',
          'filterUnits',
          'gradientTransform',
          'stdDeviation',
          'autoComplete'
        ],
        'attr-no-duplication': true,
        'attr-unsafe-chars': true,
        'attr-value-double-quotes': true,
        'attr-value-not-empty': true,
        'doctype-html5': true,
github Shyam-Chen / Svelte-Starter / tools / tasks / lint.js View on Github external
gulp.task('lint-html', () => {
  return gulp.src(join(SOURCE_ROOT, '**/*.html'))
    .pipe(htmlhint('.htmlhintrc'))
    .pipe(htmlhint.reporter());
});
github bipbop / harlan / gulpfile.js View on Github external
gulp.task("build-html", function () {
        return gulp.src("src/**/*.html")
                .pipe(fileinclude({
                    prefix: "@@",
                    basepath: "@file"
                }))
                .pipe(hashsrc({
                    build_dir: "./Server/web",
                    src_path: "./src"
                }))
                .pipe(htmlhint())
                .pipe(htmlhint.reporter())
                .pipe(htmlMinifier({
                    collapseWhitespace: true,
                    removeComments: true
                }))
                .pipe(gulp.dest("Server/web"))
                .pipe(livereload());
    });
github ILIAS-eLearning / ILIAS / libs / bower / bower_components / Yamm3 / gulpfile.js View on Github external
gulp.task('templates', function() {
    return gulp.src(source.templates.app.files)
        .pipe(jade({
            pretty: true
        }))
        .on("error", handleError)
        .pipe(htmlhint())
        .pipe(htmlhint.reporter())
        .pipe(gulp.dest(build.templates.app))
        ;
});
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 knt5 / hakoniwa / gulp / task / lint.js View on Github external
gulp.task('lint:html:built', function() {
	return gulp.src(config.lint.targets.built.html)
	.pipe(plumber())
	.pipe(htmlhint())
	.pipe(htmlhint.reporter());
});
github michaelnew / web-piano / gulpfile.js View on Github external
path =>
			gulp.src( path, { dot: true } )
			.pipe( htmlhint( '.htmlhintrc' ) )
			.pipe( htmlhint.reporter( 'htmlhint-stylish' ) )
	)
github virtualidentityag / gulp-frontend-boilerplate / gulp / tasks / htmlhint.js View on Github external
gulp.task('htmlhint', function () {

	return gulp.src(config.global.dev + '/*.html')
		.pipe(cached('htmlhint'))
		.pipe(htmlhint('.htmlhintrc'))
		.pipe(htmlhint.reporter('htmlhint-stylish'));

});
github michikono / generator-angular-enterprise / generators / app / templates / gulp / lint.js View on Github external
gulp.task('lint:html', function() {
  return gulp.src(path.join(conf.paths.src, '**/**.html'))
    .pipe(htmlhint(hintOptions))
    .pipe(htmlhint.reporter());
});

gulp-htmlhint

A plugin for Gulp

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis