-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
Unexpected token with import with type
assertion
#727
Comments
Not an XO issue:
Import attributes are not yet finalized so ESLint does not support them yet. |
It turns out this is supported by TypeScript, and XO does ship with "xo": {
"parser": "@typescript-eslint/parser"
}, Should this be documented? Or maybe become XO's default? The problem might be performance though. cc @sindresorhus |
Not sure we could do it by default (for both JS and TS files) as it could have slightly different semantics than JS. I think the best would be to simply pass the TS parser into the config when the TS config uses flat config. |
import with type
assertion
Seems like xo struggle to parse this. What can I do?
"Parsing error: Unexpected token , "
The text was updated successfully, but these errors were encountered: