Skip to content

Conversation

@JasonWeinzierl
Copy link
Owner

@JasonWeinzierl JasonWeinzierl commented Jan 6, 2025

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

@github-actions
Copy link

github-actions bot commented Jan 6, 2025

LCOV of commit bf24cd6 during .github/workflows/ci.yml #347

Summary coverage rate:
  lines......: 96.7% (4250 of 4396 lines)
  functions..: 96.1% (270 of 281 functions)
  branches...: 91.1% (932 of 1023 branches)

Files changed coverage rate:
                                         |Lines       |Functions  |Branches    
  Filename                               |Rate     Num|Rate    Num|Rate     Num
  =============================================================================
  src/rules/no-redundant-notify.ts       |84.4%     90| 100%     4|53.3%     15

@JasonWeinzierl JasonWeinzierl merged commit d42dd58 into main Jan 6, 2025
3 checks passed
@JasonWeinzierl JasonWeinzierl deleted the 107-handle-unsubscribe branch January 6, 2025 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no-redundant-notify handle Subject.unsubscribe?

2 participants