Conversation
`lib/_tls_common.js` had instances of `for` loops that defined variables with `var` such that they were re-declared in the same scope. This change scopes those variables with `let` so that they are not re-declared.
|
Why wasn't this catched by the linter? |
|
@ChALkeR We don't (yet) have the In the current code base, that rule fires 227 times. While that may or may not be an acceptable amount of churn for enabling the rule, I'm not so sure that the fixes don't require some examination and thought for each one. It's not always as simple as "oh, just change it from |
|
@ChALkeR If it's useful at all, here's the results of turning on |
|
@Trott Ah, thanks! |
|
LGTM |
|
LGTM, also cancelled that stuck CI job. |
`lib/_tls_common.js` had instances of `for` loops that defined variables with `var` such that they were re-declared in the same scope. This change scopes those variables with `let` so that they are not re-declared. PR-URL: #4853 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
|
Thanks! Landed in 6a73dba. |
`lib/_tls_common.js` had instances of `for` loops that defined variables with `var` such that they were re-declared in the same scope. This change scopes those variables with `let` so that they are not re-declared. PR-URL: #4853 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
`lib/_tls_common.js` had instances of `for` loops that defined variables with `var` such that they were re-declared in the same scope. This change scopes those variables with `let` so that they are not re-declared. PR-URL: nodejs#4853 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
`lib/_tls_common.js` had instances of `for` loops that defined variables with `var` such that they were re-declared in the same scope. This change scopes those variables with `let` so that they are not re-declared. PR-URL: #4853 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
`lib/_tls_common.js` had instances of `for` loops that defined variables with `var` such that they were re-declared in the same scope. This change scopes those variables with `let` so that they are not re-declared. PR-URL: #4853 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
`lib/_tls_common.js` had instances of `for` loops that defined variables with `var` such that they were re-declared in the same scope. This change scopes those variables with `let` so that they are not re-declared. PR-URL: #4853 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
`lib/_tls_common.js` had instances of `for` loops that defined variables with `var` such that they were re-declared in the same scope. This change scopes those variables with `let` so that they are not re-declared. PR-URL: #4853 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
`lib/_tls_common.js` had instances of `for` loops that defined variables with `var` such that they were re-declared in the same scope. This change scopes those variables with `let` so that they are not re-declared. PR-URL: nodejs#4853 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
lib/_tls_common.jshad instances offorloops that defined variableswith
varsuch that they were re-declared in the same scope. Thischange scopes those variables with
letso that they are notre-declared.