prettier
3.10.1 · 12 Nov 2026MIT196.9M / weekRepositoryHomepagenpmAtom feed
Your version
2.8.8 is the newest release of 2.x.
Release note
Fix failure on dir with trailing slash
$ ls 1.js 1.unknown # Prettier 2.3.1 $ prettier . -l 1.js $ prettier ./ -l [error] No supported files were found in the directory: "./". # Prettier 2.3.2 $ prettier ./ -l 1.js
Fix handling of parenthesis with Flow's {Optional}IndexedAccess
Add parens when required.
// Input type A = (T & S)['bar']; type B = (T | S)['bar']; type C = (?T)['bar']; type D = (typeof x)['bar']; type E = (string => void)['bar']; // Prettier 2.3.1 type A = T & S["bar"]; type B = T | S["bar"]; type C = ?T["bar"]; type D = typeof x["bar"]; type E = (string) => void["bar"]; // Prettier 2.3.2 type A = (T & S)["bar"]; type B = (T | S)["bar"]; type C = (?T)["bar"]; type D = (typeof x)["bar"]; type E = ((string) => void)["bar"];
Print override modifiers for parameter property
// Input
class D extends B {
constructor(override foo: string) {
super();
}
}
// Prettier 2.3.1
class D extends B {
constructor(foo: string) {
super();
}
}
// Prettier 2.3.2
class D extends B {
constructor(override foo: string) {
super();
}
}
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.