-
Notifications
You must be signed in to change notification settings - Fork 779
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
style: var
-> let
and const
codemod
#4444
Closed
Closed
Commits on May 3, 2024
-
style:
var
->let
andconst
codemodadds `no-var` rule to eslint Who else does this? - Google (JS style guide) https://google.github.io/styleguide/jsguide.html#features-local-variable-declarations - Airbnb (popular JS style guide) https://github.com/airbnb/javascript Why do this? Gaiety's explanation: "`let` works the way most devs think `var` works. scope leaking and variable hoisting is a messy confusing idea, JS got updated for a reason" also it's 2024, this isn't too controversial anymore - https://www.freecodecamp.org/news/var-let-and-const-whats-the-difference/ - https://blog.javascripttoday.com/blog/var-vs-let-vs-const/ "The var keyword was originally used for declaring variables in JavaScript. If you’ve browsed an old codebase or an older JavaScript tutorial, you have probably seen it." - https://medium.com/@rithinmenezes/understanding-let-var-and-const-in-javascript-a-guide-to-variable-declarations-f271c5b8dc79 - Airbnb's why https://airbnb.io/javascript/#variables
Configuration menu - View commit details
-
Copy full SHA for 47898db - Browse repository at this point
Copy the full SHA 47898dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b160b7 - Browse repository at this point
Copy the full SHA 8b160b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 393bc6f - Browse repository at this point
Copy the full SHA 393bc6fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 76a03cc - Browse repository at this point
Copy the full SHA 76a03ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 090eb2a - Browse repository at this point
Copy the full SHA 090eb2aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6467d51 - Browse repository at this point
Copy the full SHA 6467d51View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9990a8c - Browse repository at this point
Copy the full SHA 9990a8cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 909ec1c - Browse repository at this point
Copy the full SHA 909ec1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 664568a - Browse repository at this point
Copy the full SHA 664568aView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.