eslint-community / eslint-plugin-promise

Enforce best practices for JavaScript promises
ISC License
943 stars 91 forks source link

feat: new rule `prefer-catch` #525

Closed brettz9 closed 3 days ago

brettz9 commented 2 months ago

What is the purpose of this pull request?

What changes did you make? (Give an overview)

Adds new rule prefer-catch to prefer catch over then(a, b) or then(null, b).

Closes #217.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (bbcfcbf) to head (0b43d92). Report is 67 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #525 +/- ## ========================================== Coverage 100.00% 100.00% ========================================== Files 25 29 +4 Lines 649 774 +125 Branches 250 291 +41 ========================================== + Hits 649 774 +125 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.