Browser version of 5.15.x does not work in IE 11
See original GitHub issueTell us about your environment
- ESLint Version: 5.15.x
- Node Version: 11.11.0
- npm Version: 6.9.0
What did you do?
Built ESLint using
npm run webpack
and ran it in IE 11 (more precisely, in a web worker and in conjunction with the Monaco editor but that should not matter). The source code couldn’t be parsed because it contains a lot of ES2015+ syntax like const
and let
since the recent change to Webpack. The Browserify version in 5.14.x
works in IE 11.
You can get a step further by changing the Webpack config to also transpile files from node_modules
(including .mjs
files apparently) like shown below. This makes sure to transpile to ES5 but I got stuck at this stage because IE still throws the error Incorrect syntax in regular expression
. Since I saw nothing obvious in the source code I gave up at this point.
rules: [
{
test: /\.m?js$/u,
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"]
}
}
]
So the question boils down to: What browsers do you intend to support with the browser variant of ESLint?
Are you willing to submit a pull request to fix this bug? Not at the moment, sorry.
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (7 by maintainers)
Top GitHub Comments
Hm, it can in principle (Babel Regex). But I think there would be limitations for usages like
because it can’t really manipulate the content of those variables, right?
Unfortunately, it looks like there wasn’t enough interest from the team or community to implement this change. While we wish we’d be able to accommodate everyone’s requests, we do need to prioritize. We’ve found that accepted issues failing to be implemented after 90 days tend to never be implemented, and as such, we close those issues. This doesn’t mean the idea isn’t interesting or useful, just that it’s not something the team can commit to.
Thanks for contributing to ESLint and we appreciate your understanding.