{"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,"search_vec":"'1.0.1':19 '2016':23 '8':61 'activ':56 'aggreg':8,47 'api':65 'byerror':49 'byerrorandwarn':51 'byerrorandwarningstack':52 'byfold':54 'bywarn':50 'caus':37 'chang':66 'codebas':32 'current':16 'custom':4 'default':43 'differenti':41 'due':63 'error':9 'eslint':2,5,28,60 'eslint-stat':1 'file':15 'formatt':6,44 'help':25 'introduc':27 'javascript':67 'larg':31 'last':21 'mainten':57 'provid':46 'rather':12 'releas':22 'rule':11,36 'show':34 'stabl':20 'stat':3 'version':18 'view':48 'violat':40 'work':58 'x':62","created_at":"2026-04-25T11:20:48.134623+00:00","updated_at":"2026-04-25T11:20:48.134623+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ganimomer/eslint-stats","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-stats","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}