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) {
213213 catch ( ex ) {
214214 throw errorWithDetails ( new Error ( exports . errors . GET_PROJECT_JSON_PARSE_FAILED ) , { projectFilePath : fsu . consistentPath ( projectFile ) , error : ex . message } ) ;
215215 }
216+ if ( ! projectSpec . atom ) {
217+ projectSpec . atom = {
218+ rewriteTsconfig : true ,
219+ } ;
220+ }
216221 if ( projectSpec . filesGlob ) {
217222 var prettyJSONProjectSpec = prettyJSON ( projectSpec , detectIndent ( projectFileTextContent ) . indent ) ;
218- if ( prettyJSONProjectSpec !== projectFileTextContent && projectSpec . atom && projectSpec . atom . rewriteTsconfig ) {
223+ if ( prettyJSONProjectSpec !== projectFileTextContent && projectSpec . atom . rewriteTsconfig ) {
219224 fs . writeFileSync ( projectFile , prettyJSONProjectSpec ) ;
220225 }
221226 }
Original file line number Diff line number Diff line change @@ -396,10 +396,17 @@ export function getProjectSync(pathOrSrcFile: string): TypeScriptProjectFileDeta
396396 new Error ( errors . GET_PROJECT_JSON_PARSE_FAILED ) , { projectFilePath : fsu . consistentPath ( projectFile ) , error : ex . message } ) ;
397397 }
398398
399+ /** Setup defaults for atom key */
400+ if ( ! projectSpec . atom ) {
401+ projectSpec . atom = {
402+ rewriteTsconfig : true ,
403+ }
404+ }
405+
399406 if ( projectSpec . filesGlob ) { // for filesGlob we keep the files in sync
400407 var prettyJSONProjectSpec = prettyJSON ( projectSpec , detectIndent ( projectFileTextContent ) . indent ) ;
401408
402- if ( prettyJSONProjectSpec !== projectFileTextContent && projectSpec . atom && projectSpec . atom . rewriteTsconfig ) {
409+ if ( prettyJSONProjectSpec !== projectFileTextContent && projectSpec . atom . rewriteTsconfig ) {
403410 fs . writeFileSync ( projectFile , prettyJSONProjectSpec ) ;
404411 }
405412 }
You can’t perform that action at this time.
0 commit comments