{"id":20001,"library":"eslint-stats","title":"eslint-stats","description":"Custom ESLint formatters that aggregate errors by rule rather than by file. Currently at version 1.0.1 (stable, last released 2016). It helps when introducing ESLint to a large codebase by showing which rules cause the most violations. Differentiates from default formatters by providing aggregated views: byError, byWarning, byErrorAndWarning, byErrorAndWarningStacked, and byFolder. No active maintenance; works with ESLint < 8.x due to API changes.","status":"deprecated","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/ganimomer/eslint-stats","tags":["javascript"],"install":[{"cmd":"npm install eslint-stats","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-stats","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-stats","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export is an object; named exports are preferred. CJS require() also works.","wrong":"const byError = require('eslint-stats').byError","symbol":"byError","correct":"import { byError } from 'eslint-stats'"},{"note":"All reporters are exported from the main entry; no need to import from subpaths.","wrong":"import { byWarning } from 'eslint-stats/byWarning'","symbol":"byWarning","correct":"import { byWarning } from 'eslint-stats'"},{"note":"Default import is not defined; use named import.","wrong":"import byErrorAndWarning from 'eslint-stats'","symbol":"byErrorAndWarning","correct":"import { byErrorAndWarning } from 'eslint-stats'"},{"note":"Only available as named export.","symbol":"byFolder","correct":"import { byFolder } from 'eslint-stats'"}],"quickstart":{"code":"import { byError } from 'eslint-stats';\n\n// Use with ESLint programmatic API\nimport { ESLint } from 'eslint';\n\nconst eslint = new ESLint();\nconst results = await eslint.lintFiles(['src/**/*.js']);\nconst formatter = await eslint.loadFormatter(byError);\nconst output = formatter.format(results);\nconsole.log(output);","lang":"javascript","description":"Shows how to use eslint-stats byError reporter programmatically with ESLint."},"warnings":[{"fix":"Use built-in formatter or migrate to a maintained alternative.","message":"eslint-stats is not compatible with ESLint >= 8.0.0 due to formatter API changes.","severity":"breaking","affected_versions":">=8.0.0"},{"fix":"Consider using eslint-formatter-stats or other maintained forks.","message":"The package has not been updated since 2016 and is effectively abandoned.","severity":"deprecated","affected_versions":"all"},{"fix":"Use byErrorAndWarning if you want both.","message":"The reporters only display rules with errors (or warnings) and ignore others; byError will not show warnings, byWarning will not show errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use eslint --format node_modules/eslint-stats/byError.js or better: --format eslint-stats/byError (if module resolves).","cause":"Incorrect file path when using with ESLint CLI; the module is not at that path in newer Node resolutions.","error":"Error: Cannot find module 'eslint-stats/byError.js'"},{"fix":"Use an older version of ESLint (<=7.x) or manually wrap the formatter.","cause":"ESLint >= 8 expects formatters to be functions; eslint-stats exports objects.","error":"TypeError: formatter is not a function"},{"fix":"Ensure you have the necessary plugins and rules installed separately.","cause":"The package does not include actual ESLint rules; this error occurs if you misconfigure ESLint.","error":"Warning: Rule 'no-console' not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}