-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Bug(typescript-estree): always parse mts/mjs as ESM for non-type-aware parsing #9101
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
Comments
@typescript-eslint/typescript-estree
should support TLA in .mts
file@typescript-eslint/typescript-estree
should support top-level await in .mts
file
@typescript-eslint/typescript-estree
should support top-level await in .mts
file@typescript-eslint/typescript-estree
should support top-level await (TLA) in .mts
file
Editing the title because it took me a moment to figure this out. 😄 |
@typescript-eslint/typescript-estree
should support top-level await (TLA) in .mts
file
I tried to fix this issue! See #9121. |
Uh oh! @goldentrash, the image you shared is missing helpful alt text. Check #9101 (comment). Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.
|
In I tried modifying the sourceFile in It appears that before |
This comment was marked as outdated.
This comment was marked as outdated.
In The Interface annotation says "Controls the format the file is detected as", so I was expecting that, but modifying the |
This comment was marked as outdated.
This comment was marked as outdated.
Hi @fisker! I updated the PR to find a new way to do this because my original suggestion was unacceptable, and the new way I found was to modify The reason I initially thought it was inappropriate to modify However, while analyzing the typesciprt code to find a new way, I found that it is very easy to create an See PR's comment for more details. |
Hi! I'm always ready to update the PR if I need to change my solution to fix this bug! |
Before You File a Bug Report Please Confirm You Have Done The Following...
Relevant Package
typescript-estree
Playground Link
No response
Repro Code
ESLint Config
tsconfig
Expected Result
The expression should be
AwaitExpression
instead ofCallExpression
.Actual Result
As described above.
Additional Info
No response
Versions
@typescript-eslint/typescript-estree
7.8.0
TypeScript
5.4.5
node
20
The text was updated successfully, but these errors were encountered: