Skip to content

Default import requires typescript-estree dependents to have esModuleInterop: true in tsconfg #1153

@sandersn

Description

@sandersn

createWatchProgram has import ts from 'typescript' which requires esModuleInterop: true in the tsconfig of any dependent of typescript-estree.

Typescript doesn't actually have a default export, but a commonjs one. One of these syntaxes would work:

import * as ts from 'typescript'
// or
import ts = require('typescript')

Typescript's nightly user test suite exposed this problem, because it compiles prettier with allowJs/checkJs on, but not esModuleInterop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghas prthere is a PR raised to close thispackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions