{"id":25564749,"url":"https://github.com/coditorium/gulp-html-lint","last_synced_at":"2025-04-12T10:09:56.190Z","repository":{"id":57257775,"uuid":"55724893","full_name":"coditorium/gulp-html-lint","owner":"coditorium","description":null,"archived":false,"fork":false,"pushed_at":"2019-07-05T14:45:54.000Z","size":12,"stargazers_count":3,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T17:09:09.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coditorium.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-07T20:12:17.000Z","updated_at":"2020-03-06T06:33:35.000Z","dependencies_parsed_at":"2022-08-25T21:22:18.280Z","dependency_job_id":null,"html_url":"https://github.com/coditorium/gulp-html-lint","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coditorium%2Fgulp-html-lint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coditorium%2Fgulp-html-lint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coditorium%2Fgulp-html-lint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coditorium%2Fgulp-html-lint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coditorium","download_url":"https://codeload.github.com/coditorium/gulp-html-lint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248198879,"owners_count":21063628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-20T21:59:34.925Z","updated_at":"2025-04-12T10:09:56.170Z","avatar_url":"https://github.com/coditorium.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-html-lint\n\n[![Travis build status](https://travis-ci.org/coditorium/gulp-html-lint.png?branch=master)](https://travis-ci.org/coditorium/gulp-html-lint)\n[![dependencies](https://david-dm.org/coditorium/gulp-html-lint.png)](https://david-dm.org/coditorium/gulp-html-lint)\n\u003c!---\n[![Coverage Status](https://coveralls.io/repos/coditorium/gulp-html-lint/badge.svg)](https://coveralls.io/r/coditorium/gulp-html-lint)\n---\u003e\n\n[![NPM info](https://nodei.co/npm/read-config.png?downloads=true)](https://www.npmjs.com/package/read-config)\n\nThis is a gulp plugin for [HTMLLint](https://github.com/htmllint/htmllint/).\nIts interface was created to be similar to [gulp-eslint](https://github.com/adametry/gulp-eslint).\n\n## Intallation\n\n```sh\nnpm install --save gulp-html-lint\n```\n\n## Sample usage\n\n```js\nvar gulp = require('gulp'),\n\thtmlLint = require('gulp-html-lint');\n\ngulp.task('html', function() {\n    return gulp.src('site/**/*.html')\n        .pipe(htmlLint())\n        .pipe(htmlLint.format())\n        .pipe(htmlLint.failOnError());\n});\n```\n\n## API\n\n### Functions\n\n- **htmlLint([opts])** - Adds `htmlLint` property to every file in a stream that is incorrect. Handles [options](#options).\n- **htmlLint.failOnError()** - Fail when an HtmlLint error is found in HtmlLint results.\n- **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.\n- **htmlLint.format([formatter])** - Formats all HtmlLint issues using given formatter or a default one.\n- **htmlLint.formatEach([formatter])** - Format the results of each file individually.\n- **htmlLint.result(action)** - Handle each HtmlLint result as it passes through the stream.\n- **htmlLint.results(action)** - Handle all HtmlLint results at the end of the stream.\n\n### Options\n\n- **htmllintrc** - (String, default: `\".htmllintrc\"`) [htmllintrc](https://github.com/htmllint/htmllint/wiki/Options) configuration file.\n- **useHtmllintrc** - (Boolean, default: `true`) if `false` does not load htmllintrc configuration file.\n- **rules** - (Object, default: `{}`) Additional htmllint rules.\n- **plugins** - ([String], default: `[]`) List of htmllint plugins.\n- **limitFiles** - (Number, default: `Number.MAX_VALUE`) Stops linter after defined number of invalid files.\n- **limitIssuesPerFile** - (Number, default: `Number.MAX_VALUE`) Stops linter after defined number of linter issues in one file.\n- **limitIssues** - (Number, default: `Number.MAX_VALUE`) Stops linter after defined number of linter issues.\n\n\nDefault **opts** values:\n```js\n{\n    htmllintrc: \".htmllintrc\",\n    useHtmllintrc: true,\n    rules: {},\n    plugins: [],\n    limitFiles: `Number.MAX_VALUE`,\n    limitIssuesPerFile: `Number.MAX_VALUE`,\n    limitIssues: `Number.MAX_VALUE`,\n}\n```\n\n## Build process\n\n### Gulp commands\n\n- `gulp lint` - runs code checkstyle\n- `gulp test` - runs tests\n- `gulp test --file test/loader.js` - runs single test file `./test/loader.js`\n- `gulp` - alias for `gulp lint test`\n- `gulp test-cov` - runs instrumented tests, generates reports to `./build/test`\n- `gulp test-cov --file test/loader.js` - runs single instrumented test file `./test/loader.js`\n- `gulp clean` - removes `./build` folder\n- `gulp ci` - alias for `gulp clean lint test-cov`\n\n### NPM commands\n\n- `npm test` - alias for `gulp test`\n- `npm run ci` - alias for `gulp ci`\n\n## License\n\n[MIT](LICENSE) © Paweł Mendelski\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoditorium%2Fgulp-html-lint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoditorium%2Fgulp-html-lint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoditorium%2Fgulp-html-lint/lists"}