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

prettier-pretty-check

v0.2.0

Published

A drop-in replacement for Prettier that provides **beautiful, clickable error output** when running `--check`.

Readme

prettier-pretty-check

A drop-in replacement for Prettier that provides beautiful, clickable error output when running --check.

Why?

Prettier's default --check output is... not great:

Checking formatting...
[warn] src/index.js
[warn] Code style issues found in the above file. Run Prettier with --write to fix.

This tool gives you clickable links and clear descriptions:

❌ Prettier check failed

src/index.js:12:5: error: Add 2 spaces of indentation (prettier/indent)
src/index.js:45:80: error: Line exceeds print width (prettier/line-length)
src/index.js:67:1: error: Line needs to be added (prettier/insert)
src/components/App.tsx:23:15: error: Fix spacing around brackets (prettier/spacing)

✖ 4 formatting errors

Run prettier --write to fix automatically
  • Clickable links - file:line:col format works in VS Code, terminals, and most editors
  • Standard format - Compatible with GitHub Actions problem matchers
  • Rule names - (prettier/indent), (prettier/spacing), etc. for easy filtering

Features

  • Clickable file links: file:line:col format - click to jump directly to the issue
  • Color-coded categories: Instantly see what type of issue it is
    • Indent - Indentation problems (shows exact space count)
    • Spacing - Bracket/brace spacing
    • Line too long - Exceeds print width
    • Semicolon - Missing or extra semicolons
    • Quotes - Wrong quote style
    • Comma - Trailing comma issues
    • Insert / Delete - Lines to add or remove
    • Format - General formatting
  • Actionable descriptions: Clear message explaining what to fix
  • Fix command: Shows how to auto-fix at the end

Installation

npm install prettier-pretty-check --save-dev
# or
bun add prettier-pretty-check --dev

Usage

Use it exactly like Prettier - it's a transparent wrapper that passes all arguments through:

# Check files (enhanced output)
npx prettier-pretty-check --check "src/**/*.{js,ts}"

# Format files (passes through to Prettier unchanged)
npx prettier-pretty-check --write "src/**/*.{js,ts}"

In package.json

{
  "scripts": {
    "format": "prettier-pretty-check --write \"src/**/*.{js,ts}\"",
    "format:check": "prettier-pretty-check --check \"src/**/*.{js,ts}\""
  }
}

With plugins

All Prettier options and plugins work as expected:

npx prettier-pretty-check --check "**/*.java" --plugin=prettier-plugin-java

GitHub Actions

The output format is compatible with GitHub Actions problem matchers. Add this to your workflow:

- name: Add Prettier matcher
  run: echo "::add-matcher::node_modules/prettier-pretty-check/problem-matcher.json"

- name: Check formatting
  run: npx prettier-pretty-check --check "src/**/*.{js,ts}"

This will show formatting errors as annotations directly on your PR.

How it works

  1. When --check is not present: passes everything through to Prettier unchanged
  2. When --check is present:
    • Runs Prettier with --list-different to find unformatted files
    • For each file, compares original vs formatted output
    • Parses the diff to extract meaningful diagnostics
    • Outputs in standard file:line:col: error: message (rule) format

Requirements

  • Node.js 18+
  • Prettier must be installed in your project

License

MIT