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

Use const whenever possible #12

Open
brodycj opened this issue Sep 14, 2018 · 2 comments
Open

Use const whenever possible #12

brodycj opened this issue Sep 14, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@brodycj
Copy link

brodycj commented Sep 14, 2018

I think @raphinesse and others have already put a major effort into this. I am raising this is an explicit issue in response to apache/cordova-osx#61 (comment).

@raphinesse
Copy link
Contributor

raphinesse commented Sep 14, 2018

Yup, I've been doing that as I go. I just haven't felt it was important enough to be tackled just for the sake of it. Consider that it will create quite some diff noise and probably merge conflicts for any open PRs.

That being said, there's a tool that does these transformations for you: https://lebab.io/. Last time I checked it was a bit overzealous with the arrow functions, resulting in bad code layout. And one of the code transforms choked on our license header. So if we do this, it might be worth considering throwing something like prettier at the code to format it uniformly (and make sure we make git blame completely useless). @janpio Would love to do that, I hear 😉

Of course, for var to const simple search and replace should work too. Then step through linter errors and change these all to let. Probably gets you 99% there with the minimal impact.

@janpio janpio added the enhancement New feature or request label Sep 19, 2018
@erisu
Copy link
Member

erisu commented Oct 3, 2020

I think we can close this ticket as we had already been converting things to use const & let.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants