8000 fix(typescript-estree): ensure parents are defined during subsequent … · andersk/typescript-eslint@665278f · GitHub
[go: up one dir, main page]

Skip to content

Commit 665278f

Browse files
uniqueiniquitybradzacher
authored andcommitted
fix(typescript-estree): ensure parents are defined during subsequent parses (typescript-eslint#500)
1 parent d52a683 commit 665278f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/typescript-estree/src/tsconfig-parser.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ export function calculateProjectParserOptions(
8989

9090
if (typeof existingWatch !== 'undefined') {
9191
// get new program (updated if necessary)
92-
results.push(existingWatch.getProgram().getProgram());
92+
const updatedProgram = existingWatch.getProgram().getProgram();
93+
updatedProgram.getTypeChecker(); // sets parent pointers in source files
94+
results.push(updatedProgram);
95+
9396
continue;
9497
}
9598

0 commit comments

Comments
 (0)
0