-
Notifications
You must be signed in to change notification settings - Fork 270
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
Make it ES5 compliant #7
Comments
could this not be handled by babel if required? |
It could, yeah, but we shouldn't make things more complex :) I mean, if we can do without babel, it'd be better. |
it's been a while since i've published web-facing JS... are there any tools I can use to validate my npm package is es5-compliant? |
There was an ESLint plugin, but I didn't have the best experience when I used it a long time ago. So maybe now it's been improved https://www.npmjs.com/package/stylelint-no-unsupported-browser-features That being said, since the code isn't much, I can help if you need me. The .browserslistrc approach is the safest one, though, so that we have autoprefixer also if needed later. Although, from a quick look, the CSS is quite simple, so maybe only the JS part needs some love :) |
Err, I meant https://github.com/amilajack/eslint-plugin-compat |
Actually, scratch that. I don't think ES5 is needed https://caniuse.com/#feat=custom-elementsv1, right? In that case, maybe there should be some feature checking? |
I would not publish custom elements as ES5. Since custom elements extend HTMLElement and must do a proper It's much better to let consumers compile to old JS if they need to for their browser support requirements. |
Yea, ES6 is required to properly publish Web Components. Distributing something older hinders the integration and performance. Why did you initially request ES5 compatibility? What was the driving context that deemed ES5 a necessity? |
I hadn't actually read the code :) |
Welcome back @paulirish 😄 |
No description provided.
The text was updated successfully, but these errors were encountered: