Skip to content
⚙️ The static code analysis tool you need for your HTML
JavaScript HTML CSS
Branch: develop
Clone or download

Latest commit

Latest commit 72ecbbe May 18, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github fix: github token May 18, 2020
bin chore: improve code readability (#390) May 17, 2020
docs feat: new website for htmlhint.com (#395) May 18, 2020
src chore: add lint rule one-var:never (#392) May 17, 2020
test chore: add lint rule one-var:never (#392) May 17, 2020
website feat: new website for htmlhint.com (#395) May 18, 2020
.editorconfig style(htmlhint): change from 4 spacing to 2 spacing Sep 3, 2018
.eslintrc.js chore: add lint rule one-var:never (#392) May 17, 2020
.gitignore feat: new website for htmlhint.com (#395) May 18, 2020
.nvmrc chore: release 1.2.1 (#381) May 16, 2020
.prettierignore feat: new website for htmlhint.com (#395) May 18, 2020
.prettierrc fix: add prettier and eslint (#388) May 17, 2020
CHANGELOG.md fix: add prettier and eslint (#388) May 17, 2020
CODE_OF_CONDUCT.md refactor(htmlhint): merge branch 'develop' Sep 4, 2018
CONTRIBUTING.md fix: add prettier and eslint (#388) May 17, 2020
LICENSE.md style(htmlhint): fix typo on Yanis name (#293) Sep 3, 2018
README.md Merge develop <> Master (#366) May 13, 2020
codecov.yml fix: add prettier and eslint (#388) May 17, 2020
commitizen.config.js fix: add prettier and eslint (#388) May 17, 2020
commitlint.config.js fix: add prettier and eslint (#388) May 17, 2020
package-lock.json fix: add semantic release test (#399) May 18, 2020
package.json fix: add semantic release test (#399) May 18, 2020
parser-preset.js fix: add prettier and eslint (#388) May 17, 2020
rollup.config.js fix: add prettier and eslint (#388) May 17, 2020

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 install 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.com/

📃 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.

You can’t perform that action at this time.