Prettier 3.10 came out on 11 November 2026, followed by 3.10.1 a day later. The headline is a new official plugin, @prettier/plugin-yuku, with two fast parsers built on the Zig-based Yuku toolchain. It also formats new Flow syntax and three JavaScript proposals, and it fixes a long list of comment and parentheses bugs. This guide shows how to try the new plugin, what the new syntax support means, and how to roll the upgrade out without a noisy diff.
What’s new at a glance
@prettier/plugin-yuku: an official plugin with ayukuparser for JavaScript and ayuku-tsparser for TypeScript. It is not bundled with Prettier because of package size, so you install it separately.- New Flow syntax from
flow-parser0.332.0: template literal and constructor types, mapped-type modifiers and key remapping, abstract and override class members, inline import types, CommonJS import/export bindings andunique symbol. - Proposal support: Structs (non-shared only), Import Sync and Deferred re-exports.
- Stability fixes: many cases where a comment moved between the first and second format run are fixed, plus missing parentheses around TypeScript instantiation expressions.
- Performance: less copying on files with many comments, no more stack overflows on very long binary expressions, and
.editorconfigreads shared acrossresolveConfig()calls. - API: config files with a UTF-8 BOM now load.
Step 1: Upgrade Prettier
npm install --save-dev --save-exact [email protected]
npx prettier --version # 3.10.1
Pinning with --save-exact is what the Prettier team recommends. Formatting output can change between minor versions, and you want every developer and CI job on the same version.
Step 2: Try the Yuku parsers
Install the plugin next to Prettier:
npm install --save-dev @prettier/plugin-yuku
Add it to your config. In .prettierrc.json:
{
"plugins": ["@prettier/plugin-yuku"]
}
Adding the plugin does not switch parsers automatically. Choose the parser explicitly, either per run or through overrides:
npx prettier --plugin=@prettier/plugin-yuku --parser yuku src/app.js
npx prettier --plugin=@prettier/plugin-yuku --parser yuku-ts src/app.ts
{
"plugins": ["@prettier/plugin-yuku"],
"overrides": [
{ "files": ["*.js", "*.mjs"], "options": { "parser": "yuku" } },
{ "files": ["*.ts"], "options": { "parser": "yuku-ts" } }
]
}
In a quick test with Prettier 3.10.1 and plugin version 0.0.3, both parsers formatted ordinary JavaScript and TypeScript the same way as the default parsers:
// input
const a = {b:1,
c:2}
// output (yuku)
const a = { b: 1, c: 2 };
Know the plugin’s limits
The plugin is very new (0.0.x), so don’t treat it as a full replacement yet. In our test, the new Structs proposal syntax formatted fine with Prettier’s default babel parser but threw a SyntaxError with the yuku parser. A sensible rollout:
- Run
prettier --checkwith the Yuku parsers on a branch and compare results with the default parsers. - Keep the default parsers for files that use experimental syntax, JSX-heavy code you haven’t tested, or Flow.
- Measure speed on your real repo before you decide. Speed is the main reason to switch, so check you actually gain some.
Step 3: New JavaScript proposals
Prettier 3.10 can format three proposals. With the default parser this now works:
struct Point {
x = 0;
y = 0;
}
export defer { parse } from "./parser.js";
const { readFile } = import.sync("node:fs");
Remember Prettier’s policy on non-standard syntax. Formatting support doesn’t mean your runtime or bundler understands this code. You still need the matching Babel or TypeScript support to run it. Treat it as “Prettier won’t crash on it”, not “it’s ready for production”.
Step 4: Flow users get a big catch-up
If you use Flow, 3.10 fixes many cases that used to throw errors, such as Missing visitor keys for 'ParameterProperty'. The flow parser can now format:
- constructor parameter properties (
constructor(public x: string) {}) in outvariance annotations- non-null assertions (
value!.prop) export as namespace- unlabeled optional tuple members (
[number?, string?]) - private fields in declared classes and declared classes that extend a mixin call
- abstract classes, mapped types with key remapping,
unique symbolandimport X = require(...)
Declaration signatures in .js.flow files are now preserved. Before, Prettier could damage them, for example by printing export default function ;.
Step 5: Fixes that change output
Most fixes only change code that Prettier used to format inconsistently. Still, expect a diff in these areas:
- Comments: comments near tagged templates,
for...ofheads,=>, decorators, member chains and destructuring now stay where you wrote them. - TypeScript parentheses: Prettier used to drop needed parentheses around instantiation expressions such as
(make<T>)!or(c ? a : b)<T>, which changed the meaning of the code. These are now kept. (a < b) > c: the parentheses are kept, for JavaScript, TypeScript and Flow.- CSS / SCSS / Less:
nth-child(+3n + 2)keeps the+attached to the number, single-item SCSS lists keep their trailing comma, and Less[$@prop]loses the extra space. - YAML: anchor and tag order is preserved, and trailing whitespace inside block scalars is kept.
- Markdown: URLs containing
<,(or\are no longer corrupted. - Angular templates: content inside
ngNonBindableis left alone, andngIfmicrosyntax keywords afterletare kept.
Step 6: Roll out the upgrade cleanly
Do the upgrade in one dedicated commit, so reviewers aren’t asked to read formatting changes mixed with real changes:
git switch -c chore/prettier-3-10
npm install --save-dev --save-exact [email protected]
npx prettier --write .
git commit -am "chore: upgrade Prettier to 3.10.1 and reformat"
Then add that commit’s hash to .git-blame-ignore-revs so git blame skips it:
git rev-parse HEAD >> .git-blame-ignore-revs
git config blame.ignoreRevsFile .git-blame-ignore-revs
Check editor integrations as well. Make sure the VS Code or JetBrains plugin uses the project’s local Prettier, not a bundled older one. Otherwise developers will keep re-formatting files back and forth.
For plugin authors
prettier.util.addTrailingComment(), addLeadingComment() and addDanglingComment() now return true instead of nothing. Comment handlers can return the call directly:
if (precedingNode?.type === "punctuation") {
return prettier.util.addTrailingComment(precedingNode, comment);
}
Takeaway
Prettier 3.10 is a safe minor upgrade with a clear payoff: more stable comments, correct TypeScript parentheses, Flow catch-up and support for new proposals. The Yuku plugin is the exciting part, but it is at version 0.0.x, so test it on a branch and keep the default parsers for experimental syntax. Pin the version, reformat in one commit and add it to .git-blame-ignore-revs. Full details: Prettier 3.10 release post.
