Gulp plugin for htmllint
npm install gulp-html-lint-wrapper


This is a gulp plugin for HTMLLint.
Its interface was created to be similar to gulp-eslint.
``sh`
npm install --save gulp-html-lint
`js
var gulp = require('gulp'),
htmlLint = require('gulp-html-lint');
gulp.task('html', function() {
return gulp.src('site/*/.html')
.pipe(htmlLint())
.pipe(htmlLint.format())
.pipe(htmlLint.failOnError());
});
`
- htmlLint([opts]) - Adds htmlLint property to every file in a stream that is incorrect. Handles options.failOnError
- 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. 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.
- htmllintrc - (String, default: ".htmllintrc") htmllintrc configuration file.true
- useHtmllintrc - (Boolean, default: ) if false does not load htmllintrc configuration file.{}
- rules - (Object, default: ) Additional htmllint rules.[]
- plugins - ([String], default: ) List of htmllint plugins.Number.MAX_VALUE
- limitFiles - (Number, default: ) Stops linter after defined number of invalid files.Number.MAX_VALUE
- limitIssuesPerFile - (Number, default: ) Stops linter after defined number of linter issues in one file.Number.MAX_VALUE
- limitIssues - (Number, default: ) Stops linter after defined number of linter issues.
Default opts values:
`jsNumber.MAX_VALUE
{
htmllintrc: ".htmllintrc",
useHtmllintrc: true,
rules: {},
plugins: [],
limitFiles: ,Number.MAX_VALUE
limitIssuesPerFile: ,Number.MAX_VALUE
limitIssues: ,`
}
- gulp lint - runs code checkstylegulp test
- - runs testsgulp test --file test/loader.js
- - runs single test file ./test/loader.jsgulp
- - alias for gulp lint testgulp test-cov
- - runs instrumented tests, generates reports to ./build/testgulp test-cov --file test/loader.js
- - runs single instrumented test file ./test/loader.jsgulp clean
- - removes ./build foldergulp ci
- - alias for gulp clean lint test-cov
- npm test - alias for gulp testnpm run ci
- - alias for gulp ci`
MIT © Paweł Mendelski