Don't trailing generic comma when format tsx file when `trailingComma: never`
NWYLZW opened this issue · 3 comments
NWYLZW commented
Describe the bug
dprint-plugin-typescript version: 0.90.3
Input Code
[].filter(<T,>() => false)
Expected Output
[].filter(<T,>() => false)
Actual Output
[].filter(<T>() => false)
dsherret commented
NWYLZW commented
Yes, I selected the .tsx
, but I had configured trailingCommon
as never
in playground link.
According to the semantics of tsx, the comma here has a special purpose and should not be removed by dprint. However, dprint removed it.
I think this might require special handling logic here, but to be honest, it feels a bit complicated.
dsherret commented
Yes, I selected the .tsx, but I had configured trailingCommon as never
That's the key piece of missing information.