dprint-plugin-typescript
dprint-plugin-typescript copied to clipboard
Enforce consistent style for multi line, multi argument function calls
I would like to enforce the following:
func(
{
a: 1,
b: 2,
},
{ c: 3 },
)
And disallow the following, where the 2 consecutive arguments share the same line:
func({
a: 1,
b: 2,
}, {
c: 3
})
Currently to achieve the former I need to explicitly add a new line after the opening paren (and before the first opening brace). It’s fine when writing new code, however when converting large existing code bases with inconsistent style means a lot of manual adjustments. It would be great if this could be enforced for any multi line call with more than one arguments.
Similarly for array literals with elements being object or array literals.
Thanks!
Lol, looks like I made a duplicate of my own issue 😂