Registry / testing / eslint-html-reporter

eslint-html-reporter

JSON →
library0.7.4jsnpmunverified

Generates an HTML report from ESLint results with a summary of all linted files and their errors and warnings. Version 0.7.4 is the latest stable release. It provides detailed and "lite" output options, optional TeamCity integration, and a summary of top issues. Unlike using ESLint's built-in formatters, this package produces a standalone HTML page that can be opened in a browser or served, making it easy to share lint results with a team. It has limited recent development but remains functional for most ESLint use cases.

npm install eslint-html-reporter
INSTALL
IMPORT
SIG · ESLINT-HTML-REPORT
E
eslint-html-reporter
testingjavascriptv0.7.4
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 (reporter function)
const reporter = require('eslint-html-reporter');
import reporter from 'eslint-html-reporter';
This package is CommonJS-only; ESM imports via type: module will fail unless using a compatible bundler.
reporter-lite.js
const reporterLite = require('eslint-html-reporter/reporter-lite');
const reporterLite = require('eslint-html-reporter').lite;
The lite reporter is a separate file, not a property of the main module.
reporter-team-city.js
const reporterTeamCity = require('eslint-html-reporter/reporter-team-city');
const reporterTeamCity = require('eslint-html-reporter/teamcity');
The TeamCity reporter file name uses dashes, not camelCase.
reporter-lite-team-city.js
const reporterLLiteTC = require('eslint-html-reporter/reporter-lite-team-city');
const reporterLLiteTC = require('eslint-html-reporter/lite-teamcity');
The lite TeamCity reporter combines both features in a single file.

Shows how to generate an HTML report using the CLI or programmatically with ESLint.

// Install: npm install eslint-html-reporter // Then run ESLint with the reporter // bash: eslint . -f node_modules/eslint-html-reporter/reporter.js -o report.html // Using programmatically: const eslint = require('eslint'); const reporter = require('eslint-html-reporter'); const fs = require('fs'); async function main() { const engine = new eslint.CLIEngine({}); const report = engine.executeOnFiles(['.']); const results = reporter(report.results); fs.writeFileSync('report.html', results); } main().catch(console.error);
eslint-html-reporter --version
Debug
Known issues
gotchaThe package uses CommonJS and does not support ESM imports directly.
fix
Use require() or configure your bundler to handle CommonJS modules.
affects: >=0.0.0
deprecatedThe package relies on deprecated eslint.CLIEngine (removed in ESLint v9).
fix
Use ESLint v8 or lower, or update to a newer reporter that supports ESLint's FlatConfig.
affects: >=0.0.0
gotchaThe reporter expects the full ESLint results object; passing only the messages array will fail.
fix
Always pass the complete results object from ESLint's executeOnFiles or from gulp-eslint's format callback.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-html-reporter'
Package not installed or installed in wrong location.
fix
Run 'npm install eslint-html-reporter --save-dev' and ensure it's in 'node_modules'.
TypeError: reporter is not a function
Incorrect import; the package exports a function but it's being used as an object.
fix
Use 'const reporter = require('eslint-html-reporter');' then call 'reporter(results)'.
Error: No such file or directory: 'report.html'
Output path is not writable or does not exist.
fix
Ensure the output directory exists or use an absolute path.
Upgrade
Version history
0.7.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
eslint-html-reporter — npm install eslint-html-reporter · libregistry