From d3605cc532239cef43c098ef873ab5156cd0cb87 Mon Sep 17 00:00:00 2001 From: Max Belsky Date: Tue, 27 Aug 2019 19:56:19 +0300 Subject: [PATCH] Use const instead of let --- src/bootstrap.js | 6 +++--- src/vs/base/node/languagePacks.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bootstrap.js b/src/bootstrap.js index bb29caa6e82..3aeaa72e3b1 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -203,7 +203,7 @@ exports.setupNLS = function () { const bundles = Object.create(null); nlsConfig.loadBundle = function (bundle, language, cb) { - let result = bundles[bundle]; + const result = bundles[bundle]; if (result) { cb(undefined, result); @@ -212,7 +212,7 @@ exports.setupNLS = function () { const bundleFile = path.join(nlsConfig._resolvedLanguagePackCoreLocation, bundle.replace(/\//g, '!') + '.nls.json'); exports.readFile(bundleFile).then(function (content) { - let json = JSON.parse(content); + const json = JSON.parse(content); bundles[bundle] = json; cb(undefined, json); @@ -301,4 +301,4 @@ exports.avoidMonkeyPatchFromAppInsights = function () { process.env['APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL'] = true; // Skip monkey patching of 3rd party modules by appinsights global['diagnosticsSource'] = {}; // Prevents diagnostic channel (which patches "require") from initializing entirely }; -//#endregion \ No newline at end of file +//#endregion diff --git a/src/vs/base/node/languagePacks.js b/src/vs/base/node/languagePacks.js index 445a6c5f7b3..3ae24454cb7 100644 --- a/src/vs/base/node/languagePacks.js +++ b/src/vs/base/node/languagePacks.js @@ -268,10 +268,10 @@ function factory(nodeRequire, path, fs, perf) { const packData = JSON.parse(values[1]).contents; const bundles = Object.keys(metadata.bundles); const writes = []; - for (let bundle of bundles) { + for (const bundle of bundles) { const modules = metadata.bundles[bundle]; const target = Object.create(null); - for (let module of modules) { + for (const module of modules) { const keys = metadata.keys[module]; const defaultMessages = metadata.messages[module]; const translations = packData[module]; @@ -329,4 +329,4 @@ if (typeof define === 'function') { module.exports = factory(require, path, fs, perf); } else { throw new Error('Unknown context'); -} \ No newline at end of file +}