Prettier 2.5.0
Playground link
--parser typescript
--print-width 120
--trailing-comma all
Input:
type aabbccdd<a> = []
type kjhudifkalmcnf<obj extends Record<string, unknown>, aaddffgg extends string[] = aabbccdd<obj>> = aaddffgg extends []? never: never
Output:
type aabbccdd<a> = [];
type kjhudifkalmcnf<obj extends Record<string, unknown>, aaddffgg extends string[] = aabbccdd<obj>> = aaddffgg extends [
,
]
? never
: never;
Expected behavior:
like:
type aabbccdd<a> = [];
type kjhudifkalmcnf<
obj extends Record<string, unknown>,
aaddffgg extends string[] = aabbccdd<obj>
> = aaddffgg extends [] ? never : never;
It seems to be related to the length.
This problem only occurs when the print-width is 120 and the length of the identifier is exactly this length.
In addition, it outputs on my computer as:

Prettier 2.5.0
Playground link
Input:
Output:
Expected behavior:
like:
It seems to be related to the length.

This problem only occurs when the
print-widthis 120 and the length of the identifier is exactly this length.In addition, it outputs on my computer as: