Skip to content

Commit

Permalink
Linting: use const
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Jul 4, 2019
1 parent ebad6b4 commit b3a3155
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/createVelocityContext.js
Expand Up @@ -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]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/renderVelocityTemplateObject.js
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/utils.js
Expand Up @@ -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];
}

Expand Down

0 comments on commit b3a3155

Please sign in to comment.