💭 This rule requires type information.
This rule can be configured so that developers can ban rxjs
operators they want to avoid in their project.
Note
Operators outside of a pipe
or not directly exported by rxjs
are ignored.
This rule accepts a single option which is an object the keys of which are the names of operators and the values are either booleans or strings containing the explanation for the ban.
The following configuration bans partition
and onErrorResumeNext
:
{
"rxjs-x/ban-operators": [
"error",
{
"partition": true,
"map": false,
"onErrorResumeNext": "What is this? Visual Basic?"
}
]
}
If you have no need to ban rxjs
operators, you don't need this rule.
Type checked lint rules are more powerful than traditional lint rules, but also require configuring type checked linting.