@@ -123,7 +123,7 @@ module.exports = {
123
123
blockVariableNameSets [ blockStart ] [ violationType ] . add ( variableName ) ;
124
124
}
125
125
126
- function getBlockStatementAncestors ( node ) {
126
+ function getBlockStatementAncestors ( ) {
127
127
return context . getAncestors ( ) . filter (
128
128
( ancestor ) => ancestor . type === 'BlockStatement'
129
129
) . reverse ( ) ;
@@ -146,7 +146,7 @@ module.exports = {
146
146
}
147
147
148
148
function findVariableViolation ( node , name ) {
149
- getBlockStatementAncestors ( node ) . find (
149
+ getBlockStatementAncestors ( ) . find (
150
150
( block ) => reportVariableViolation ( node , name , block . range [ 0 ] )
151
151
) ;
152
152
}
@@ -157,7 +157,7 @@ module.exports = {
157
157
} ,
158
158
159
159
FunctionDeclaration ( node ) {
160
- const blockAncestors = getBlockStatementAncestors ( node ) ;
160
+ const blockAncestors = getBlockStatementAncestors ( ) ;
161
161
const variableViolationType = getNodeViolationType ( node ) ;
162
162
163
163
if ( blockAncestors . length > 0 && variableViolationType ) {
@@ -169,7 +169,7 @@ module.exports = {
169
169
if ( ! node . init ) {
170
170
return ;
171
171
}
172
- const blockAncestors = getBlockStatementAncestors ( node ) ;
172
+ const blockAncestors = getBlockStatementAncestors ( ) ;
173
173
const variableViolationType = getNodeViolationType ( node . init ) ;
174
174
175
175
if (
0 commit comments