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

Latest commit

Shinigami92 test: shrink down test file (#442)
* test: create example.html

* test: test json formatter against example.html

* test: test formatters against example.html

* test: fix windows backslash checking
Latest commit d6e5861 Jun 1, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github ci: cleanup May 31, 2020
bin refactor: simplify build and rename bin to cli (#428) May 31, 2020
docs consistent formatting for rules (#404) May 19, 2020
src feat: use chalk instead of colors (#433) May 31, 2020
test test: shrink down test file (#442) Jun 1, 2020
website fix: fix url repo pkg (#413) May 25, 2020
.editorconfig style(htmlhint): change from 4 spacing to 2 spacing Sep 3, 2018
.eslintignore refactor: simplify build and rename bin to cli (#428) May 31, 2020
.eslintrc.js refactor: simplify build and rename bin to cli (#428) May 31, 2020
.gitignore refactor: simplify build and rename bin to cli (#428) May 31, 2020
.nvmrc chore: release 1.2.1 (#381) May 16, 2020
.prettierignore Merge branch 'develop' into beta May 30, 2020
.prettierrc fix: add prettier and eslint (#388) May 18, 2020
CHANGELOG.md chore(release): 0.14.0 [skip ci] May 31, 2020
CODE_OF_CONDUCT.md refactor(htmlhint): merge branch 'develop' Sep 4, 2018
CONTRIBUTING.md fix: add prettier and eslint (#388) May 18, 2020
LICENSE.md style(htmlhint): fix typo on Yanis name (#293) Sep 3, 2018
README.md docs: remove deadlink from README (#411) May 30, 2020
build-linux.sh refactor: simplify build and rename bin to cli (#428) May 31, 2020
build-windows.bat refactor: simplify build and rename bin to cli (#428) May 31, 2020
build.js chore: migrate to TypeScript (no runtime code changes) (#410) May 25, 2020
codecov.yml chore: add coverage codecov (#387) May 31, 2020
commitizen.config.js chore: migrate to TypeScript (no runtime code changes) (#410) May 25, 2020
commitlint.config.js fix: add prettier and eslint (#388) May 18, 2020
package-lock.json chore(deps-dev): bump nyc from 15.0.1 to 15.1.0 (#439) Jun 1, 2020
package.json chore(deps-dev): bump nyc from 15.0.1 to 15.1.0 (#439) Jun 1, 2020
parser-preset.js fix: add prettier and eslint (#388) May 18, 2020
rollup.config.js refactor: simplify build and rename bin to cli (#428) May 31, 2020
tsconfig.cli.json refactor: simplify build and rename bin to cli (#428) May 31, 2020
tsconfig.core.json refactor: simplify build and rename bin to cli (#428) May 31, 2020
tsconfig.json refactor: simplify build and rename bin to cli (#428) May 31, 2020
tsconfig.lint.json refactor: simplify build and rename bin to cli (#428) May 31, 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 UseContributingWebsite

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.