Skip to content

[rule] no-leaked-intersection-observer #1841

@Netail

Description

@Netail

Problem Description

Memory leakage / unexpected behavior if the IntersectionObserver isn't closed when re-rendering.
Basically a copy of the no-leaked-resize-observer rule, but for the IntersectionObserver

Alternative Solutions

Rule Documentation Template

Currently on my phone, but can add these later. Pretty much the same docs as no-leaked-resize-observer, but with the IntersectionObserver

Evaluation Checklist

  • I have had problems with the pattern I want to forbid
  • I could not find a way to solve the problem by changing the API of the problematic code or introducing a new API
  • I have thought very hard about what the corner cases could be and what kinds of patterns this would forbid that are actually okay, and they are acceptable
  • I think the rule explains well enough how to solve the issue to make sure beginners are not blocked by it
  • I have discussed this rule with team members, and they all find it valuable

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions