</>PackageGraphPackageGraph

prettier

npmv3.9.6TypeScript

Prettier 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.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

9.5 MB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

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.

commandernpm

the complete solution for node.js command-line programs

451.1M/wk11 dependentsMITTS
uuidnpm

RFC9562 UUIDs

254.8M/wk8 dependentsMITTS
yamlnpm

JavaScript parser and stringifier for YAML

176.1M/wk6 dependentsISCTS
@jridgewell/resolve-urinpm

Resolve a URI relative to an optional base URI

166.3M/wk1 dependentsMITTS
csstypenpm

Strict TypeScript and Flow types for style based on MDN data

142.8M/wk2 dependentsMITTS
eslintnpm

An AST-based pattern checker for JavaScript.

138.4M/wk279 dependentsMITTS
mimenpm

A comprehensive library for mime-type mapping

136.4M/wk6 dependentsMITTS
cosmiconfignpm

Find and load configuration from a package.json property, rc file, TypeScript module, and more!

115.3M/wk3 dependentsMITTS
axiosnpm

Promise based HTTP client for the browser and node.js

106.5M/wk4 dependentsMITTS
rxjsnpm

Reactive Extensions for modern JavaScript

90.9M/wk6 dependentsApache-2.0TS
saxnpm

An evented streaming XML parser in JavaScript

78.9M/wk2 dependentsBlueOak-1.0.0
longnpm

A Long class for representing a 64-bit two's-complement integer value.

78.6M/wk1 dependentsApache-2.0TS
ajv-keywordsnpm

Additional JSON-Schema keywords for Ajv JSON validator

61.4M/wk1 dependentsMITTS
obugnpm

A lightweight JavaScript debugging utility, forked from debug, featuring TypeScript and ESM support.

61.1M/wk8 dependentsMITTS
@noble/hashesnpm

Audited & minimal 0-dependency JS implementation of SHA, RIPEMD, BLAKE, HMAC, HKDF, PBKDF & Scrypt

59.6M/wk1 dependentsMITTS
socksnpm

Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.

51.6M/wk2 dependentsMITTS
set-cookie-parsernpm

Parses set-cookie headers into objects

50.2M/wk2 dependentsMITTS
webpacknpm

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.

49.8M/wk29 dependentsMITTS
@sinonjs/commonsnpm

Simple functions shared among the sinon end user libraries

49.8M/wk1 dependentsBSD-3-ClauseTS
dayjsnpm

2KB immutable date time library alternative to Moment.js with the same modern API

48.7M/wk1 dependentsMITTS
reselectnpm

Selectors for Redux.

44M/wk1 dependentsMITTS
cacnpm

Simple yet powerful framework for building command-line apps.

44M/wk9 dependentsMIT
ufonpm

URL utils for humans

43.6M/wk5 dependentsMITTS
magicastnpm

Modify a JS/TS file and write back magically just like JSON!

33.9M/wk3 dependentsMITTS

Relationship graph

Dependencies (left) and dependents (right) of prettier.

Frequently installed together

Release history

29 releases in the last two years, typically about 5 days apart.

Recent versions of prettier
VersionPublishedSizeLicense
3.9.6latest1 month ago9.5 MBMIT
3.9.52 months ago9.5 MBMIT
3.9.42 months ago9.5 MBMIT
3.9.32 months ago9.5 MBMIT
3.9.22 months ago9.5 MBMIT
3.9.12 months ago9.5 MBMIT
3.9.02 months ago9.5 MBMIT
3.8.52 months ago8.2 MBMIT
3.8.43 months ago8.2 MBMIT
3.8.34 months ago8.2 MBMIT
3.8.25 months ago8.2 MBMIT
3.8.17 months ago8.2 MBMIT
3.8.07 months ago8.2 MBMIT
3.7.49 months ago8.2 MBMIT
3.7.39 months ago8.2 MBMIT

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.

Maintainers

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.