diff --git a/src/createVelocityContext.js b/src/createVelocityContext.js index 7a747b7cd..690613db1 100644 --- a/src/createVelocityContext.js +++ b/src/createVelocityContext.js @@ -9,7 +9,7 @@ function escapeJavaScript(x) { if (typeof x === 'string') return jsEscapeString(x).replace(/\\n/g, '\n'); // See #26, if (isPlainObject(x)) { const result = {}; - for (let key in x) { // eslint-disable-line prefer-const + for (const key in x) { // eslint-disable-line prefer-const result[key] = jsEscapeString(x[key]); } diff --git a/src/renderVelocityTemplateObject.js b/src/renderVelocityTemplateObject.js index ed5fcb756..16c689025 100644 --- a/src/renderVelocityTemplateObject.js +++ b/src/renderVelocityTemplateObject.js @@ -64,7 +64,7 @@ module.exports = function renderVelocityTemplateObject(templateObject, context) // Let's check again if (isPlainObject(toProcess)) { - for (let key in toProcess) { // eslint-disable-line prefer-const + for (const key in toProcess) { // eslint-disable-line prefer-const const value = toProcess[key]; debugLog('Processing key:', key, '- value:', value); diff --git a/src/utils.js b/src/utils.js index 9ba07d491..db799f90a 100644 --- a/src/utils.js +++ b/src/utils.js @@ -28,7 +28,7 @@ module.exports = { capitalizeKeys: o => { const capitalized = {}; - for (let key in o) { // eslint-disable-line prefer-const + for (const key in o) { // eslint-disable-line prefer-const capitalized[key.replace(/((?:^|-)[a-z])/g, x => x.toUpperCase())] = o[key]; }