Skip to content

Commit

Permalink
fix(typescript-estree): ensure parent pointers are set (#1129)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradzacher committed Oct 25, 2019
1 parent 5ae286e commit d4703e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Expand Up @@ -3,7 +3,7 @@ import fs from 'fs';
import path from 'path';
import ts from 'typescript';
import { Extra } from '../parser-options';
import { WatchCompilerHostOfConfigFile } from '../WatchCompilerHostOfConfigFile';
import { WatchCompilerHostOfConfigFile } from './WatchCompilerHostOfConfigFile';
import {
canonicalDirname,
CanonicalPath,
Expand Down Expand Up @@ -160,7 +160,13 @@ function getProgramsForProjects(

if (fileList.has(filePath)) {
log('Found existing program for file. %s', filePath);
return [updatedProgram || existingWatch.getProgram().getProgram()];

updatedProgram =
updatedProgram || existingWatch.getProgram().getProgram();
// sets parent pointers in source files
updatedProgram.getTypeChecker();

return [updatedProgram];
}
}
log(
Expand Down

0 comments on commit d4703e1

Please sign in to comment.