Be sure to set the sourceType to “module” in your config file.
On Wed, Feb 24, 2021 at 12:02 PM [email protected] <
[email protected]> wrote:
> I have the following in a JavaScript module file:
>
> var worker = new Worker(new URL('betweenness.js', import.meta.url));
>
> eslint v7.20.0 complains about the 'import' with the error:
>
> Parsing error: Unexpected token import
>
> I note from the changelog that eslint was updated to accept the 'import'
> token in v.7.2.0.
>
> What am I doing wrong (or is this a problem with eslint)?
>
> Thanks!
>
> Nigel
>
> --
> You received this message because you are subscribed to the Google Groups
> "ESLint" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/eslint/a3a43b28-d8f3-43ba-9ea1-90d0c3f67631n%40googlegroups.com
> <https://groups.google.com/d/msgid/eslint/a3a43b28-d8f3-43ba-9ea1-90d0c3f67631n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
______________________________
Nicholas C. Zakas (@slicknet <https://twitter.com/slicknet>)
Owner, Human Who Codes LLC
humanwhocodes.com
--
You received this message because you are subscribed to the Google Groups
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/eslint/CAOkd9h%3DcP5dLzP9A9YrtJkRKkpQsk5CWvNWfs5mCUVREjcvoGg%40mail.gmail.com.