prettier
npmv3.9.6TypeScriptPrettier is an opinionated code formatter
Safe to adopt
Yes — prettier scores well across adoption, maintenance, weight, supply chain, and licensing. 114.2M downloads per week and 159 known dependents. Last published 51 days ago. 31 releases in the last 2 years.
- AAdoption: grade A, Excellent.
114.2M downloads per week and 159 known dependents.
- AMaintenance: grade A, Excellent.
Last published 51 days ago. 31 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 9.5 MB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 11 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding prettier to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=14
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the prettier README.
foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());Used by
Popular packages that depend on prettier.
the complete solution for node.js command-line programs
RFC9562 UUIDs
JavaScript parser and stringifier for YAML
Resolve a URI relative to an optional base URI
Strict TypeScript and Flow types for style based on MDN data
An AST-based pattern checker for JavaScript.
A comprehensive library for mime-type mapping
Find and load configuration from a package.json property, rc file, TypeScript module, and more!
Promise based HTTP client for the browser and node.js
Reactive Extensions for modern JavaScript
An evented streaming XML parser in JavaScript
A Long class for representing a 64-bit two's-complement integer value.
Additional JSON-Schema keywords for Ajv JSON validator
A lightweight JavaScript debugging utility, forked from debug, featuring TypeScript and ESM support.
Audited & minimal 0-dependency JS implementation of SHA, RIPEMD, BLAKE, HMAC, HKDF, PBKDF & Scrypt
Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.
Parses set-cookie headers into objects
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
Simple functions shared among the sinon end user libraries
2KB immutable date time library alternative to Moment.js with the same modern API
Selectors for Redux.
Simple yet powerful framework for building command-line apps.
URL utils for humans
Modify a JS/TS file and write back magically just like JSON!
Relationship graph
Dependencies (left) and dependents (right) of prettier.
Frequently installed together
TypeScript definitions for node
An AST-based pattern checker for JavaScript.
Next generation testing framework powered by Vite
Delightful JavaScript Testing.
An extremely fast JavaScript and CSS bundler and minifier.
BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
V8 coverage provider for Vitest
React is a JavaScript library for building user interfaces.
TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files
A JavaScript implementation of many web standards
ECMAScript parser
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
Release history
29 releases in the last two years, typically about 5 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 3.9.6latest | 1 month ago | 9.5 MB | MIT |
| 3.9.5 | 2 months ago | 9.5 MB | MIT |
| 3.9.4 | 2 months ago | 9.5 MB | MIT |
| 3.9.3 | 2 months ago | 9.5 MB | MIT |
| 3.9.2 | 2 months ago | 9.5 MB | MIT |
| 3.9.1 | 2 months ago | 9.5 MB | MIT |
| 3.9.0 | 2 months ago | 9.5 MB | MIT |
| 3.8.5 | 2 months ago | 8.2 MB | MIT |
| 3.8.4 | 3 months ago | 8.2 MB | MIT |
| 3.8.3 | 4 months ago | 8.2 MB | MIT |
| 3.8.2 | 5 months ago | 8.2 MB | MIT |
| 3.8.1 | 7 months ago | 8.2 MB | MIT |
| 3.8.0 | 7 months ago | 8.2 MB | MIT |
| 3.7.4 | 9 months ago | 8.2 MB | MIT |
| 3.7.3 | 9 months ago | 8.2 MB | MIT |
Overview
prettier is an npm package that prettier is an opinionated code formatter. It is extremely widely used, with about 114.2M downloads per week and 159 known dependents in the graph. The latest version is 3.9.6, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need prettier is an opinionated code formatter and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (114.2M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Zero runtime dependencies — minimal footprint.
- Trusted by 159 other packages.
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Funding
Frequently asked questions
Should I use prettier?
Yes — prettier scores well across adoption, maintenance, weight, supply chain, and licensing. 114.2M downloads per week and 159 known dependents. Last published 51 days ago. 31 releases in the last 2 years.
How do I install prettier?
Run `npm install prettier` to add prettier to your npm project.
What license is prettier released under?
prettier is distributed under the MIT license.
How popular is prettier?
prettier has approximately 114,152,754 downloads per week and 159 known dependent packages.
Is prettier still maintained?
The most recent release of prettier (v3.9.6) was published 1 month ago.
Does prettier run install scripts?
No. prettier does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.