⚙️ The static code analysis tool you need for your HTML
Clone or download
Latest commit 7bad3b0 Sep 9, 2018
Permalink
Failed to load latest commit information.
.github docs(htmlhint): move pull request template to .github Sep 3, 2018
bin fix: update the check for root htmlhintrc (#285) Sep 3, 2018
lib feat(htmlhint): add script-disabled rule (#301) Sep 4, 2018
src docs(htmlhint): add new logo and update links (#306) Sep 9, 2018
test feat(htmlhint): add script-disabled rule (#301) Sep 4, 2018
.editorconfig style(htmlhint): change from 4 spacing to 2 spacing Sep 3, 2018
.gitignore Clean README and remove unecessary files Aug 22, 2018
.jshintrc-browser fix(htmlhint): version up and jshint line break Sep 4, 2018
.jshintrc-node style(htmlhint): formatted test files (#276) Sep 3, 2018
.npmignore Add WHOUSE.md May 1, 2016
.nvmrc [#256] Add sematic-release to package.json Aug 23, 2018
.prettierignore chore(htmlhint) feature/add commitizen package, husky and prettier (#287 Sep 3, 2018
.prettierrc.json style(htmlhint): change from 4 spacing to 2 spacing Sep 3, 2018
.snyk [Snyk] Fix for 1 vulnerable dependencies (#291) Sep 3, 2018
.travis.yml refactor(htmlhint): merge branch 'develop' Sep 4, 2018
CHANGELOG.md chore(htmlhint) feature/add commitizen package, husky and prettier (#287 Sep 3, 2018
CODE_OF_CONDUCT.md refactor(htmlhint): merge branch 'develop' Sep 4, 2018
CONTRIBUTING.md Create CONTRIBUTING.md Aug 22, 2018
Gruntfile.js fix(htmlhint): version up and jshint line break Sep 4, 2018
LICENSE.md style(htmlhint): fix typo on Yanis name (#293) Sep 3, 2018
README.md update link logo Sep 9, 2018
codecov.yml Add codecov.yml file and add badge Aug 23, 2018
commitizen.config.js chore(htmlhint) feature/add commitizen package, husky and prettier (#287 Sep 3, 2018
commitlint.config.js chore(htmlhint) feature/add commitizen package, husky and prettier (#287 Sep 3, 2018
index.js support coveralls Oct 6, 2015
package-lock.json feat(htmlhint): add script-disabled rule (#301) Sep 4, 2018
package.json chore(package): update grunt-contrib-uglify to version 4.0.0 (#300) Sep 4, 2018
parser-preset.js chore(htmlhint) feature/add commitizen package, husky and prettier (#287 Sep 3, 2018

README.md


Logo HTMLHint
HTMLHint

The static code analysis tool you need for your HTML.

Travis Build Status Codecov NPM count MIT Licence Chat Chat

  How To UseContributingRoadmapWebsite

Table of Contents

📟 Installation and Usage

Prerequisites: Node.js (>=6.14), npm version 3+.

There are two ways to install HTMLHint: globally and locally.

Local Installation and Usage

In case you want to include HTMLHint as part of your project, you can install it locally using NPM:

$ npm install htmlhint --save-dev

After that, You can run HTMLHint on any file or directory like this:

$ ./node_modules/.bin/htmlhint www/index.html
$ ./node_modules/.bin/htmlhint www/**/*.html

Global Installation and Usage

If you want to make HTMLHint available to tools that run across all of your projects, you can instal HTMLHint globally using NPM:

$ npm install htmlhint -g

After that, you can run HTMLHint on any file like this:

$ htmlhint www/index.html
$ htmlhint www/**/*.html

You can even launch HTMLHint to analyse an URL:

$ htmlhint https://htmlhint.io/

📃 Example output

🔧 Configuration

Search .htmlhintrc file in current directory and all parent directories:

$ htmlhint
$ htmlhint test.html

Custom config file:

$ htmlhint --config htmlhint.conf test.html

Custom rules:

$ htmlhint --rules tag-pair,id-class-value=underline index.html

Inline rules in test.html:

<!--htmlhint tag-pair,id-class-value:underline -->
<html>
<head>
...

📙 Docs

  1. How to use
  2. All Rules
  3. How to Develop

© License

MIT License

💪🏻 Contributors

This project exists thanks to all these people. Contribute.

🏅 Backers

Thank you to all our backers! Become a backer.

🎖 Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. Become a sponsor.