{"id":19463043,"url":"https://github.com/poppinlp/grunt-htmlhint-plus","last_synced_at":"2025-04-25T08:32:03.675Z","repository":{"id":18879641,"uuid":"22097013","full_name":"poppinlp/grunt-htmlhint-plus","owner":"poppinlp","description":"Grunt task to hint html code. Support template.","archived":false,"fork":false,"pushed_at":"2023-02-28T12:38:57.000Z","size":364,"stargazers_count":7,"open_issues_count":9,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T16:42:52.817Z","etag":null,"topics":["grunt","grunt-htmlhint","grunt-plugins","grunt-task","gruntplugin","hint","html","htmlhint"],"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/poppinlp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-07-22T08:45:54.000Z","updated_at":"2022-05-22T11:32:17.000Z","dependencies_parsed_at":"2024-06-19T03:56:15.871Z","dependency_job_id":"0f831d59-e65c-423e-b760-7cf9c4b75336","html_url":"https://github.com/poppinlp/grunt-htmlhint-plus","commit_stats":{"total_commits":46,"total_committers":10,"mean_commits":4.6,"dds":0.5217391304347826,"last_synced_commit":"542e559662fa01f9804fc490f09531fed0fc6168"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poppinlp%2Fgrunt-htmlhint-plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poppinlp%2Fgrunt-htmlhint-plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poppinlp%2Fgrunt-htmlhint-plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poppinlp%2Fgrunt-htmlhint-plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poppinlp","download_url":"https://codeload.github.com/poppinlp/grunt-htmlhint-plus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250782217,"owners_count":21486409,"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":["grunt","grunt-htmlhint","grunt-plugins","grunt-task","gruntplugin","hint","html","htmlhint"],"created_at":"2024-11-10T18:08:03.625Z","updated_at":"2025-04-25T08:32:03.412Z","avatar_url":"https://github.com/poppinlp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grunt-htmlhint-plus\n\n[![Build Status][ci-img]][ci-url]\n[![Code style][lint-img]][lint-url]\n[![NPM version][npm-ver-img]][npm-url]\n[![NPM downloads][npm-dl-img]][npm-url]\n[![NPM license][npm-lc-img]][npm-url]\n\nGrunt task to hint html code.\n\n__LOOKING FOR CONTRIBUTOR TO MAINTAIN THIS REPO!__\n\n## Getting Started\n\nThis plugin requires Grunt \u003e=0.4.0\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm i -D grunt-htmlhint-plus\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-htmlhint-plus');\n```\n\n## Htmlhintplus Task\n\n_Run this task with the `grunt htmlhintplus` command._\n\nTask targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.\n\n## Options\n\n### src {String|Array}\n\nSource path. Support file path, glob and globs.\n\n### options.rules {Object}\n\nHtmlhint rules. Default is:\n\n- \"tagname-lowercase\": true,\n- \"attr-lowercase\": true,\n- \"attr-value-double-quotes\": true,\n- \"attr-value-not-empty\": true,\n- \"attr-no-duplication\": true,\n- \"doctype-first\": true,\n- \"tag-pair\": true,\n- \"tag-self-close\": false,\n- \"spec-char-escape\": true,\n- \"id-unique\": true,\n- \"src-not-empty\": true,\n- \"head-script-disabled\": false,\n- \"img-alt-require\": true,\n- \"doctype-html5\": true,\n- \"id-class-value\": \"dash\",\n- \"style-disabled\": false,\n- \"space-tab-mixed-disabled\": true,\n- \"id-class-ad-disabled\": true,\n- \"href-abs-or-rel\": true,\n- \"attr-unsafe-chars\": true\n\nFor the whole rules list, please see [Rules page](https://github.com/yaniswang/HTMLHint/wiki/Rules).\n\n### options.htmlhintrc {String}\n\nHtmlhintrc file path. Has higher priority than `rules` option.\n\n### options.force {Boolean}\n\nThrow fatal fail or not at the end of this task, when there is hint error. Default `false`.\n\n### options.newer {Boolean}\n\nOnly hint changed file and new file. Default `true`.\n\n### options.ignore {Object}\n\nIgnore strings between key and value from this object. Default `{}`.\n\n### options.customRules {Array}\n\nAn array of paths to custom rule files to load and use in your HTMLHinting. See [issue #47](https://github.com/yaniswang/HTMLHint/issues/47) on the [HTMLHint project](https://github.com/yaniswang/HTMLHint). For examples of how to write a custom rule.\n\n### options.extendRules {Boolean}\n\nExtend the default rules instead of only running the rules specified. Default `false`.\n\n### options.output {String|Array}\n\nA string or array of output file types for reporting. Multiple types can also be selected separating them with a pipe character (ex: `console|checkstyle|json`). Available output types include `console`, `default` (alias for console), `text`, `json`, and `checkstyle`. Default `console`.\n\n## Usage Examples\n\n### Basic\n\n```js\n// Project configuration\nhtmlhintplus: {\n\tbuild: {\n\t\toptions: {\n\t\t\trules: {\n\t\t\t\t'tag-pair': true,\n\t\t\t\t'custom-rule': true\n\t\t\t},\n\t\t\tcustomRules: [\n\t\t\t\t'rules/custom-rule.js'\n\t\t\t],\n\t\t\textendRules: true,\n\t\t\toutput: [ 'console', 'text', 'json', 'checkstyle' ]\n\t\t}\n\t\tsrc: 'path/to/file'\n\t}\n}\n```\n\n### Use htmlhintrc file\n\n```js\n// Project configuration\nhtmlhintplus: {\n\thtml: {\n\t\toptions: {\n\t\t\thtmlhintrc: 'path/to/file'\n\t\t}\n\t\tsrc: [\n\t\t\t'path/to/file',\n\t\t\t'path/to/file2'\n\t\t]\n\t}\n}\n```\n\n### Use global options\n\n```js\n// Project configuration\nhtmlhintplus: {\n\toptions: {\n\t\thtmlhintrc: 'path/to/file',\n\t\tnewer: true\n\t},\n\tbuild: {\n\t\toptions: {\n\t\t\tforce: false\n\t\t},\n\t\tsrc: [\n\t\t\t'path/1/*.html',\n\t\t\t'path/2/**/*.html'\n\t\t]\n\t}\n}\n```\n\n## Demo\n\nRun the test demo:\n\n```shell\ngrunt test\n```\n\n[ci-img]:https://img.shields.io/travis/poppinlp/grunt-htmlhint-plus.svg?style=flat-square\n[ci-url]:https://travis-ci.org/poppinlp/grunt-htmlhint-plus\n\n[lint-img]:https://img.shields.io/badge/code%20style-handsome-brightgreen.svg?style=flat-square\n[lint-url]:https://github.com/poppinlp/eslint-config-handsome\n\n[npm-ver-img]:https://img.shields.io/npm/v/grunt-htmlhint-plus.svg?style=flat-square\n[npm-dl-img]:https://img.shields.io/npm/dm/grunt-htmlhint-plus.svg?style=flat-square\n\n[npm-lc-img]:https://img.shields.io/npm/l/grunt-htmlhint-plus.svg?style=flat-square\n[npm-url]:https://www.npmjs.com/package/grunt-htmlhint-plus\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoppinlp%2Fgrunt-htmlhint-plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoppinlp%2Fgrunt-htmlhint-plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoppinlp%2Fgrunt-htmlhint-plus/lists"}