Is there any way to auto format code (in VS Code) in a way that forces horizontal alignment of parentheses, braces and square brackets ?
For example :
let foo = {
a: 'a',
b: 'b',
c: 'c'
};
Must be formatted as either :
let foo = {
a: 'a',
b: 'b',
c: 'c'
};
or :
let foo = { a: 'a',
b: 'b',
c: 'c'
};
Another example :
function foo(a: string,
b: number,
c: string) {
}
Must become something like
function foo( a: string,
b: number,
c: string
)
{
}
I’ve already forced braces on new lines in the editor settings.
I’ve also looked for extensions but the closest I’ve found are extensions like this one https://marketplace.visualstudio.com/items?itemName=annsk.alignment, that sadly don’t cover braces alignement.
Thanks for your help