Skip to content

Commit 17c956e

Browse files
authored
fix(typescript-estree): don't use typescript's synthetic default (typescript-eslint#1156)
Fixes typescript-eslint#1153
1 parent 5338955 commit 17c956e

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

packages/typescript-estree/src/create-program/createDefaultProgram.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import debug from 'debug';
22
import path from 'path';
3-
import ts from 'typescript';
3+
import * as ts from 'typescript'; // leave this as * as ts so people using util package don't need syntheticDefaultImports
44
import { Extra } from '../parser-options';
55
import {
66
getTsconfigPath,

packages/typescript-estree/src/create-program/createIsolatedProgram.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import debug from 'debug';
2-
import ts from 'typescript';
2+
import * as ts from 'typescript'; // leave this as * as ts so people using util package don't need syntheticDefaultImports
33
import { Extra } from '../parser-options';
44
import { ASTAndProgram, DEFAULT_COMPILER_OPTIONS } from './shared';
55

packages/typescript-estree/src/create-program/createSourceFile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import debug from 'debug';
2-
import ts from 'typescript';
2+
import * as ts from 'typescript'; // leave this as * as ts so people using util package don't need syntheticDefaultImports
33
import { Extra } from '../parser-options';
44

55
const log = debug('typescript-eslint:typescript-estree:createIsolatedProgram');

packages/typescript-estree/src/create-program/createWatchProgram.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import debug from 'debug';
22
import fs from 'fs';
33
import path from 'path';
4-
import ts from 'typescript';
4+
import * as ts from 'typescript'; // leave this as * as ts so people using util package don't need syntheticDefaultImports
55
import { Extra } from '../parser-options';
66
import { WatchCompilerHostOfConfigFile } from './WatchCompilerHostOfConfigFile';
77
import {

packages/typescript-estree/src/create-program/shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import path from 'path';
2-
import ts from 'typescript';
2+
import * as ts from 'typescript'; // leave this as * as ts so people using util package don't need syntheticDefaultImports
33
import { Extra } from '../parser-options';
44

55
interface ASTAndProgram {

0 commit comments

Comments
 (0)