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
Non-top-level import
s are basically part of the ES6 specs, take out warning
#11708
Comments
import
s are basically part of the ES6 specsimport
s are basically part of the ES6 specs, take out warning
Hi, thanks for creating an issue. Dynamic import is still a stage 3 proposal, so we don't support it yet. Based on the link you shared, it seems like it will probably reach stage 4 soon, which is great news. As with all other features, we'll start supporting it once it reaches stage 4. |
From the horse's mouth: "I expect it to happen at the upcoming tc39 meeting June 4,5,6 2019" Is a PR ready for it? (maybe one of the ones that was rejected because it wasn't stage 4 yet?) |
@mercmobily If this is really likely to make stage 4, contributions would be great! Here's a (likely incomplete) list of what would be needed:
My suggestion is to start upstream and see what's in place already, then work down to ESLint. Some of the upstream repositories might be willing to accept PRs early. Hope this helps! |
Hi, OK, let's do this! "Is there an ESTree spec for this? (I hope the tc39 champion would write a PR there, but worth checking.)" YES. It looks merged too. estree/estree#137 "Does Acorn support this? If not, need to ensure Acorn can parse. (Best would be if it happened in mainline Acorn, but if they are unlikely to get it in soon, espree could maybe consume an Acorn plugin- see next.)" YES. It does so via a Acorn plugin for dynamic imports. I opened a ticket to see if they will move the dynamic imports plugin to the main codebase For the last 2 points... does it all relate to Eslint's codebase? Merc. |
I would make the umbrella issue for ES2020 after the next TC39 meeting if the syntaxes really arrived at Stage 4, like I have done so in the past.
It's in the experimental directory that ESLint core doesn't support. It's needed to move it to the
Yes.
|
Hi. Please track #11803. |
What rule do you want to change?
"Import and export may only appear at the top level" (sorry, can't find the ID)
This is because now, in 2019,
import()s
are pervasively used, and basically part of the specs -- the last comment in particular from yesterday reads "Investigated. Discussed in the SES meeting today. We are happy to see this proceed to stage 4."Does this change cause the rule to produce more or fewer warnings?
Fewer.
How will the change be implemented? (New option, new default behavior, etc.)?
Disable a rule when linting ES6
Please provide some example code that this change will affect:
What does the rule currently do for this code?
Gives a warning
What will the rule do after it's changed?
Stop giving the warning
Are you willing to submit a pull request to implement this change?
Sorry, I don't know eslint's code base at all
The text was updated successfully, but these errors were encountered: