Prettier is an opinionated code formatter that parses source code and reprints it using consistent formatting rules, including automatic line wrapping based on maximum line length. It supports many languages such as JavaScript, TypeScript, CSS (SCSS, Less), HTML (Vue, Angular), GraphQL, JSON, Markdown, and YAML, and can be used via editor integrations, pre-commit hooks, or in CI to standardize code style.
Project status
- Actively maintained. The upstream push was on 2026-07-22, and the repository shows multiple recent updates (3.9.1 to 3.9.6) within about a month.
- Update cadence appears steady and fast for a formatter, with at least 4 patch/minor updates from 2026-06-26 through 2026-07-21, suggesting frequent ongoing work rather than a long gap.
AI summary generated
Recent updates
3.9.6
Prettier 3.9.6 adds a new official plugin, @prettier/plugin-yuku, and includes TypeScript parsing improvements (preserving quotes for methods named "new", and support for `import defer`). The code diff also shows several additional formatting and parsing behavior changes across CSS, SCSS, JS parsers, and TypeScript handling that are not mentioned in the release notes.
Features3.9.5
Prettier 3.9.5 is a patch release focused on formatting correctness across Markdown, CSS/Less, TypeScript/JavaScript comments, Flow, and Angular control flow printing. The included CHANGELOG entry list mostly matches the code changes shown in the diff, but there are a few significant behavior changes in CSS parsing and HTML display rules that do not appear in the provided release note content.
3.9.4
Prettier 3.9.4 updates Angular control flow block formatting so that `@content(name)` is printed as `@content (name)` to match the spacing style of other block syntaxes. The change is implemented in the Angular control flow printer and is reflected in updated formatter tests and changelog entries.
3.9.3
Prettier 3.9.3 fixes a Markdown liquid-syntax formatting issue where characters could be unexpectedly removed at certain boundaries. It also updates the TypeScript parser behavior so decorators can be used with TypeScript `declare` on class fields without triggering a Babel parser error.
3.9.1
Prettier 3.9.1 is a small patch release with a single documented CLI fix: correcting behavior where ignored files could be cached incorrectly. The release notes only mention this CLI change.
3.9.0
Prettier 3.9.0 release notes provided in the prompt are extremely high level, only stating “Major parser upgrades and Formatting improvements.” The code diff shown indicates substantial repository and developer-workflow changes, plus multiple newly added unreleased changelog entries covering user-facing parser and CLI behavior.
Features3.8.5
Prettier 3.8.5 updates the Flow printer to handle variance annotations more robustly. The release notes call out adding support for `readonly` variance annotations, fixing cases where formatting would fail.
3.8.4
Prettier 3.8.4 ships a Markdown/MDX formatting fix for list spacing, specifically preventing blank lines between list items and their nested sub-lists from being removed. The code change adjusts the Markdown printer’s hardline/blank-line decision logic so loose lists are not unintentionally converted into tight lists.
3.8.3
Prettier 3.8.3 ships a SCSS-specific formatting fix for the `if()` function, preventing Prettier from introducing a trailing comma in certain `if(sass(condition): value; else: value)` constructs. The release notes only mention this SCSS change, while the code diff also includes dependency upgrades and a broader SCSS detection tweak.
3.8.2
Prettier 3.8.2 ships with support for Angular v21.2. The code changes focus on Angular-specific formatting improvements, including new handling for Angular control flow syntax (exhaustive switch checks). It also bumps several Angular parser/compiler dependencies to match the supported Angular version.
Features3.8.1
Prettier 3.8.1 primarily updates TypeScript plugin typings so that plugin modules expose a typed `printers` export instead of leaving it untyped or missing. The release notes only mention this change explicitly, and the code diff shows the typing generation logic was expanded to include printer type declarations wherever a plugin provides them.
Features3.8.0
Prettier 3.8.0 adds support for Angular v21.1. The code diff shows multiple Angular-specific formatting improvements (control flow, expressions, and Markdown embedded formatting), alongside internal release-script changes.
BreakingFeatures3.7.4
Prettier 3.7.4 documents formatting fixes for LWC interpolation quoting and two TypeScript union type comment rendering bugs. However, the code diff shows several additional changes beyond the release notes, mostly around the build system internals (module export shape during bundling, evaluation logic), plus a few dependency and tooling/version bumps.
3.7.3
Prettier 3.7.3 is a targeted patch release that addresses a regression where `prettier.getFileInfo()` broke VSCode extension plugin loading. The change is primarily an internal refactor around how `getFileInfo` loads builtin and configured plugins, with follow-on adjustments in CLI call sites.
3.7.2
Release 3.7.2 documents three targeted formatting fixes: switching quote handling in JavaScript string printing, preserving quotes for embedded HTML attribute values, and fixing comment placement for empty TypeScript type literals. The code changes for those documented items are present in the diff. However, the diff also includes additional JavaScript formatting logic changes and dependency bumps that are not mentioned in the release notes.
3.7.1
Prettier 3.7.1 is a small patch release focused on fixing a performance regression in the document printer when formatting large files. The release notes only mention the doc printer performance fix.
3.7.0
Prettier 3.7.0 introduces several plugin API enhancements around preprocessing, comment attachment, and ignored-node printing, plus some tooling and build-related updates. However, the provided release notes content contains no actual change descriptions (only external links), so the main changes are only visible from the code diff. Most user-visible items in the diff are additive, but there is at least one potential compatibility risk around the callback signature for `plugin.printer.canAttachComment`.
Features3.6.2
Prettier 3.6.2 includes a Markdown formatting fix intended to add a missing blank line around code blocks. The diff also shows a wider set of changes, including updates to parsing-related dependencies (Babel, Flow, OXC) and corresponding test/diagnostic updates.