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

Error when using babel-parser in dynamic imports #1041

Closed
falcoagustin opened this issue Jan 9, 2018 · 3 comments
Closed

Error when using babel-parser in dynamic imports #1041

falcoagustin opened this issue Jan 9, 2018 · 3 comments
Labels

Comments

@falcoagustin
Copy link

I'm using babel-eslint v6.1.2 along with standard v10.0.3 and I'm not able to bypass the error when doing dynamic imports, this way:

import('path/to/module').then(module => {
  //do Somthing
})

It raises error Parsing error: 'import' and 'export' may only appear at the top level. I tried using:

parsingOptions: {
    "AllowImportExportEverywhere": true
}

And still raises the error, had to ignore the file instead.

@ematipico
Copy link
Member

ematipico commented Jan 9, 2018

I don't think it's a standard related issue.
Have a look to this duplicate #751

@falcoagustin
Copy link
Author

@ematipico I agree, I should've posted on babel-eslint, but I spoke with @feross and told me to raise an issue here, if he confirms I can repost it there 😄

@feross
Copy link
Member

feross commented May 10, 2018

Using babel-eslint@8 and standard@11, I am unable to reproduce this issue. It lints import() perfectly fine as far as I can tell.

I'm going to assume that this issue has been fixed in the intervening major version releases.

@feross feross closed this as completed May 10, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants