Closed
Description
I often end up writing something like this, because PowerShell does not have a null coalescing operator (??):
$bar = if ($foo -eq $null) { 'none' } else { $Foo }
However, the code formatter ends up reformatting this (with powershell.codeFormatting.newLineAfterOpenBrace
set to false
):
$bar = if ($foo -eq $null) { 'none'
} else { $foo
}
IMO this should stay in the same line, could also be an option.
System Details
- VS Code version: 1.8.1
- PowerShell extension version: 0.9.0