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.
Now that rustdoc is using ES6 idioms, we should replace all
vardeclarations withconstandlet. 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.