Rules overview
eslint-plugin-runtime-cleanup rules target runtime resource lifetimes that are
easy to leak when allocation and teardown drift apart.
Rulesโ
no-floating-abort-controllersno-floating-audio-contextsno-floating-broadcast-channelsno-floating-child-processesno-floating-disposable-stacksno-floating-file-watchersno-floating-geolocation-watchesno-floating-infinite-animationsno-floating-media-streamsno-floating-message-channelsno-floating-network-connectionsno-floating-object-urlsno-floating-observersno-floating-serversno-floating-streamsno-floating-timersno-floating-wake-locksno-floating-web-stream-locksno-floating-workersno-unmanaged-event-listeners
Rule authoring expectationsโ
Runtime cleanup rules should be conservative:
- report only resource allocation patterns with a clear cleanup obligation
- avoid whole-file heuristics that create noisy false positives
- use type information only when it materially improves precision
- prefer suggestions over autofixes when cleanup placement is ambiguous
- document the exact lifecycle pattern the rule expects
Presetsโ
The preset pages describe the exported config keys and are ready for future rules: