npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@danielsitek/eslint-stats

v0.4.2

Published

Modern TypeScript formatters for ESLint with aggregated error/warning statistics and visual graphs - Zero dependencies

Readme

Build Status Codacy Badge Codacy Badge Maintainability GitHub Release NPM Version

Statistics Reporter for ESLint

Modern TypeScript formatters for ESLint with aggregated error and warning statistics. Analyzes files by error frequency rather than location, making it easier to prioritize fixes when introducing ESLint to existing projects.

screenshot

Features

  • Multiple aggregation views (by error, warning, folder)
  • Color-coded output with visual graphs
  • ESLint 8 and 9 compatible
  • Full TypeScript support with type definitions
  • Zero runtime dependencies
  • Modern Node.js (20+)

Installation

npm install --save-dev @danielsitek/eslint-stats

Usage with ESLint

Create a file named stats.mjs:

import { byErrorAndWarning } from "@danielsitek/eslint-stats/by-error-and-warning";

export default byErrorAndWarning;
eslint . --format ./stats.mjs

Available Formatters

by-error

Displays aggregated error statistics without file separation. Only shows rules with errors; warnings are not displayed.

by-warning

Displays aggregated warning statistics without file separation. Only shows rules with warnings; errors are not displayed.

by-error-and-warning

Displays aggregated statistics for both errors and warnings without file separation. Errors are shown in red, warnings in yellow.

by-error-and-warning-stacked

Similar to by-error-and-warning but displays errors and warnings stacked together when a rule has both severities across different files.

by-folder

Displays aggregated statistics grouped by folder. Errors are shown in red, warnings in yellow.

by-prometheus

Exports ESLint statistics in Prometheus text exposition format for monitoring and alerting. Generates metrics compatible with Prometheus, Grafana, and other observability tools.

Metrics exported:

  • eslint_rule_violations_total{rule,severity,folder} - Violations by rule, severity, and folder
  • eslint_violations_by_severity_total{severity} - Total violations by severity
  • eslint_files_total - Total files analyzed
  • eslint_files_with_violations_total - Files with violations
  • eslint_files_clean_total - Files without violations
  • eslint_rules_violated_total - Unique rules violated

Monorepo support

For monorepo setups where ESLint runs from a subdirectory, use createPrometheusFormatter with folderPrefix to prepend the package name to folder paths:

import { createPrometheusFormatter } from "@danielsitek/eslint-stats/by-prometheus";

export default createPrometheusFormatter({ folderPrefix: "my-package" });

This produces metrics with prefixed folder labels, e.g. folder="my-package/src/utils" instead of folder="src/utils".

Demo

The package includes demo scripts for testing formatters:

npm run demo:error
npm run demo:warning
npm run demo:both
npm run demo:stacked
npm run demo:folder
npm run demo:prometheus

Requirements

  • Node.js >= 20.0.0
  • ESLint >= 8.0.0

Migration from ganimomer/eslint-stats v1.x

If you're upgrading from the original eslint-stats package:

  1. Update package name:

    npm uninstall eslint-stats
    npm install --save-dev @danielsitek/eslint-stats
  2. Update formatter paths in your ESLint configuration or CLI commands to use the new scoped package name.

  3. For programmatic usage, update imports to use the scoped package name.

Credits

Modernized fork of eslint-stats by Omer Ganim.

License

MIT