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

Improve detection of global window methods in prefer-ember-test-helpers rule #1038

Merged

Conversation

bmish
Copy link
Member

@bmish bmish commented Dec 11, 2020

Eliminates all of the custom logic in the rule for detecting if the blur / find / focus window functions are defined locally and replaces it with the ReferenceTracker class from eslint-utils.

There was no specific known bug with the rule before, but this refactor will make the rule more robust in its ability to detect calls to the global window functions that we are trying to disallow.

CC: @fierysunset

…test-helpers rule

Eliminates all of the custom logic in the rule for detecting if the `blur` / `find` / `focus` window functions are defined locally and replaces it with the ReferenceTracker class from eslint-utils.

There was no specific known bug with the rule before, but this refactor will make the rule more robust in its ability to detect calls to the global window functions that we are trying to disallow.

https://eslint-utils.mysticatea.dev/api/scope-utils.html#referencetracker-class
@bmish bmish added the bug label Dec 11, 2020
@fierysunset
Copy link

Nice, thanks for doing this @bmish!

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

Successfully merging this pull request may close these issues.

2 participants