Skip to content
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

Support Modern (ES6+) JavaScript #1238

Open
gavinr opened this issue Nov 4, 2020 · 4 comments
Open

Support Modern (ES6+) JavaScript #1238

gavinr opened this issue Nov 4, 2020 · 4 comments

Comments

@gavinr
Copy link
Contributor

gavinr commented Nov 4, 2020

In the source of esri-leaflet, we'd like to start using more modern JavaScript, like Object.assign(), arrow functions, template strings, let/const, etc.

I'm pretty sure that right now if we try to use any of that, it would cause the library not to work with versions of IE and per the wiki we should be supporting IE8+.

So, I'd like to propose changing build process for esri-leaflet to include a transpile step that would allow us to use some of these more modern JavaScript commands within the source, but the build process will allow the code to work with IE8+. It may be as simple as using @rollup/plugin-babel ... not quite sure. Looking for comments and input! Thanks!

@jgravois
Copy link
Contributor

jgravois commented Nov 4, 2020

It may be as simple as using @rollup/plugin-babel

definitely should be. the first commit in #1201 contains an example.

@gavinr
Copy link
Contributor Author

gavinr commented Nov 12, 2020

Related to all this: the latest standard, and thus semistandard which we use, has set to give a warning if your project uses var.
standard/standard#633 (comment) So we either need to switch to let instead of var, or be limited to a non-latest version of standard/semistandard.

@gavinr gavinr pinned this issue Jan 6, 2021
@gavinr
Copy link
Contributor Author

gavinr commented Sep 2, 2022

Now in 2022, all these are now supported in the browsers we're supporting, so we're planning on switching the source code to use Object.assign(), arrow functions, template strings, let/const, etc. without setting up a transpile step.

@patrickarlt
Copy link
Contributor

@gavinr related to this lets setup prettier as well and remove semistandard.

@gavinr gavinr self-assigned this Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants