Prettier 1.18.0
Playground link
--parser typescript
--trailing-comma es5
Input:
function foo (args: [
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string
]) {}
Output:
function foo(
args: [
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
]
) {}
Expected behavior:
According to the PR at #6172, this should only be applied when the trailing comma is all but it also gets applied when it's set to es5.
Secondly because we were on TS 3.2 (we can't upgrade get because we're on an older angular version) this broke our build as TS 3.2 can't parse the output. I think the TS version could be read by prettier and then used to determine whether to apply this transformation.
Prettier 1.18.0
Playground link
Input:
Output:
Expected behavior:
According to the PR at #6172, this should only be applied when the trailing comma is
allbut it also gets applied when it's set toes5.Secondly because we were on TS 3.2 (we can't upgrade get because we're on an older angular version) this broke our build as TS 3.2 can't parse the output. I think the TS version could be read by prettier and then used to determine whether to apply this transformation.