@rx-angular/eslint-plugin
A set of ESLint rules that keep an Angular codebase zoneless-ready and enforce RxState discipline. The plugin flags the imperative change-detection calls, Zone-critical APIs, layout-thrashing calls, and RxState anti-patterns that get in the way of reactive, performant, Zone-less Angular, so they surface in the linter instead of in production.
Get started
- Set it up: Install and configure the ESLint plugin: install the parser and plugin, then extend the
recommendedorzonelesspreset (flat config or.eslintrc). - Look up the rules: Rules overview: all 12 rules, what each flags, and which are legacy-guarded.
What the rules cover
- Change-detection discipline: no hand-rolled
detectChanges/markForCheck; no layout-sensitive APIs that force style recalculation. - RxState discipline: no imperative RxState calls inside reactive methods; no subscriptions outside the constructor.
- Zoneless readiness: the six
no-zone-*rules flag Zone-patched browser, RxJS, andNgZone.run*APIs. They are legacy-guarded: a no-op once the app runs zoneless (Angular v21+). See Zoneless & how Zone.js affected change detection. - Value-semantics hygiene: flags Lodash
cloneDeep/isEqualin favour of native equivalents.
Explore
- Do: Install and configure.
- Look up: Rules overview.
- Learn: Zoneless & how Zone.js affected change detection (E2).