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

eslint-rule-explorer

v0.2.0

Published

A powerful CLI tool for exploring and analyzing ESLint rules in your projects.

Downloads

100

Readme

eslint-rule-explorer

A powerful CLI tool for exploring and analyzing ESLint rules in your projects

npm version License: Apache-2.0

Overview

command: npx eslint-rule-explorer perfectionist/sort-jsx-props --json | jq -r '.[].info.docs.url'  output: https://perfectionist.dev/rules/sort-jsx-props

eslint-rule-explorer is a modern CLI tool that helps developers explore, search, and analyze ESLint rules in their projects. It provides comprehensive information about rule configurations, supports both fuzzy and exact search modes, and works seamlessly with ESLint's flat config format.

[!WARNING] This tool only available for ESLint flat config.

Not work with ESLint legacy config (e.g. .eslintrc.js, .eslintrc.json).

Installation

Global Installation

Recommended for CLI usage.

npm install -g eslint-rule-explorer

Or you can just use npx to run it without installing globally:

npx eslint-rule-explorer

Local Installation

Recommended for programmatic use.

npx npym add eslint-rule-explorer

Usage

CLI Examples

# See information about `@typescript-eslint/no-explicit-any`
eslint-rule-explorer @typescript-eslint/no-explicit-any

# Find all TypeScript-related rules
eslint-rule-explorer typescript

# Check if a specific rule exists
eslint-rule-explorer --exact no-console

# Get machine-readable output for scripts
eslint-rule-explorer --json react | jq '.[].name'

# Search in a specific directory
eslint-rule-explorer --root ./my-project unused

# Find all rules related to imports
eslint-rule-explorer import

# Extract documentation URLs with shell scripts
eslint-rule-explorer no-unused-vars --json | jq -r '.[].info.docs.url'
# https://eslint.org/docs/latest/rules/no-unused-vars

JavaScript API

For programmatic use in Node.js applications:

npm install eslint-rule-explorer
import { searchESLintRule } from 'eslint-rule-explorer';

// Search for rules with fuzzy matching using `String.includes`
const results = await searchESLintRule('no-unused');
const results = await searchESLintRule('no-unused', {
  strategy: 'includes'
});

// Exact search
const exactResults = await searchESLintRule('no-unused-vars', {
  strategy: 'exact'
});

// Custom project root
const customResults = await searchESLintRule('typescript', {
  rootDir: '/path/to/your/project'
});

// Suppress console output from side effect of resolving ESLint config
// (useful for JSON pipelines)
const quietResults = await searchESLintRule('react', {
  suppressOutput: true
});

API Reference

For detailed API documentation including all available options and return types, see the implementation.

Integration Examples

// Find all TypeScript ESLint rules
const tsRules = await searchESLintRule('@typescript-eslint', {
  suppressOutput: true
});

// Extract documentation URLs
const urls = tsRules
  .filter(rule => rule.info.docs?.url)
  .map(rule => rule.info.docs.url);

// Find fixable rules only
const fixableRules = await searchESLintRule('', {
  strategy: 'includes'
}).then(rules =>
  rules.filter(rule => rule.info.fixable)
);

CLI Output Format

Human-Readable Output (Default)

The default output format provides comprehensive information about each rule:

🚨 no-unused-vars (eslint)
  Type: problem
  📖 https://eslint.org/docs/rules/no-unused-vars
  Description: Disallow unused variables
  ✅ Fixable: Yes
  💭 Has suggestions: Yes

JSON Output (--json)

Perfect for integration with other tools and scripts:

{
  "rules": [
    {
      "name": "no-unused-vars",
      "plugin": "eslint",
      "type": "problem",
      "deprecated": false,
      "fixable": "code",
      "hasSuggestions": true,
      "docs": {
        "description": "Disallow unused variables",
        "url": "https://eslint.org/docs/rules/no-unused-vars"
      }
    }
  ]
}

Contributing

We welcome contributions! Please see the main repository for contributing guidelines.

License

Apache-2.0 License - see LICENSE for details.

Links


Happy rule exploring! 🔍