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
Parsing error: Unexpected token import #13042
Comments
Hi @Fi1osof, thanks for the issue! import.meta proposal is currently in stage 3. ESLint's default parser will support this syntax if and when it reaches stage 4. In the meantime, you can use a parser that supports experimental syntax, like babel-eslint. |
@mdjermanovic thanks! |
Is there extra process for adding support for new syntax or is this something a contributor could help with? Would love to avoid the extra parser dependencies! |
Oh, sorry, just found #13133 which has this covered :) |
Closing this issue since we are tracking progress in #13133 |
Origin: microsoft/vscode-eslint#908
const moduleURL = new URL(import.meta.url);
This is valid code for .mjs https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Statements/import.meta
But i got eslint error and can not disable this.
What parser (default, Babel-ESLint, etc.) are you using?
Pure node-js
The text was updated successfully, but these errors were encountered: