Skip to content

Commit

Permalink
fix(lint): Use const instead of var
Browse files Browse the repository at this point in the history
  • Loading branch information
engelfrost committed Oct 11, 2018
1 parent f4b839d commit ad1e782
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/engine-handlebars/lib/engine_handlebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ const findListItemsRE = /({{#( )?)(list(I|i)tems.)(one|two|three|four|five|six|s
const findAtPartialBlockRE = /{{#?>\s*@partial-block\s*}}/g;

function escapeAtPartialBlock(partialString) {
var partial = partialString.replace(
const partial = partialString.replace(
findAtPartialBlockRE,
'{{> @partial-block }}'
);
return partial;
}

var engine_handlebars = {
const engine_handlebars = {
engine: Handlebars,
engineName: 'handlebars',
engineFileExtension: ['.hbs', '.handlebars'],
Expand All @@ -54,7 +54,7 @@ var engine_handlebars = {
Handlebars.registerPartial(partials);
}

var compiled = Handlebars.compile(escapeAtPartialBlock(pattern.template));
const compiled = Handlebars.compile(escapeAtPartialBlock(pattern.template));

return Promise.resolve(compiled(data));
},
Expand All @@ -68,7 +68,7 @@ var engine_handlebars = {

// find and return any {{> template-name }} within pattern
findPartials: function findPartials(pattern) {
var matches = pattern.template.match(findPartialsRE);
const matches = pattern.template.match(findPartialsRE);
return matches;
},
findPartialsWithStyleModifiers: function() {
Expand All @@ -85,14 +85,14 @@ var engine_handlebars = {
return [];
},
findListItems: function(pattern) {
var matches = pattern.template.match(findListItemsRE);
const matches = pattern.template.match(findListItemsRE);
return matches;
},

// given a pattern, and a partial string, tease out the "pattern key" and
// return it.
findPartial: function(partialString) {
var partial = partialString.replace(findPartialsRE, '$1');
const partial = partialString.replace(findPartialsRE, '$1');
return partial;
},

Expand Down

0 comments on commit ad1e782

Please sign in to comment.