-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-rustdoc-jsArea: Rustdoc's JS front-endArea: Rustdoc's JS front-endT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
Now that rustdoc is using ES6 idioms, we should replace all var
declarations with const
and let
. This style guideline explains why: https://github.com/airbnb/javascript#references. Once that's done, we should turn on the lint checks that enforce it.
I think there are a few places (at least in search.js) where we rely on the surprising property of var declarations called "var hoisting". In those cases we may to move some declarations to the top of their function at the same time we change them to let
.
Metadata
Metadata
Assignees
Labels
A-rustdoc-jsArea: Rustdoc's JS front-endArea: Rustdoc's JS front-endT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.