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

Silence reactivity warnings in (standard Web APIs) *Observer callbacks #82

Merged
merged 2 commits into from
Mar 7, 2023

Conversation

macarie
Copy link
Contributor

@macarie macarie commented Mar 4, 2023

This should fix #81.

I don't have much experience building eslint rules, so I don't know if this is the right approach, but it seems to be working and doesn't break any existing tests.

If you don't think these warnings should be silenced, please, feel free to close the PR!

Comment on lines +889 to +893
"IntersectionObserver",
"MutationObserver",
"PerformanceObserver",
"ReportingObserver",
"ResizeObserver",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be all the standard Web APIs that have the same signature and behavior according to this MDN page.

@joshwilsonvu
Copy link
Collaborator

Thanks for the contribution! You're absolutely right that these Observer callbacks should be handled by the rule in the same way as timers. I'll go ahead and get this merged shortly. 🎉

@joshwilsonvu joshwilsonvu merged commit 52ecd3c into solidjs-community:main Mar 7, 2023
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.

False positive in standard *Observer web APIs
2 participants