@@ -9,7 +9,7 @@ const makeLocalsBackup = require('./backup').make
99const revertBackupedLocals = require ( './backup' ) . revert
1010const placeholders = require ( './placeholders' )
1111
12- let delimitersSettings = [ ]
12+ const delimitersSettings = [ ]
1313let conditionals , switches , loops , scopes , ignored
1414
1515/**
@@ -73,7 +73,7 @@ function getLoopMeta (index, target) {
7373 index : index ,
7474 remaining : arr . length - index - 1 ,
7575 first : arr . indexOf ( arr [ index ] ) === 0 ,
76- last : index + 1 == arr . length ,
76+ last : index + 1 === arr . length ,
7777 length : arr . length
7878 }
7979}
@@ -177,8 +177,8 @@ function walk (opts, nodes) {
177177 // if we have a string, match and replace it
178178 if ( typeof node === 'string' ) {
179179 // if node contains ignored expression delimiter, output as-is
180- let before = delimitersSettings [ 1 ] . text [ 0 ]
181- let after = delimitersSettings [ 1 ] . text [ 1 ]
180+ const before = delimitersSettings [ 1 ] . text [ 0 ]
181+ const after = delimitersSettings [ 1 ] . text [ 1 ]
182182 const ignoredDelimiter = new RegExp ( `@${ before } (.+?)${ after } ` , 'g' )
183183
184184 if ( ignoredDelimiter . test ( node ) ) {
@@ -198,7 +198,7 @@ function walk (opts, nodes) {
198198
199199 // if not, we have an object, so we need to run the attributes and contents
200200 if ( node . attrs ) {
201- for ( let key in node . attrs ) {
201+ for ( const key in node . attrs ) {
202202 node . attrs [ key ] = placeholders ( node . attrs [ key ] , ctx , delimitersSettings )
203203 }
204204 }
@@ -351,7 +351,7 @@ function walk (opts, nodes) {
351351 m . push ( executeLoop ( keys , target [ index ] , index , opts . locals , treeString ) )
352352 }
353353 } else {
354- for ( let key in target ) {
354+ for ( const key in target ) {
355355 opts . locals . loop = getLoopMeta ( key , target )
356356 m . push ( executeLoop ( keys , target [ key ] , key , opts . locals , treeString ) )
357357 }
0 commit comments