Prettier v3.9.4
Playground link
Input:
// --- OK ---
var b = [
/*c*/
]
type B = [
/*c*/
]
// --- NG? ---
var a = {
/*c*/
}
type A = {
/*c*/
}
Output:
// --- OK ---
var b = [/*c*/];
type B = [/*c*/];
// --- NG? ---
var a = {/*c*/};
type A = { /*c*/ };
Expected output:
// --- OK ---
var b = [/*c*/];
type B = [/*c*/];
// --- NG? ---
var a = {/*c*/};
type A = {/*c*/};
Why?
Having a space inside the braces only for the object type seems inconsistent.
(Or is it intended? #19287 👀)
Prettier v3.9.4
Playground link
Input:
Output:
Expected output:
Why?
Having a space inside the braces only for the object type seems inconsistent.
(Or is it intended? #19287 👀)