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

import() was parsed to Identifier #1270

Closed
aladdin-add opened this issue Jan 2, 2024 · 1 comment
Closed

import() was parsed to Identifier #1270

aladdin-add opened this issue Jan 2, 2024 · 1 comment

Comments

@aladdin-add
Copy link

refs: eslint/espree#590 (comment)

an example:

async function main() {
    const foo = await import(source)
}
@marijnh
Copy link
Member

marijnh commented Jan 2, 2024

That's parsed as ImportExpression. Make sure you're using sourceType: "module" and a recent ecmaVersion.

@marijnh marijnh closed this as completed Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants