npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@yodasws/gulp-htmllint

v0.0.7

Published

Gulp plugin for htmllint

Downloads

4

Readme

@yodasws/gulp-htmllint

This is a gulp plugin for HTMLLint. Its interface was created to be similar to gulp-eslint.

Intallation

yarn add @yodasws/gulp-htmllint
npm install --save @yodasws/gulp-htmllint

Sample usage

var gulp = require('gulp'),
	htmlLint = require('@yodasws/gulp-htmllint');

gulp.task('html', function() {
    return gulp.src('site/**/*.html')
        .pipe(htmlLint())
        .pipe(htmlLint.format())
        .pipe(htmlLint.failOnError());
});

API

Functions

  • htmlLint([opts]) - Adds htmlLint property to every file in a stream that is incorrect. Handles options.
  • htmlLint.failOnError() - Fail when an HtmlLint error is found in HtmlLint results.
  • htmlLint.failAfterError() - Fail when the stream ends and if any HtmlLint error(s) occurred. failOnError failed immediately - did not wait for the stream to end.
  • htmlLint.format([formatter]) - Formats all HtmlLint issues using given formatter or a default one.
  • htmlLint.formatEach([formatter]) - Format the results of each file individually.
  • htmlLint.result(action) - Handle each HtmlLint result as it passes through the stream.
  • htmlLint.results(action) - Handle all HtmlLint results at the end of the stream.

Options

  • htmllintrc - (String, default: ".htmllintrc") htmllintrc configuration file.
  • useHtmllintrc - (Boolean, default: true) if false does not load htmllintrc configuration file.
  • rules - (Object, default: {}) Additional htmllint rules.
  • plugins - ([String], default: []) List of htmllint plugins.
  • limitFiles - (Number, default: Number.MAX_VALUE) Stops linter after defined number of invalid files.
  • limitIssuesPerFile - (Number, default: Number.MAX_VALUE) Stops linter after defined number of linter issues in one file.
  • limitIssues - (Number, default: Number.MAX_VALUE) Stops linter after defined number of linter issues.

Default opts values:

{
    htmllintrc: ".htmllintrc",
    useHtmllintrc: true,
    rules: {},
    plugins: [],
    limitFiles: `Number.MAX_VALUE`,
    limitIssuesPerFile: `Number.MAX_VALUE`,
    limitIssues: `Number.MAX_VALUE`,
}

Build process

Gulp commands

  • gulp lint - runs code checkstyle
  • gulp test - runs tests
  • gulp test --file test/loader.js - runs single test file ./test/loader.js
  • gulp - alias for gulp lint test
  • gulp test-cov - runs instrumented tests, generates reports to ./build/test
  • gulp test-cov --file test/loader.js - runs single instrumented test file ./test/loader.js
  • gulp clean - removes ./build folder
  • gulp ci - alias for gulp clean lint test-cov

NPM commands

  • npm test - alias for gulp test
  • npm run ci - alias for gulp ci

License

MIT © Paweł Mendelski