File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
src/analyzers/practice/resistor-color-duo Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -515,7 +515,7 @@ class Entry {
515515 }
516516
517517 if ( ! constant ) {
518- const issue = this . checkForShouldDefineTopLevelConstantIssue ( )
518+ const issue = this . hasConstantDefinedInBody ( )
519519 if ( issue instanceof ShouldDefineTopLevelConstant ) {
520520 logger . log ( '~> found a constant that was not declared at the top level' )
521521 this . lastIssue_ = issue
@@ -1127,9 +1127,7 @@ class Entry {
11271127 return false
11281128 }
11291129
1130- private checkForShouldDefineTopLevelConstantIssue ( ) :
1131- | ShouldDefineTopLevelConstant
1132- | undefined {
1130+ private hasConstantDefinedInBody ( ) : ShouldDefineTopLevelConstant | undefined {
11331131 const localConstants = extractVariables ( this . body ) . filter (
11341132 ( constant ) =>
11351133 constant . init ?. type === AST_NODE_TYPES . ArrayExpression ||
You can’t perform that action at this time.
0 commit comments