Skip to content

Commit bab4a52

Browse files
authored
strip comments when re-emitting tsconfig.json (microsoft#10529)
1 parent ddb5a00 commit bab4a52

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/harness/unittests/tsconfigParsing.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ namespace ts {
186186
const content = `{
187187
"compilerOptions": {
188188
"allowJs": true
189+
// Some comments
189190
"outDir": "bin"
190191
}
191192
"files": ["file1.ts"]

src/services/utilities.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,8 @@ namespace ts {
930930
const options: TranspileOptions = {
931931
fileName: "config.js",
932932
compilerOptions: {
933-
target: ScriptTarget.ES6
933+
target: ScriptTarget.ES6,
934+
removeComments: true
934935
},
935936
reportDiagnostics: true
936937
};

0 commit comments

Comments
 (0)