mrkeyoor.com_
Tue 01 Sept 17:40 UTC
Dev Toolsevaluationupdated 31 Aug 2026

prettier review

Prettier parses source code and prints it again using a fixed set of formatting rules, replacing team debates about spaces, wrapping, quotes, and line breaks with one repeatable output. It supports JavaScript, TypeScript, CSS, HTML, JSON, Markdown, YAML, GraphQL, and several related formats in core, with plugins covering more languages.

-2 / 1dstars / 7d
Verdict

Our Prettier checkout passed 35,265 of 35,270 tests with 0 failures after a 38-second install and 23-second build, so it remains the formatter I would choose first for a web team that accepts its house style. Pin the exact version, introduce the initial rewrite as its own change, and enforce --check in CI. Choose dprint when configurability is the requirement, or Biome when one tool must format and lint.

We ran it

Lab card: what happened when we ran prettier
Install✓ · 38s885 packages · 401 MB
Build✓ · 23s
Tests✓ · 189s35265 passed · 0 failed · 5 skipped of 35270 (jest)
Repo9426 files~172,632 lines of source · 24.8 MB · 16 CI workflows · tests dir

Answers from our run

Does prettier build from source?

Dependencies installed in 38 seconds (885 packages), and the build succeeded in 23 seconds. We cloned commit 5fd5b69 into a clean Debian container with 3 CPUs and no project-specific setup.

Do prettier's tests pass?

Yes: 35265 of 35270 passed when we ran the project's own test command (jest). Some failures need services or credentials a bare container does not have.

Who should not use prettier?

Teams that want a switch for every house-style preference: Prettier's option set is frozen, and requests to preserve input line breaks are explicitly out of scope.

What are the alternatives to prettier?

Biome, dprint, Oxc. Our Prettier checkout passed 35,265 of 35,270 tests with 0 failures after a 38-second install and 23-second build, so it remains the formatter I would choose first for a web team that accepts its house style.

Setup5/5Source install and build passed in 61 seconds combined
Docs5/5Install, editor, CI, options, plugins, and API paths are explicit
Community5/552,229 stars with current releases, issues, and pull requests
Maturity5/535,265 tests passed with 16 CI workflows at commit 5fd5b69

Discussed on

  1. hnA Prettier JavaScript Formatter498 points
  2. hnPrettier 1.0270 points
  3. hnPrettier 2.0 – Opinionated JavaScript formatter207 points
  4. hnWhy is Prettier rock solid?205 points
  5. hnSpeeding up Prettier locally and on your CI with dprint201 points

Who it’s for

JavaScript and TypeScript teams that want formatting settled automatically in editors and CI.
Multi-format web repositories that need one tool for code, styles, markup, data files, and Markdown.
Open-source maintainers who want contributors to produce the same layout with a pinned version.
Tool authors who can use an asynchronous formatting API or build a Prettier plugin.

Who it’s NOT for

Teams that want a switch for every house-style preference: Prettier's option set is frozen, and requests to preserve input line breaks are explicitly out of scope.
Repositories that cannot absorb a dedicated formatting migration: the install guide says output changes between releases and tells users to pin an exact local version.
Authors building codemods by mutating Prettier's AST: the API guide warns that location data can become inconsistent and recommends jscodeshift instead.
Integrations that require a synchronous in-process API: Prettier's public APIs are asynchronous, with @prettier/sync offered as a separate alternative.
Teams whose source frequently uses parser-edge comment layouts and cannot add regression fixtures: open issue 19955 shows Prettier 3.9.6 producing different output on a second pass for one arrow-function case.

Setup reality

Our source checkout installed 885 Yarn packages in 38 seconds and occupied 401 MB. The build succeeded in 23 seconds. Tests finished in 189 seconds: Jest reported 35,265 passed, 0 failed, and 5 skipped out of 35,270.

Using the published formatter needs no account or hosted service. The official setup installs version 3.9.6 locally and exactly, then adds a config file, an ignore file, editor integration, and prettier . --check in CI. Our 885-package result describes the contributor workspace, not a consumer package install.

Contributors at commit 5fd5b69 need Node 22 or newer and Yarn 4.18.0. The public JavaScript API is asynchronous, and unsupported languages need plugins. The repository has no Dockerfile, but it includes a tests directory and 16 CI workflow files.

Thirty-five thousand passing tests make Prettier the safe default

Prettier takes source text, parses it, and prints a normalized representation. That removes most hand-formatting choices while preserving the program represented by the syntax tree. Core support spans JavaScript, TypeScript, Flow, JSX, JSON, CSS, SCSS, Less, HTML, Vue, Angular, GraphQL, Markdown, and YAML.

The source behind that command is substantial. Our checkout at commit 5fd5b69 contained 9,426 files and about 172,632 lines of source in 24.8 MB. It includes parsers, printers, plugins, CLI and browser builds, documentation, fixtures, snapshots, and release tooling.

