Disallow operators that return connectable observables (rxjs-x/no-connectable)
April 18, 2025 ยท View on GitHub
๐ญ This rule requires type information.
This rule prevents the use of operators that return connectable observables.
Note
All operators banned by this rule are also deprecated by RxJS, so this rule may be removed in a future major version.
Rule details
Examples of incorrect code for this rule:
import { of, publish } from "rxjs";
const result = of(42).pipe(publish());
When Not To Use It
If you use operators that return connectable observables in your project, you may not need this rule. Or you may rely on RxJS's deprecation of those operators and don't need to double-flag the operators as banned.
Type checked lint rules are more powerful than traditional lint rules, but also require configuring type checked linting.