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
feat(no-redundant-notify): also catch unsubscribe (#113)
Adds `unsubscribe` to the logic that guards against sending redundant
notifications.
`unsubscribe` is already discouraged by `no-subject-unsubscribe`, but
the subscriber argument of `new Observable` could also be affected.
Also, `unsubscribe` technically isn't a "notification", but it's a rare
enough use case that it's probably not worth splitting into a separate
rule.
Resolves#107
Copy file name to clipboardExpand all lines: docs/rules/no-redundant-notify.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,8 @@
6
6
7
7
<!-- end auto-generated rule header -->
8
8
9
-
This rule effects failures if an attempt is made to send a notification to an observer after a `complete` or `error` notification has already been sent.
9
+
This rule effects failures if an attempt is made to send a notification to an observer after a `complete` or `error` notification has already been sent,
10
+
or if `unsubscribe` has been called.
10
11
11
12
Note that the rule _does not perform extensive analysis_. It uses a straightforward and limited approach to catch obviously redundant notifications.
0 commit comments