Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 72b5cef

Browse files
committed
Allow the default print width to be undefined so that it does not override config files
1 parent 691ab85 commit 72b5cef

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"type": "array"
6666
},
6767
"syntaxTree.printWidth": {
68-
"default": 80,
6968
"markdownDescription": "The width to be used when formatting code.",
7069
"type": "number"
7170
},
@@ -139,7 +138,8 @@
139138
"rules": {
140139
"quotes": ["error", "double"],
141140
"semi": "error"
142-
}
141+
},
142+
"ignorePatterns": ["out"]
143143
},
144144
"__metadata": {
145145
"id": "b46118f9-0f6f-4320-9e2e-75c96492b4cb",

src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ export async function activate(context: ExtensionContext) {
9292
}
9393

9494
// Configure print width.
95-
args.push(`--print-width=${config.get<number>("printWidth")}`);
95+
const printWidth = config.get<number>("printWidth");
96+
if (printWidth) {
97+
args.push(`--print-width=${printWidth}`);
98+
}
9699

97100
// There's a bit of complexity here. Basically, we try to locate
98101
// an stree executable in three places, in order of preference:

0 commit comments

Comments
 (0)