eslint-community / eslint-plugin-promise

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

feat(`no-promise-in-callback`): add `exemptDeclarations` option #513

Open brettz9 opened 1 month ago

brettz9 commented 1 month ago

What is the purpose of this pull request?

What changes did you make? (Give an overview)

For no-promise-in-callback, add an exemptDeclarations option to prevent reporting when the promise is within function declarations.

Fixes #445

codecov[bot] commented 1 month 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 (57df46a). Report is 39 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #513 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 25 26 +1 Lines 649 698 +49 Branches 250 266 +16 ========================================= + Hits 649 698 +49 ```

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