htmlhint
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/htmlhint package

1.1.4 • Public • Published


Logo HTMLHint
HTMLHint

The static code analysis tool you need for your HTML.

Travis Build Status Codecov NPM count MIT License 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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.447,596latest
1.0.0-beta.10beta

Version History

VersionDownloads (Last 7 Days)Published
1.1.447,596
1.1.33,029
1.1.2122
1.1.11
1.1.026
1.0.085
0.16.3949
0.16.24
0.16.12
0.16.01
0.15.21,432
0.15.1132
0.15.00
0.14.24,976
0.14.1644
1.0.0-beta.10
0.15.0-beta.10
0.14.042
0.13.1250
0.13.1-beta.20
0.13.1-beta.10
0.13.05
0.12.25
0.12.11
0.12.00
0.11.05,183
0.10.32,444
0.10.21
0.10.1188
0.10.02
0.9.134,949
0.9.121
0.9.110
0.9.100
0.9.919
0.9.80
0.9.70
0.9.613
0.9.50

Package Sidebar

Install

npm i htmlhint

Homepage

htmlhint.com

Weekly Downloads

72,102

Version

1.1.4

License

MIT

Unpacked Size

314 kB

Total Files

56

Last publish

Collaborators

  • thedaviddias