The frozen option set is the product decision

Prettier works best when a team wants formatting arguments to end. Its option philosophy says formatting-related options are frozen, and requests to preserve input layout such as line breaks will be closed. Existing switches cover compatibility and a small set of historical choices. Teams seeking exact control over wrapping or alignment will fight the tool.

Our run gives confidence in the behavior at this commit: 35,265 tests passed, 0 failed, and 5 were skipped out of 35,270. That does not mean every reader will like the output. It means a large set of parser and printer expectations stayed consistent in the project suite.

What happened when we ran it

Our sandbox installed 885 Yarn packages in 38 seconds and used 401 MB on disk. The build succeeded in 23 seconds. Those numbers describe the contributor workspace, which builds parsers, packages, the standalone bundle, and supporting material. We did not measure a separate consumer installation of the published prettier package.

The Jest run completed in 189 seconds with 35,265 passed, 0 failed, and 5 skipped. The repository had a tests directory and 16 CI workflow files, while no Dockerfile was present. Install, build, and the full available test command all succeeded in the same unprivileged 3-CPU, 8 GB container.

Pin version 3.9.6 before enabling save hooks

Prettier's install guide recommends a local, exact dependency and currently shows version 3.9.6. An unpinned npx or bunx invocation may download a newer release whose output differs. Add a config file, define .prettierignore, and make editor extensions use the project's local copy.

Format the codebase once in a dedicated change, then add prettier . --check to CI and optional write hooks for staged files. Our source build and test took 212 seconds after the 38-second install. Consumer repositories check their own files, a different workload that needs its own timing.

Programmatic users must accept asynchronous APIs and plugins

All public JavaScript APIs are asynchronous. format, check, configuration resolution, file inspection, and support discovery return promises. Callers can provide a parser or pass a filepath for inference. A separate @prettier/sync package exists for callers that cannot become asynchronous.

At commit 5fd5b69, source contributors needed Node 22 or newer and Yarn 4.18.0. Languages outside core support arrive through plugins. API users may have to pass plugin objects or paths when file inference cannot identify a parser, moving compatibility partly to another maintainer.

An open 3.9.6 issue shows why idempotency fixtures matter

Formatter output should settle after one pass. Open issue 19955 demonstrates a Prettier 3.9.6 arrow-function example with comments whose second output differs from the first. The case is unusual and has active discussion. Code generators and comment-heavy codebases should run representative fixtures twice when upgrading.

GitHub recorded the last push on August 30, 2026, and release 3.9.6 was published on July 21. The repository had 52,229 stars, 1,155 open issues, and 260 open pull requests. Those queues include old requests, language edge cases, dependency tracking, and patches. Recent activity, 16 workflows, and the passing suite show current maintenance.

Prettier formats code; it does not replace linting or codemods

Prettier settles layout. It does not find unused variables, enforce application rules, repair types, or prove that code is secure. The docs recommend disabling lint rules that conflict with formatting. For source transformations, the API guide warns that modified AST nodes can have stale location data and points authors toward jscodeshift.

Our 35,265 passing tests support confidence in parsing and printing across the documented formats. ESLint or another analyzer can own semantics while Prettier owns layout. Biome is attractive when combining those jobs reduces tool overhead. dprint is the better comparison when the requirement is control over formatter behavior.

Adopt Prettier when consistency matters more than personal style

For most JavaScript or TypeScript teams, the answer is yes. Install an exact local version, format one deliberate migration, connect the editor to that copy, and make CI check the result. Test generated code and parser-edge syntax during upgrades. The 38-second source install and zero-failure suite also make contributor setup credible.

Walk away when the team intends to preserve hand-shaped line breaks or demands new style switches. Also reconsider it when synchronous embedding is mandatory or the main language depends on a poorly maintained plugin. Prettier is mature precisely because it limits what formatting choices remain open.

Alternatives

ProjectWhat it isPick it when
Biome gh↗A formatter and linter delivered as one web-project toolchain.pick this instead when one fast binary should handle both formatting and linting for supported web languages.
dprintA configurable formatting platform built around language plugins.pick this instead when plugin composition and more formatting control matter more than Prettier's single house style.
Oxc gh↗A Rust-based JavaScript toolchain that includes the oxfmt formatter.pick this instead when JavaScript-focused tooling speed matters and you can accept a younger formatter.

What people are saying

  1. [github-trending] prettier/prettier

Sources

  1. Prettier README
  2. Prettier installation guide
  3. Prettier option philosophy
  4. Prettier API guide
  5. Open idempotency issue 19955
  6. Prettier 3.9.6 release

More dev tools reviews

workmux · v2rayNG · SecLists · hashcat · eslint · fastfetch · the whole board →