Skip to content

Conversation

JasonWeinzierl
Copy link
Owner

@JasonWeinzierl JasonWeinzierl commented Nov 20, 2024

Adds 2 manual editor suggestions to no-topromise. Developers can choose between lastValueFrom, which behaves closest to the deprecated toPromise, or firstValueFrom.

Resolves #37 .

Copy link

github-actions bot commented Nov 20, 2024

LCOV of commit ee0e5dd during .github/workflows/ci.yml #108

Summary coverage rate:
  lines......: 96.3% (3496 of 3631 lines)
  functions..: 95.3% (221 of 232 functions)
  branches...: 91.3% (693 of 759 branches)

Files changed coverage rate:
                                         |Lines       |Functions  |Branches    
  Filename                               |Rate     Num|Rate    Num|Rate     Num
  =============================================================================
  src/etc/is.ts                          |70.9%    103|64.3%    28| 100%     18
  src/rules/no-topromise.ts              |94.8%     97| 100%     4|82.6%     23

@JasonWeinzierl JasonWeinzierl added the enhancement New feature or request label Nov 20, 2024
Likely someone is spoofing Observable or maybe RxJS has been embedded in the file?  Weird edge case that we don't need to handle.
@JasonWeinzierl JasonWeinzierl merged commit cec2d60 into main Nov 21, 2024
2 checks passed
@JasonWeinzierl JasonWeinzierl deleted the topromise-suggest branch November 21, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggest lastValueFrom and firstValueFrom as replacements to toPromise
1 participant