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

@lazyconfig/prettier

v0.1.0

Published

Shared, production-ready Prettier preset for consistent code formatting.

Readme

@lazyconfig/prettier

npm Downloads Prettier License Sponsor

Shared, opinionated Prettier configuration for consistent code formatting across projects.

Provides a single base.json preset that keeps code style predictable and diff-noise low. Every option is chosen deliberately — the goal is a format that is easy to read, easy to review, and consistent across JavaScript, TypeScript, JSX, JSON, and Markdown files.


Features

  • Tabs for indentation — visually consistent regardless of editor tab-size preference
  • Single quotes throughout JS/TS and JSX
  • 100-character print width — readable on wide monitors without excessive wrapping
  • Trailing commas everywhere valid in ES2017+ — cleaner multi-line diffs
  • Unix line endings — consistent across macOS, Linux, and Windows
  • Strict HTML whitespace sensitivity — avoids silent whitespace bugs in templates
  • Auto-formats embedded languages (CSS-in-JS, GraphQL, SQL, etc.)

Installation

# pnpm
pnpm add -D prettier @lazyconfig/prettier

# npm
npm install -D prettier @lazyconfig/prettier

# yarn
yarn add --dev prettier @lazyconfig/prettier

# bun
bun add --dev prettier @lazyconfig/prettier

Usage

Reference the shared config from your Prettier configuration file. Choose the format that fits your project:

.prettierrc.json

"@lazyconfig/prettier"

.prettierrc.mjs — extend or override

import base from "@lazyconfig/prettier" with { type: "json" };

/** @type {import("prettier").Config} */
export default {
	...base,
	// add project-specific overrides here
	semi: false,
};

.prettierrc.js (CommonJS)

const base = require("@lazyconfig/prettier");

/** @type {import("prettier").Config} */
module.exports = {
	...base,
	// add project-specific overrides here
};

Configuration Reference

Full list of options and the reasoning behind each choice:

| Option | Value | Why | | ---------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | useTabs | true | Prettier writes \t characters for indentation. Visual width is controlled by the editor, not Prettier | | tabWidth | 2 | Used only to calculate line length against printWidth — Prettier counts each tab as 2 spaces when measuring. Has no effect on how tabs render in editors | | printWidth | 100 | Wider than the classic 80 but avoids excessive wrapping on modern monitors | | semi | true | Explicit semicolons prevent subtle ASI (automatic semicolon insertion) edge cases | | trailingComma | "all" | Trailing commas everywhere valid in ES2017+ — including function parameters. Produces cleaner single-line diffs when items are added or removed | | quoteProps | "as-needed" | Only quotes object keys that require it — keeps objects readable | | bracketSpacing | true | Spaces inside { } improve readability of object literals | | bracketSameLine | false | JSX closing > on its own line — easier to spot the end of a component's props | | singleAttributePerLine | true | Each JSX attribute on its own line — improves readability and produces cleaner diffs when props change | | arrowParens | "always" | Always wraps arrow function parameters — consistent and avoids extra edits when adding types | | htmlWhitespaceSensitivity | "strict" | Preserves semantically significant whitespace in HTML templates | | embeddedLanguageFormatting | "auto" | Automatically formats embedded code blocks (e.g. CSS-in-JS, GraphQL, SQL in template literals) | | proseWrap | "preserve" | Does not reflow Markdown prose — preserves intentional line breaks in documentation | | endOfLine | "lf" | Unix line endings everywhere — avoids CRLF noise on Windows when working in cross-platform teams |


Ignoring Files

Create a .prettierignore file in your project root to exclude paths from formatting:

# build output
dist/
out-tsc/
coverage/

# generated files
*.generated.ts
**/__snapshots__/**

# external configs that should not be reformatted
*.min.js

Editor Integration

VS Code

Install the Prettier extension, then add to your .vscode/settings.json:

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

Other editors

Prettier has official integrations for WebStorm, Vim, Neovim, Emacs, and more. See the Prettier Editor Integration docs.


License

MIT