{"id":19656,"library":"eslint-html-reporter","title":"ESLint HTML Reporter","description":"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.","status":"active","version":"0.7.4","language":"javascript","source_language":"en","source_url":"https://github.com/ratherblue/eslint-html-reporter","tags":["javascript","eslint","reporter","teamcity"],"install":[{"cmd":"npm install eslint-html-reporter","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-html-reporter","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-html-reporter","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is CommonJS-only; ESM imports via type: module will fail unless using a compatible bundler.","wrong":"import reporter from 'eslint-html-reporter';","symbol":"default (reporter function)","correct":"const reporter = require('eslint-html-reporter');"},{"note":"The lite reporter is a separate file, not a property of the main module.","wrong":"const reporterLite = require('eslint-html-reporter').lite;","symbol":"reporter-lite.js","correct":"const reporterLite = require('eslint-html-reporter/reporter-lite');"},{"note":"The TeamCity reporter file name uses dashes, not camelCase.","wrong":"const reporterTeamCity = require('eslint-html-reporter/teamcity');","symbol":"reporter-team-city.js","correct":"const reporterTeamCity = require('eslint-html-reporter/reporter-team-city');"},{"note":"The lite TeamCity reporter combines both features in a single file.","wrong":"const reporterLLiteTC = require('eslint-html-reporter/lite-teamcity');","symbol":"reporter-lite-team-city.js","correct":"const reporterLLiteTC = require('eslint-html-reporter/reporter-lite-team-city');"}],"quickstart":{"code":"// Install: npm install eslint-html-reporter\n// Then run ESLint with the reporter\n// bash:\neslint . -f node_modules/eslint-html-reporter/reporter.js -o report.html\n\n// Using programmatically:\nconst eslint = require('eslint');\nconst reporter = require('eslint-html-reporter');\nconst fs = require('fs');\n\nasync function main() {\n  const engine = new eslint.CLIEngine({});\n  const report = engine.executeOnFiles(['.']);\n  const results = reporter(report.results);\n  fs.writeFileSync('report.html', results);\n}\nmain().catch(console.error);","lang":"javascript","description":"Shows how to generate an HTML report using the CLI or programmatically with ESLint."},"warnings":[{"fix":"Use require() or configure your bundler to handle CommonJS modules.","message":"The package uses CommonJS and does not support ESM imports directly.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use ESLint v8 or lower, or update to a newer reporter that supports ESLint's FlatConfig.","message":"The package relies on deprecated eslint.CLIEngine (removed in ESLint v9).","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Always pass the complete results object from ESLint's executeOnFiles or from gulp-eslint's format callback.","message":"The reporter expects the full ESLint results object; passing only the messages array will fail.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install eslint-html-reporter --save-dev' and ensure it's in 'node_modules'.","cause":"Package not installed or installed in wrong location.","error":"Error: Cannot find module 'eslint-html-reporter'"},{"fix":"Use 'const reporter = require('eslint-html-reporter');' then call 'reporter(results)'.","cause":"Incorrect import; the package exports a function but it's being used as an object.","error":"TypeError: reporter is not a function"},{"fix":"Ensure the output directory exists or use an absolute path.","cause":"Output path is not writable or does not exist.","error":"Error: No such file or directory: 'report.html'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}