Registry / testing / stylelint-html-formatter

stylelint-html-formatter

JSON →
library1.0.0jsnpmunverified

Output HTML reports of stylelint results. Current stable version is 1.0.0. This package provides a custom formatter for stylelint that generates an HTML report from linting results. It is a recent release with no known release cadence. Key differentiators: it outputs a clean, readable HTML report, useful for sharing or integrating into CI pipelines. Alternatives include JSON or other formatters, but this is the only dedicated HTML formatter for stylelint.

npm install stylelint-html-formatter
INSTALL
IMPORT
SIG · STYLELINT-HTML-FOR
S
stylelint-html-formatter
testingjavascriptv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

default
import formatter from 'stylelint-html-formatter'
const formatter = require('stylelint-html-formatter')
ESM-only, cannot use require() unless using dynamic import or transpilation.

Runs stylelint on all CSS files and outputs an HTML report to report.html.

npx stylelint "**/*.css" --custom-formatter=node_modules/stylelint-html-formatter > report.html
Debug
Known issues
gotchaMust use ESM import; CJS require() will fail
fix
Use import statement or dynamic import() if using CommonJS.
affects: >=1.0
gotchaCustom formatter path must resolve to the module entry point
fix
Use absolute path or path relative to project root, e.g., --custom-formatter=./node_modules/stylelint-html-formatter
affects: >=1.0
Errors
Common errors & fixes
Cannot find module 'stylelint-html-formatter'
Module not installed or path incorrect
fix
Ensure package is installed: npm install --save-dev stylelint-html-formatter
TypeError: formatter is not a function
Using require() instead of import
fix
Switch to import statement as the package is ESM-only.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
stylelintrequiredPeer dependency for linting results
Agent activity
6 hits · last 30 days
node
6
Resources
stylelint-html-formatter — npm install stylelint-html-formatter · libregistry