File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -213,9 +213,14 @@ function getProjectSync(pathOrSrcFile) {
213
213
catch ( ex ) {
214
214
throw errorWithDetails ( new Error ( exports . errors . GET_PROJECT_JSON_PARSE_FAILED ) , { projectFilePath : fsu . consistentPath ( projectFile ) , error : ex . message } ) ;
215
215
}
216
+ if ( ! projectSpec . atom ) {
217
+ projectSpec . atom = {
218
+ rewriteTsconfig : true ,
219
+ } ;
220
+ }
216
221
if ( projectSpec . filesGlob ) {
217
222
var prettyJSONProjectSpec = prettyJSON ( projectSpec , detectIndent ( projectFileTextContent ) . indent ) ;
218
- if ( prettyJSONProjectSpec !== projectFileTextContent && projectSpec . atom && projectSpec . atom . rewriteTsconfig ) {
223
+ if ( prettyJSONProjectSpec !== projectFileTextContent && projectSpec . atom . rewriteTsconfig ) {
219
224
fs . writeFileSync ( projectFile , prettyJSONProjectSpec ) ;
220
225
}
221
226
}
Original file line number Diff line number Diff line change @@ -396,10 +396,17 @@ export function getProjectSync(pathOrSrcFile: string): TypeScriptProjectFileDeta
396
396
new Error ( errors . GET_PROJECT_JSON_PARSE_FAILED ) , { projectFilePath : fsu . consistentPath ( projectFile ) , error : ex . message } ) ;
397
397
}
398
398
399
+ /** Setup defaults for atom key */
400
+ if ( ! projectSpec . atom ) {
401
+ projectSpec . atom = {
402
+ rewriteTsconfig : true ,
403
+ }
404
+ }
405
+
399
406
if ( projectSpec . filesGlob ) { // for filesGlob we keep the files in sync
400
407
var prettyJSONProjectSpec = prettyJSON ( projectSpec , detectIndent ( projectFileTextContent ) . indent ) ;
401
408
402
- if ( prettyJSONProjectSpec !== projectFileTextContent && projectSpec . atom && projectSpec . atom . rewriteTsconfig ) {
409
+ if ( prettyJSONProjectSpec !== projectFileTextContent && projectSpec . atom . rewriteTsconfig ) {
403
410
fs . writeFileSync ( projectFile , prettyJSONProjectSpec ) ;
404
411
}
405
412
}
You can’t perform that action at this time.
0 commit comments