Skip to content

Conversation

JasonWeinzierl
Copy link
Owner

@JasonWeinzierl JasonWeinzierl commented Nov 26, 2024

BREAKING CHANGE: RxJS ^7.2.0 is required.

BREAKING CHANGE: recommended configuration had 4 rules added to it. See full changelog for details.

Resolves #35 .

  • no-topromise: toPromise() was deprecated by RxJS, so this will be very useful for helping developers migrate to one of the two manual editor suggestions (lastValueFrom or firstValueFrom).
  • prefer-observer: RxJS deprecated non-observer object subscribes, so this will help migrate.
  • prefer-root-operators: RxJS moved operators to root in 7.2.0 and deprecated the old site, so this will help migrate.
    • This change requires bumping the RxJS peer dependency to 7.2.0 because 7.0.0 doesn't export the operators from root.
  • throw-error: This rule will rarely be triggered because it was recently changed to only apply to the static creation function throwError(). But in those rare cases, it should always be enforced, similar to no-implicit-any-catch.

BREAKING CHANGE: now that prefer-root-operators is a recommended rule, we need to enforce 7.2.0 because that's when root operators were released.
Also fix test to ensure this doesn't get missed again.
Copy link

github-actions bot commented Nov 26, 2024

LCOV of commit f5010e8 during .github/workflows/ci.yml #157

Summary coverage rate:
  lines......: 96.3% (3693 of 3835 lines)
  functions..: 95.6% (238 of 249 functions)
  branches...: 91.3% (732 of 802 branches)

Files changed coverage rate:
                                         |Lines       |Functions  |Branches    
  Filename                               |Rate     Num|Rate    Num|Rate     Num
  =============================================================================
  src/configs/recommended.ts             | 100%     28| 100%     1| 100%      1
  src/rules/no-topromise.ts              |94.9%     98| 100%     4|82.6%     23
  src/rules/prefer-observer.ts           | 100%    126| 100%     6|97.2%     36
  src/rules/prefer-root-operators.ts     |94.9%    138| 100%    16|90.7%     43
  src/rules/throw-error.ts               | 100%     77| 100%     5|93.3%     15

@JasonWeinzierl JasonWeinzierl marked this pull request as ready for review November 26, 2024 21:14
@JasonWeinzierl JasonWeinzierl merged commit ada5d55 into main Nov 28, 2024
2 checks passed
@JasonWeinzierl JasonWeinzierl deleted the more-recommended-rules branch November 28, 2024 15:11
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.

Changes to the recommended config
1 participant