Registry / testing / eslint-stats

eslint-stats

JSON →
library1.0.1jsnpmunverified

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.

npm install eslint-stats
INSTALL
IMPORT
SIG · ESLINT-STATS
E
eslint-stats
testingjavascriptv1.0.1
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.

byError
import { byError } from 'eslint-stats'
const byError = require('eslint-stats').byError
Default export is an object; named exports are preferred. CJS require() also works.
byWarning
import { byWarning } from 'eslint-stats'
import { byWarning } from 'eslint-stats/byWarning'
All reporters are exported from the main entry; no need to import from subpaths.
byErrorAndWarning
import { byErrorAndWarning } from 'eslint-stats'
import byErrorAndWarning from 'eslint-stats'
Default import is not defined; use named import.
byFolder
import { byFolder } from 'eslint-stats'
Only available as named export.

Shows how to use eslint-stats byError reporter programmatically with ESLint.

import { byError } from 'eslint-stats'; // Use with ESLint programmatic API import { ESLint } from 'eslint'; const eslint = new ESLint(); const results = await eslint.lintFiles(['src/**/*.js']); const formatter = await eslint.loadFormatter(byError); const output = formatter.format(results); console.log(output);
Debug
Known issues
breakingeslint-stats is not compatible with ESLint >= 8.0.0 due to formatter API changes.
fix
Use built-in formatter or migrate to a maintained alternative.
affects: >=8.0.0
deprecatedThe package has not been updated since 2016 and is effectively abandoned.
fix
Consider using eslint-formatter-stats or other maintained forks.
affects: all
gotchaThe reporters only display rules with errors (or warnings) and ignore others; byError will not show warnings, byWarning will not show errors.
fix
Use byErrorAndWarning if you want both.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'eslint-stats/byError.js'
Incorrect file path when using with ESLint CLI; the module is not at that path in newer Node resolutions.
fix
Use eslint --format node_modules/eslint-stats/byError.js or better: --format eslint-stats/byError (if module resolves).
TypeError: formatter is not a function
ESLint >= 8 expects formatters to be functions; eslint-stats exports objects.
fix
Use an older version of ESLint (<=7.x) or manually wrap the formatter.
Warning: Rule 'no-console' not found
The package does not include actual ESLint rules; this error occurs if you misconfigure ESLint.
fix
Ensure you have the necessary plugins and rules installed separately.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
eslint-stats — npm install eslint-stats · libregistry