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

Replace var in javascript with let/const #5558

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tomhughes
Copy link
Member

This updates the eslint config to prohibit use of var and to prefer const over let and then fixes all uses of var to respect that.

Copy link

1 Warning
⚠️ Number of updated lines of code is too large to be in one PR. Perhaps it should be separated into two or more?

Generated by 🚫 Danger

@AntonKhorev
Copy link
Collaborator

and then fixes all uses of var to respect that

Not in unmerged pull requests.

@tomhughes tomhughes force-pushed the var-let-const branch 2 times, most recently from 728d991 to 4e28e7f Compare January 29, 2025 18:45
@AntonKhorev
Copy link
Collaborator

If this is merged, I'll have to rewrite #5064 again. That's a bugfix PR. People are still complaining about bugs it fixes.

@hlfan
Copy link
Contributor

hlfan commented Jan 31, 2025

@AntonKhorev I'd still say merge sooner rather than later just because all the arising issues can be autofixed.

@tomhughes tomhughes force-pushed the var-let-const branch 5 times, most recently from 99fb2a9 to f6416cd Compare February 8, 2025 17:46
Comment on lines -45 to +43
url: content_path,
url: path,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're already cleaning up after me, you can define the function as function (url, callback) for even more conciseness.

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

Successfully merging this pull request may close these issues.

4 participants