-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
benchmark,lib: var to const #26915
benchmark,lib: var to const #26915
Conversation
I am +1 on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we have shot these PRs down multiple times, but this one is only 343 lines and if that's all it takes to make all possible var
→ const
replacements, I think we should do it.
|
@Trott eslint itself should warn in case the scope is not correct anymore. There could in theory also be changes that can not be auto detected but that's unlikely. Especially with our test suite. |
Ah, yes, of course.
👍 |
Rebased due to conflicts. |
Landed in f86f573 |
This came up recently again. I just ran a modified eslint rule against lib and benchmark and I have no strong opinion about actually doing this and I am absolutely fine with closing this again. It's just there to resolve a comment in the referenced PR.
Note: I did not update any eslint rules as there is no explicit rule to do this. Instead, I just modified the
prefer-const
rule to match againstvar
instead oflet
.Refs: #26679
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes