Skip to content

Commit 636aaa0

Browse files
bergmeisterChristoph Bergmeister
and
Christoph Bergmeister
authored
Expose new formatter setting powershell.codeFormatting.useConstantStrings (disabled by default) for new rule AvoidUsingDoubleQuotesForConstantString (disabled by default) added in PSSA 1.19.1 (#2831)
Co-authored-by: Christoph Bergmeister <[email protected]>
1 parent baec7fb commit 636aaa0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

package.json

+5
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,11 @@
826826
"default": true,
827827
"description": "Align assignment statements in a hashtable or a DSC Configuration."
828828
},
829+
"powershell.codeFormatting.useConstantStrings": {
830+
"type": "boolean",
831+
"default": false,
832+
"description": "Use single quotes if a string is not interpolated and its value does not contain a single quote."
833+
},
829834
"powershell.codeFormatting.useCorrectCasing": {
830835
"type": "boolean",
831836
"default": false,

src/settings.ts

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export interface ICodeFormattingSettings {
5858
trimWhitespaceAroundPipe: boolean;
5959
ignoreOneLineBlock: boolean;
6060
alignPropertyValuePairs: boolean;
61+
useConstantStrings: boolean;
6162
useCorrectCasing: boolean;
6263
}
6364

@@ -185,6 +186,7 @@ export function load(): ISettings {
185186
trimWhitespaceAroundPipe: false,
186187
ignoreOneLineBlock: true,
187188
alignPropertyValuePairs: true,
189+
useConstantStrings: false,
188190
useCorrectCasing: false,
189191
};
190192

0 commit comments

Comments
 (0)