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

@sp-packages/lintrc

v2.0.0

Published

A lightweight CLI tool for running multiple linters efficiently.

Readme

LintRC

✨ Features

  • 🔍 Detects file types and applies appropriate linters automatically
  • 🛠 Supports multiple linters (ESLint, Prettier, PHPStan, PHPCS, Markdownlint, etc.)
  • 🚀 Parallel execution for improved performance
  • 📜 Customizable config file (lintrc.json)
  • Runs only on Git-tracked files by default
  • 🏗 Ideal for CI/CD pipelines and local development

📦 Installation

Global Installation (For system-wide CLI use)

npm install -g @sp-packages/lintrc

This allows you to use lintrc globally in your terminal.

Local Installation (For project-specific use)

npm install @sp-packages/lintrc --save-dev

Then, run it via:

npx lintrc

🚀 CLI Usage

Basic Usage

lintrc [options]

Options:

lintrc -h
Usage: LintRC [options] [files...]

LintRC - A CLI tool for running linters based on file extensions.

Arguments:
files List of files to lint. If omitted, uses Git-tracked files.

Options:
-V, --version output the version number
--skip-composer Skip processing Composer dependencies
--skip-npm Skip processing NPM dependencies
-c, --config <config> Path to the configuration file (default: lintrc.json)
-e, --ext <ext...> Optionally limit the linter to specific extensions
-s, --strict Strict Mode (return exit code 1 even for warnings)
-q, --quiet Disable output
-m, --minimal Essential output
-v, --verbose Enable verbose logging
-h, --help display help for command

Examples:

lintrc --ext js,ts,php
lintrc --config custom-lintrc.json --verbose

📜 Programmatic Usage (Inside Node.js)

You can also use lintrc inside your JavaScript/TypeScript projects.

Import and Use in Your Project

import { lintrc } from '@sp-packages/lintrc';

lintrc({ verbose: true });

⚙️ Configuration (lintrc.json)

By default, lintrc will look for a lintrc.json or .lintrc.json file in your project's root directory. You can customize it as follows:

The lintrc.json configuration file allows you to define the tools and file type mappings for lintrc. Below is an example configuration and explanation of its keys:

TOOLS

The TOOLS section defines the linters and their configurations. Each tool has the following properties:

  • title: The display name of the tool.
  • type: The type of package manager used (npm or composer).
  • prefix: Specifies how the tool is invoked:
    • "npm": For npm subcommands (can be omitted if type is "npm", as it's the default).
    • "npx": For npm custom binaries (installed in node_modules/.bin).
    • "composer": For composer subcommands (can be omitted if type is "composer", as it's the default).
    • "vendor": For composer custom binaries (installed in vendor/bin).
  • command: The command to run the linter.
  • args: An array of arguments to pass to the command.
  • behavior: The behavior of the tool (error or warn).
  • priority: The priority of the tool execution (lower number means higher priority).

Example:

{
  "TOOLS": {
    "CSPELL": {
      "title": "cSpell",
      "type": "npm",
      "prefix": "npx",
      "command": "cspell",
      "args": ["--no-progress", "--no-summary"],
      "behavior": "warn",
      "priority": 4
    },
    "ESLINT": {
      "title": "ESLint",
      "type": "npm",
      "prefix": "npx",
      "command": "eslint",
      "args": ["--fix"],
      "behavior": "error",
      "priority": 2
    },
    "PHPCS": {
      "title": "PHP Code Sniffer",
      "type": "composer",
      "prefix": "vendor",
      "command": "phpcs",
      "behavior": "error",
      "priority": 3
    },
    "PRETTIER": {
      "title": "Prettier",
      "type": "npm",
      "prefix": "npx",
      "command": "prettier",
      "args": ["--write"],
      "behavior": "error",
      "priority": 1
    }
  }
}

MAPPING

The MAPPING section defines which tools to run based on file extensions. Each key is a file extension, and the value is an array of tool identifiers from the TOOLS section.

Example:

{
  "MAPPING": {
    "php": ["PHPCS"],
    "js": ["ESLINT", "PRETTIER"],
    "jsx": ["ESLINT", "PRETTIER"],
    "ts": ["ESLINT", "PRETTIER"],
    "*": ["CSPELL"]
  }
}

In this example:

  • PHP files (.php) will be checked with PHPCS.
  • JavaScript files (.js) and TypeScript files (.ts) will be checked with ESLINT and PRETTIER.
  • All files (*) will be checked with CSPELL.

This configuration allows lintrc to automatically apply the appropriate linters based on the file types in your project.


🎯 Example Outputs

lintrc
------------------------------
 cSpell
------------------------------
❌  [ERROR] package.json:112:32 - Unknown word (lintrc)
------------------------------
 LintRC Results
------------------------------
✅ [SUCCESS] Prettier: Passed
✅ [SUCCESS] ESLint: Passed
✅ [SUCCESS] Markdown Lint: Passed
✅ [SUCCESS] Commit Lint: Passed
✅ [SUCCESS] DepCheck: Passed
❌  [ERROR] cSpell: Failed

💡 Use Cases

  • CI/CD Pipelines – Automate code quality checks in your workflows.
  • Pre-Commit Hooks – Integrate with husky to enforce coding standards.
  • Local Development – Run linters before pushing code changes.

🤝 Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.


📜 License

This project is licensed under the MIT License. See the LICENSE file for details.