Support Dynamic Import
See original GitHub issueThe version of ESLint you are using. Latest
The problem you want to solve. I want to use ESLint and Webpack without babel-ESLint, but due to the lack of support for dynamic import, which Webpack uses to determine where to split code, I must use babel-eslint where I would otherwise be happy without transpiling.
Your take on the correct solution to problem. According to https://github.com/eslint/eslint#what-about-experimental-features, it states:
ESLint’s parser only officially supports the latest final ECMAScript standard. We will make changes to core rules in order to avoid crashes on stage 3 ECMAScript syntax proposals (as long as they are implemented using the correct experimental ESTree syntax)
I believe this is a case that warrants an exception to this rule given the prominence of import
in otherwise bland es5 code due to Webpack. import
is stage 3, fully 262 tested, battle tested in all browsers, mandated by the html standard and firmly ensconced in the bundling ecosystem.
The proposed fix is to support dynamic support in ESLint now ahead of stage 4, especially considering it has an unknown timeline to advance to stage 4.
Are you willing to submit a pull request to implement this change? Yes 😃
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:17 (14 by maintainers)
Top GitHub Comments
import()
has reached stage-4, seems we can support it now!The difference, however, is that this one is shipped in almost all the browsers, which imo makes it objectively, not subjectively, important.