JavaScript-based HTML linter built on top of HTMLMinifier. Version 2.0.0 is the latest stable release. It checks HTML for common issues such as missing DOCTYPE, inline event handlers, deprecated attributes, and more. The library provides a simple lint function for programmatic use as well as a CLI. Unlike full-featured linters like HTMLHint or tidy, HTMLLint focuses on core validation rules from HTMLMinifier. It works with Node.js >=0.10.0 and has no required dependencies.
npm install html-minifier-lintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to require and use the lint function, including custom options to disable specific checks.
const result = lint(html); if (result !== '') { console.log(result); }if (typeof html !== 'string') throw new TypeError('html must be a string');Use 'html-minifier-lint --help' (no short alias).
Keep rules list from documentation or test suite.
const { lint } = require('html-minifier-lint'); instead of const lint = require('html-minifier-lint');Run 'npm install html-minifier-lint' and ensure it's in node_modules.
Add <!DOCTYPE html> to the HTML input to remove this warning.
No dependency data recorded yet.