Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use correct scope for checking references #1107

Merged
merged 1 commit into from May 14, 2022
Merged

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented May 14, 2022

Per #1094 (comment):

Turns out that context.getScope is stateful, being based on the same logic that the AST walker follows - effectively it should be through of as an argument like node, e.g. CallExpression(node, scope).

I've chucked in some tests for a few rules, but I don't want to over saturate our tests with the same extensive subset of tests - I'll add a few more in once I've done #1106 because then the logic should be a bit easier to think about anyway (right now it's a little weird as it's still name-based).

@G-Rath G-Rath added the bug label May 14, 2022
@G-Rath G-Rath merged commit 89ab1a0 into main May 14, 2022
@G-Rath G-Rath deleted the dont-cache-scope branch May 14, 2022 09:14
github-actions bot pushed a commit that referenced this pull request May 14, 2022
## [26.2.1](v26.2.0...v26.2.1) (2022-05-14)

### Bug Fixes

* use correct scope for checking references ([#1107](#1107)) ([89ab1a0](89ab1a0))
@github-actions
Copy link

🎉 This PR is included in version 26.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant