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

@leandromatos/prettier-config

v2.0.2

Published

Prettier configuration with Tailwind CSS class sorting.

Readme

Prettier Config

Personal Prettier configuration: no semicolons, single quotes, 120-column line width, and Tailwind CSS class sorting.

✨ Features

  • One formatter, every project — a single source of truth for Prettier options, so formatting never drifts between repositories.
  • Tailwind class sorting built in — bundles prettier-plugin-tailwindcss and sorts className and the tv, clsx, cva, and tw calls with no extra setup.
  • ESM, Prettier 3 — ships as an ES module against the current Prettier major.
  • Reference by string — no config body to copy; point Prettier at the package name and you are done.
  • Override-friendly — spread it in a flat config file and change any option locally.

🧭 How It Works

Prettier reads a shared config by resolving a package name to the object it exports, the same way it resolves a local .prettierrc. You reference @leandromatos/prettier-config as a string; Prettier loads this package's index.js, which exports the options object, and formats as if those options were written in your own config.

The Tailwind plugin travels with the config as a dependency, so class sorting works on install with nothing else to wire. It only rewrites where Tailwind classes live — className attributes and the configured tailwindFunctions — and leaves every other string untouched.

There is no merge step. Prettier applies exactly what the package exports; to change anything, you spread the object and override, shown under Configuration below.

📦 Installation

Install Prettier and the config as dev dependencies:

yarn add --dev prettier @leandromatos/prettier-config

Prettier >= 3 is a peer dependency, so you bring your own. prettier-plugin-tailwindcss ships with the config; you do not install it separately.

🚀 Quick Start

Reference the config by name from a .prettierrc file at your project root:

"@leandromatos/prettier-config"

That is the whole setup. Run Prettier as usual:

yarn prettier --write .

Editor and lint-staged setup

Format on save with Prettier as the default formatter (VSCode, with the Prettier extension, .vscode/settings.json):

{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode"
}

lint-staged (lint-staged.config.mjs) — format staged files on commit:

export default {
  '*': 'prettier --write --ignore-unknown',
}

🧩 What's Included

The base options, applied to every file:

| Option | Value | Description | | ------------------- | ----------------------------- | ---------------------------------------------------------- | | arrowParens | avoid | Omit parentheses around a single arrow-function parameter. | | printWidth | 120 | Wrap past 120 columns. | | semi | false | No semicolons. | | singleQuote | true | Single quotes. | | plugins | prettier-plugin-tailwindcss | Sort Tailwind CSS classes. | | tailwindFunctions | tv, clsx, cva, tw | Calls whose string arguments get class sorting. |

One override, for YAML, where double quotes read more naturally:

| Files | Option | Value | | ----------------- | ------------- | ------- | | *.yml, *.yaml | singleQuote | false |

⚙️ Configuration

Prettier has no extends, so you override by spreading the config. Import it in a prettier.config.mjs and change any option:

import config from '@leandromatos/prettier-config'

export default {
  ...config,
  semi: true, // this project keeps semicolons
}

🏷️ Versioning

Semver, published to npm. The peer range is Prettier >= 3; a Prettier major that changes formatting defaults ships as a major here too. Snapshots publish to the snapshot dist-tag as X.Y.Z-snapshot.YYYYMMDD.N; stable releases go to latest.

🤝 Contributing

This repository follows Conventional Commits. See CONTRIBUTING.md for the workflow, releases, and local setup.

📄 License

This software is free and open source, released by Leandro Matos under the MIT License. See the LICENSE file for the full terms.