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

feat (require-listener-teardown): detect inline functions and documen… #80

Merged
merged 1 commit into from
Apr 23, 2023

Conversation

43081j
Copy link
Owner

@43081j 43081j commented Apr 23, 2023

Fixes #79

Introduces these changes:

  • The rule has options now so you can specify {hosts: ['window', 'document']} for example to no longer check for handlers on this
  • It now also detects inline functions (arrow functions, bind), e.g. addEventListener('foo', this.foo.bind(this))
  • detects events on this, window and document by default (used to be just this)

@43081j 43081j merged commit 79632ea into master Apr 23, 2023
4 checks passed
@43081j 43081j deleted the listener-improvements branch April 23, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configuration options for wc/require-listener-teardown
1 participant