Skip to content

Commit a3b9caf

Browse files
Robert HoltTylerLeonhardt
Robert Holt
authored andcommitted
Add powershell.codeFormatting.autoCorrectAliases setting to add support for optionally correcting aliases as well (added in PSSA 1.18.2). Disabled by default. (#2165) (#2172)
Requires the following PSES PR to be merged first: PowerShell/PowerShellEditorServices#1021
1 parent c6087ca commit a3b9caf

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,11 @@
625625
"default": true,
626626
"description": "Shows the last line of a folded section similar to the default VSCode folding style. When disabled, the entire folded region is hidden."
627627
},
628+
"powershell.codeFormatting.autoCorrectAliases": {
629+
"type": "boolean",
630+
"default": false,
631+
"description": "Replaces aliases with their aliased name."
632+
},
628633
"powershell.codeFormatting.preset": {
629634
"type": "string",
630635
"enum": [

src/settings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export interface ICodeFoldingSettings {
4141
}
4242

4343
export interface ICodeFormattingSettings {
44+
autoCorrectAliases: boolean;
4445
preset: CodeFormattingPreset;
4546
openBraceOnSameLine: boolean;
4647
newLineAfterOpenBrace: boolean;
@@ -131,6 +132,7 @@ export function load(): ISettings {
131132
};
132133

133134
const defaultCodeFormattingSettings: ICodeFormattingSettings = {
135+
autoCorrectAliases: false,
134136
preset: CodeFormattingPreset.Custom,
135137
openBraceOnSameLine: true,
136138
newLineAfterOpenBrace: true,

0 commit comments

Comments
 (0)