Skip to main content

Rules overview

The plugin ships 12 rules under the @rx-angular namespace. Each links to its own reference page. None of the rules are auto-fixable (no fixable metadata); they report but do not rewrite. The six no-zone-* rules are legacy-guarded: they only do anything when Zone.js is present and are a no-op under zoneless Angular (v21+). See Zoneless & how Zone.js affected change detection for why.

To turn these on, see how to install and configure.

RuleWhat it flagsFixable?Legacy-guarded?
no-explicit-change-detection-apisExplicit calls to change-detection APIs (detectChanges/markForCheck).NoNo
no-rxstate-imperative-in-reactiveMixing imperative RxState methods inside reactive methods.NoNo
no-rxstate-subscriptions-outside-constructorRxState subscription methods called outside the constructor.NoNo
no-zone-critical-browser-apisZone-patched browser scheduling APIs (setTimeout, setInterval, requestAnimationFrame, …).NoYes (Zone.js only)
no-zone-critical-lodash-apisZone-related Lodash APIs.NoYes (Zone.js only)
no-zone-critical-rxjs-creation-apisZone-critical RxJS creation APIs.NoYes (Zone.js only)
no-zone-critical-rxjs-operatorsZone-critical RxJS operators.NoYes (Zone.js only)
no-zone-critical-rxjs-schedulersRxJS schedulers (Zone-critical).NoYes (Zone.js only)
no-zone-run-apisNgZone.run* APIs (run, runOutsideAngular, …).NoYes (Zone.js only)
prefer-no-layout-sensitive-apisLayout-sensitive APIs that may trigger style recalculation.NoNo
prefer-no-lodash-clone-deepUsages of Lodash cloneDeep.NoNo
prefer-no-lodash-is-equalUsages of Lodash isEqual.NoNo

Presets

  • recommended enables the change-detection, RxState-discipline, layout, and lodash rules; no-zone-run-apis is set to warn; the other five no-zone-* rules are not included.
  • zoneless is a standalone preset — it includes the change-detection rule, all six no-zone-* rules at error, and the layout/lodash rules, but does not include the two RxState-discipline rules (no-rxstate-imperative-in-reactive, no-rxstate-subscriptions-outside-constructor). Users who want both sets should extend recommended and additionally enable the zone rules manually.

See install & configure for how to extend a preset or enable rules individually.

See also