pick only current constant violation if it's of the same scope
This commit is contained in:
parent
f5b921cda9
commit
43583e4e9d
@ -56,6 +56,11 @@ function getTypeAnnotationBindingConstantViolations(path, name) {
|
||||
|
||||
visitedScopes.push(violationScope);
|
||||
constantViolations.push(violation);
|
||||
|
||||
if (violationScope === path.scope) {
|
||||
constantViolations = [violation];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// add back on function constant violations since we can't track calls
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user