Prettier 3.8.1
Playground link
Input:
This is a prettier test case at
|
type A1 = | /** |
|
* octahedralRhinocerosTransformer |
|
*/ |
|
a |
|
| (b | c); |
type A1 = | /**
* octahedralRhinocerosTransformer
*/
a
| (b | c);
Output:
type A1 =
| /**
* octahedralRhinocerosTransformer
*/
a
| (b | c);
Expected output:
type A1 =
| /**
* octahedralRhinocerosTransformer
*/
a
| (b | c);
Why?
Both the JSDoc comment and a should align with the other union type.
Prettier 3.8.1
Playground link
Input:
This is a prettier test case at
prettier/tests/format/typescript/union/comments/18389.ts
Lines 1 to 5 in 812a4d0
Output:
Expected output:
Why?
Both the JSDoc comment and
ashould align with the other union type.