-
Notifications
You must be signed in to change notification settings - Fork 799
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
Building Tools: add build-time ES5 validation to build #13693
Comments
I wonder if this would make it possible to remove forced |
That would be neat, I have no idea how feasible it is. As far as I know, IE11 isn't the biggest issue here as it has a known set of limitations even in terms of full ES5 support. There are also other browsers which are popular and have to be supported. If you know how to solve it, feel free to open PR. |
https://github.com/Volox/eslint-plugin-ie11 looks promising:
https://github.com/amilajack/eslint-plugin-compat seems even better and relies on browserslist:
|
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation. |
Let's add at least ES5 validation for starters -- it's better to have some validation rather than none at all, to prevent things like I'll spin up a PR. |
Just heads-up that viable alternative to eslint could be using Acorn directly: acorn.parse(bundleContent, { ecmaVersion: 5 }); |
ES6+ code sometimes finds its way into the fallback build, which should only include ES5, when one of our dependencies decides to ship their package with newer syntax.
Calypso added a new build-time check that ensures no non-ES5 syntax is present in the generated fallback build, breaking the build if that's the case. It would be nice to add this to Jetpack as well. This will help us catch these issues as soon as they happen, rather than when an IE11 user reports them.
-- Automattic/wp-calypso#36596
The text was updated successfully, but these errors were encountered: