You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/ban-observables.md
+20-2Lines changed: 20 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,16 @@
2
2
3
3
<!-- end auto-generated rule header -->
4
4
5
-
This rule can be configured so that developers can ban any observable creators they want to avoid in their project.
5
+
It can sometimes be useful to ban specific `rxjs` imports.
6
+
This rule can be configured to ban a list of specific `rxjs` imports developers want to avoid in their project.
7
+
8
+
> [!TIP]
9
+
> `ban-observables` only bans at the _import_ site. (In fact, it can ban anything imported from `rxjs`.)
10
+
> See [`ban-operators`](./ban-operators.md) for banning operators at their _usage_.
6
11
7
12
## Options
8
13
9
-
This rule accepts a single option which is an object the keys of which are the names of observable factory functions and the values are either booleans or strings containing the explanation for the ban.
14
+
This rule accepts a single option which is an object the keys of which are the names of anything in `rxjs` and the values are either booleans or strings containing the explanation for the ban.
10
15
11
16
The following configuration bans `partition` and `onErrorResumeNext`:
12
17
@@ -22,3 +27,16 @@ The following configuration bans `partition` and `onErrorResumeNext`:
22
27
]
23
28
}
24
29
```
30
+
31
+
## When Not To Use It
32
+
33
+
If you have no need to ban importing anything from `rxjs`, you don't need this rule.
0 commit comments