mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
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:
committed by
Andrey Lushnikov
parent
5d6d3e0a81
commit
1f9b4fb4c8
@@ -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`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user