🌜
ğŸŒž
htmlhint

htmlhint

v1.1.4

The Static Code Analysis Tool for your HTML

npm install htmlhint

README


Logo HTMLHint
HTMLHint

The static code analysis tool you need for your HTML.

Travis Build Status Codecov NPM count MIT License Chat

  How To Use • Contributing • Website

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. 💪🏻 contributor

🏅 Backers

Thank you to all our backers! Become a backer.

🏅 backer

ğŸŽ– Sponsors

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

ğŸŽ– sponsor

Release Notes

1.1.4
By David Dias • Published on April 11, 2022

1.1.4 (2022-04-11)

Bug Fixes

1.1.3
By David Dias • Published on March 28, 2022

1.1.3 (2022-03-28)

Bug Fixes

1.1.2
By David Dias • Published on January 27, 2022

1.1.2 (2022-01-27)

Bug Fixes

  • ignore hidden input without label (cab2907), closes #866
1.1.1
By David Dias • Published on January 23, 2022

1.1.1 (2022-01-23)

Bug Fixes

1.1.0
By David Dias • Published on December 31, 2021

1.1.0 (2021-12-31)

Features

  • attr-lowercase: ignore camelCase SVG attributes (aa16722)
1.0.0
By David Dias • Published on November 26, 2021

1.0.0 (2021-11-26)

Features

  • set minimum support to es6 (ed5f895)
  • upgrade to Typescript 4 (472722b)

BREAKING CHANGES

  • IE11 and older browsers will no longer be supported
1.0.0-beta.1
By Shinigami • Published on June 25, 2020

1.0.0-beta.1 (2020-06-25)

BREAKING CHANGES

  • Rules have a new structure
0.16.3
By David Dias • Published on November 24, 2021

0.16.3 (2021-11-24)

Reverts

  • Revert "chore(deps-dev): upgrade strip-json-comments (#763)" (#767) (6c2f0cc), closes #763 #767
0.15.1
By David Dias • Published on June 11, 2021

0.15.1 (2021-06-11)

Bug Fixes

  • Unexpected behavior of the html lang require rule (#655) (068645e)
0.15.0
By David Dias • Published on June 10, 2021

0.15.0 (2021-06-10)

Features

General

License
MIT
Typescript Types
Tree-shakeable
Yes

Popularity

GitHub Stargazers
2,853
Community Interest
3,199
Number of Forks
368

Maintenance

Commits
11/2110/22075
Last Commit
Open Issues
28
Closed Issues
248
Open Pull Requests
11
Closed Pull Requests
407

Versions

Versions Released
11/2110/2204
Latest Version Released
Apr 11, 2022
Current Tags
latest1.1.4
beta1.0.0-beta.1

Contributors

yaniswang
yaniswang
Commits: 148
thedaviddias
thedaviddias
Commits: 55
coliff
coliff
Commits: 14
semantic-release-bot
semantic-release-bot
Commits: 12
takenspc
takenspc
Commits: 6
greenkeeper[bot]
greenkeeper[bot]
Commits: 5
waldyrious
waldyrious
Commits: 5
snyk-bot
snyk-bot
Commits: 3
nicolashenry
nicolashenry
Commits: 2
westonruter
westonruter
Commits: 2
olore
olore
Commits: 2
shootaroo
shootaroo
Commits: 2
baleyko
baleyko
Commits: 2
darcyparker
darcyparker
Commits: 2
Neo-Zhixing
Neo-Zhixing
Commits: 1