Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sandersn opened this issue Oct 28, 2019 · 0 comments · Fixed by #1156
Closed
Labels
bug Something isn't working has pr there is a PR raised to close this package: typescript-estree Issues related to @typescript-eslint/typescript-estree

Comments

@sandersn
Copy link
Contributor

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.

@sandersn sandersn added package: typescript-estree Issues related to @typescript-eslint/typescript-estree triage Waiting for maintainers to take a look labels Oct 28, 2019
@bradzacher bradzacher added bug Something isn't working has pr there is a PR raised to close this and removed triage Waiting for maintainers to take a look labels Oct 29, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working has pr there is a PR raised to close this package: typescript-estree Issues related to @typescript-eslint/typescript-estree
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants