Registry / testing / htmllint-cli

htmllint-cli

JSON →
library0.0.7jsnpmunverified

Command-line interface for htmllint, an HTML linter. Version 0.0.7 (as of last release). This package provides a CLI tool to lint HTML files against configurable rules via a .htmllintrc file. It is a thin wrapper around the htmllint library, with basic glob support and an init command. Development appears inactive (last updated long ago), and it requires Node >=4. Compared to alternatives like HTMLHint, this package has limited features and no recent updates.

npm install htmllint-cli
INSTALL
IMPORT
SIG · HTMLLINT-CLI
H
htmllint-cli
testingjavascriptv0.0.7
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default export
import htmllint from 'htmllint'
const htmllint = require('htmllint')
Use ESM import; CommonJS require may also work but ESM is preferred.

Global install, initialize config, lint a single HTML file.

npm install -g htmllint-cli cd my-project htmllint init # edit .htmllintrc as needed htmllint index.html
htmllint --version
Debug
Known issues
deprecatedhtmllint-cli is no longer actively maintained; use an alternative like HTMLHint or a more modern linter.
fix
Migrate to HTMLHint (npm install htmlhint) or other active HTML linters.
affects: <=0.0.7
breakingThe init command may overwrite existing .htmllintrc without warning.
fix
Backup existing .htmllintrc before running htmllint init.
affects: >=0.0.0
gotchaGlob patterns are expanded by the shell, not by htmllint-cli; ensure proper quoting in some environments.
fix
Use quotes for globs: htmllint "**/*.html"
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'htmllint'
Missing peer dependency htmllint; npm <7 does not auto-install peer deps.
fix
Run npm install -g htmllint-cli htmllint
SyntaxError: Unexpected token } in JSON at position ...
Invalid JSON in .htmllintrc configuration file.
fix
Validate .htmllintrc with a JSON linter or use jsonlint.
Upgrade
Version history
0.0.7latest on npm
Audit
Dependencies
htmllintrequiredCore linting engine; htmllint-cli is a CLI wrapper around it
Agent activity
8 hits · last 30 days
node
8
Resources
htmllint-cli — npm install htmllint-cli · libregistry