(
currentScope: TSESLint.Scope.Scope,
)
| 185 | } |
| 186 | |
| 187 | const collectReferences = ( |
| 188 | currentScope: TSESLint.Scope.Scope, |
| 189 | ): Array<TSESLint.Scope.Reference> => { |
| 190 | const references = [...currentScope.references] |
| 191 | |
| 192 | for (const childScope of currentScope.childScopes) { |
| 193 | references.push(...collectReferences(childScope)) |
| 194 | } |
| 195 | |
| 196 | return references |
| 197 | } |
| 198 | |
| 199 | const references = collectReferences(scope) |
| 200 | .filter((x) => x.isRead() && !scope.set.has(x.identifier.name)) |