A Metalsmith plugin to lint HTML for syntax and semantics using linthtml/htmllint. Current stable version is 2.0.13, compatible with Metalsmith ^2.5.0 and Node >=20.18.1. It catches HTML violations during the build process, stopping the build on errors. Default rules ban deprecated attributes and tags, with options for custom lint config, ignored tags, and parallelism. Supports both ESM and TypeScript.
npm install metalsmith-html-linterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage of metalsmith-html-linter plugin with custom linthtml options, ignoring tags, and parallelism.
Update Node to >=20.18.1 and use ESM imports exclusively.
Override default rules in the `linthtml` option to suit your project's standards.
Use `linthtml` option instead of `htmllint`.
Adjust `ignoreTags` if you want linting inside those elements.
Use ESM imports (import linter from 'metalsmith-html-linter').
Use import linter from 'metalsmith-html-linter' (no braces).
Fix HTML errors or adjust linthtml options to be less strict.