Commit 59811bd
committed
style(compat-eslint): unify typescript import to namespace form
`lib/ts-scope-manager.ts` was the only file using
`import ts = require('typescript')` while the other three lib
files used `import * as ts from 'typescript'`. Both forms work
for the `export = ts` shape under `module: Node16`, but `ts` is
only ever used as a namespace (`ts.SyntaxKind`, `ts.factory`,
etc.) — `import * as` reads more naturally for that.
The remaining `import = require` (`CodePathAnalyzer`) stays as is
— CPA is used as a constructor, not a namespace, so the bare-
value form is the right shape there.1 parent 8d4e08f commit 59811bd
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
0 commit comments