Skip to main content

Rules overview

eslint-plugin-runtime-cleanup rules target runtime resource lifetimes that are easy to leak when allocation and teardown drift apart.

Stable rulesโ€‹

Future rules should continue to target explicit runtime resource lifetimes, including timers, listeners, observers, abort controllers, workers, streams, child processes, and disposable handles.

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: