-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add eslint #250
Add eslint #250
Conversation
Does the I think we include polyfills for |
Yes for now it just removes the errors. I think we need to fix some of the errors. Here is the full list:
|
@nrenner the only polyfill I found was one way could be to use https://polyfill.io/v3/url-builder/ like https://polyfill.io/v3/polyfill.min.js?features=Number.parseFloat%2CMath.trunc%2CSymbol.iterator |
Fixing could mean either to polyfill/... or to restrict supported browsers, e.g. I think we could drop IE 10 (0.04% usage according to Can I use...). The big question probably is if IE 11 (2.04%) should still be supported. To my surprise I noticed some time ago, that we currently don't (because of a few errors). I added the polyfills manually and individually:
|
I think it would make sense to migrate to webpack so that it can take care of polyfills for us. In the mean time, I believe we are good for half of them:
|
So I've tested a bit current master and:
I believe we have to migrate to babel/webpack to ensure compatibility in the future. |
7eece44
to
f4285f3
Compare
I continued but there are actually errors in third parties code too ( |
I like that is shows where we stand and that it's already a bit of a mess. It will at least help to preserve the current state and not make it worse for now. Webpack is the goal (I suppose), but I hope to get a release ready soon and I wouldn't want to introduce Webpack before that. I also think that IE 11 has not been working for quite some time, so no pressure to fix it now. But I would like to merge the fixes you made so far before a release. I'm totally fine with merging this as is. We can see what to do with the open issues / Webpack later. So is this ready to merge from your point of view? |
eslint-plugin-compat does less than I expected:
|
It also failed to detect the usage of |
Anyway it should be good to be merged as-is :). |
Thanks! |
- with var instead of const all callbacks referenced last value in loop, add closure - cloning by property overwrites default when undefined, use L.extend for Object.assign
Closes #188
There is a bunch of errors yet, not sure what to do with them for now:
"polyfills": ["URLSearchParams", "Symbol.iterator", "Promise", "fetch", "Math", "Number", "navigator"]