You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I am looking for a improvment on the current formatting tools by adding a whitespace after open bracket and before closing non empty curly brackets like :
#Actual$emptyHash=@{ } # an empty Hash$myHash=@{foo="bar"}
#Expected$emptyHash=@{} # an empty Hash$myHash=@{ foo="bar" } #whitespace after `{ `and before ` }`
Additional information:
I use the PowerShell extension on VS Code to format automaticaly my code on save.
@Joe-Tux You will be pleased that currently there is already the open PR #1092 that will take care of the whitespace inside curly braces and I'also double checked that it also includes hashtables as well.
There is now a space added before the right brace but not after the left brace.
I have to say I disagree with the OP though. To me, a hashtable literal seems closer to an array literal than a script block, so if @(1, 2, 3) is valid formatting then why not @{foo = "bar"}? However, I realize that is a matter of opinion. Either @{foo = "bar"} or @{ foo = "bar" } is better than @{foo = "bar" } which is what you get now.
Hello
I am looking for a improvment on the current formatting tools by adding a whitespace after open bracket and before closing non empty curly brackets like :
Additional information:
I use the PowerShell extension on VS Code to format automaticaly my code on save.
My settings.json file:
This feature exist on other language :
microsoft/TypeScript#9613 (comment)
Regards,
The text was updated successfully, but these errors were encountered: