Change let into const (#457)

This patch:
- changes `let` into `const` throughout codebase
- adds eslint check to prefer const over let
This commit is contained in:
Eric Bidelman
2017-08-21 16:39:04 -07:00
committed by Andrey Lushnikov
parent 5d6d3e0a81
commit 1f9b4fb4c8
37 changed files with 495 additions and 494 deletions

View File

@@ -24,7 +24,7 @@ const revisionInfo = Downloader.revisionInfo(platform, revision);
if (revisionInfo.downloaded)
return;
let allRevisions = Downloader.downloadedRevisions();
const allRevisions = Downloader.downloadedRevisions();
Downloader.downloadRevision(platform, revision, onProgress)
// Remove previous chromium revisions.
.then(() => Promise.all(allRevisions.map(({platform, revision}) => Downloader.removeRevision(platform, revision))))
@@ -52,7 +52,7 @@ function onProgress(bytesTotal, delta) {
}
function toMegabytes(bytes) {
let mb = bytes / 1024 / 1024;
const mb = bytes / 1024 / 1024;
return `${Math.round(mb * 10) / 10} Mb`;
}