@@ -68,8 +68,8 @@ class PreferConstWalker extends Lint.RuleWalker {
6868 private errors : Lint . RuleFailure [ ] = [ ] ;
6969 private markAssignment ( identifier : ts . Identifier ) {
7070 const name = identifier . text ;
71- for ( var i = this . inScopeLetDeclarations . length - 1 ; i >= 0 ; i -- ) {
72- var declarations = this . inScopeLetDeclarations [ i ] ;
71+ for ( let i = this . inScopeLetDeclarations . length - 1 ; i >= 0 ; i -- ) {
72+ const declarations = this . inScopeLetDeclarations [ i ] ;
7373 if ( declarations [ name ] ) {
7474 declarations [ name ] . usages ++ ;
7575 break ;
@@ -173,7 +173,7 @@ class PreferConstWalker extends Lint.RuleWalker {
173173 }
174174
175175 private visitAnyForStatement ( node : ts . ForOfStatement | ts . ForInStatement ) {
176- let names : ts . Map < DeclarationUsages > = { } ;
176+ const names : ts . Map < DeclarationUsages > = { } ;
177177 if ( isLet ( node . initializer ) ) {
178178 if ( node . initializer . kind === ts . SyntaxKind . VariableDeclarationList ) {
179179 this . collectLetIdentifiers ( node . initializer as ts . VariableDeclarationList , names ) ;
@@ -195,7 +195,7 @@ class PreferConstWalker extends Lint.RuleWalker {
195195 }
196196
197197 visitBlock ( node : ts . Block ) {
198- let names : ts . Map < DeclarationUsages > = { } ;
198+ const names : ts . Map < DeclarationUsages > = { } ;
199199 for ( let i = 0 ; i < node . statements . length ; i ++ ) {
200200 const statement = node . statements [ i ] ;
201201 if ( statement . kind === ts . SyntaxKind . VariableStatement ) {
0 commit comments