[GH-ISSUE #315] [DOC-312] Add eslint rules to handle promises not being awaited #82

Closed
opened 2026-02-26 18:45:17 +03:00 by kerem · 7 comments
Owner

Originally created by @Mythie on GitHub (Aug 28, 2023).
Original GitHub issue: https://github.com/documenso/documenso/issues/315

Improvement Description

Twice now we've had bugs due to floating promises which were entirely human error (my fault), to handle this we should add eslint rules that cause floating promises and lack of awaits to turn into lint errors.

Rationale

This would stop a whole class of errors that are easy to miss during code review since you aren't sure whether a given method is sync or async.

Proposed Solution

Add the appropriate eslint rules to deal with lack of awaits and floating promises.

Alternatives (optional)

N/A

Additional Context

N/A

Checklist

  • I have searched the existing issues and improvement suggestions to avoid duplication.
  • I have provided a clear description of the improvement being suggested.
  • I have explained the rationale behind this improvement.
  • I have included any relevant technical details or design suggestions.
  • I understand that this is a suggestion and that there is no guarantee of implementation.

DOC-312

Originally created by @Mythie on GitHub (Aug 28, 2023). Original GitHub issue: https://github.com/documenso/documenso/issues/315 ## Improvement Description Twice now we've had bugs due to floating promises which were entirely human error (my fault), to handle this we should add `eslint` rules that cause floating promises and lack of awaits to turn into lint errors. ## Rationale This would stop a whole class of errors that are easy to miss during code review since you aren't sure whether a given method is sync or async. ## Proposed Solution Add the appropriate `eslint` rules to deal with lack of awaits and floating promises. ## Alternatives (optional) N/A ## Additional Context N/A ## Checklist - [x] I have searched the existing issues and improvement suggestions to avoid duplication. - [x] I have provided a clear description of the improvement being suggested. - [x] I have explained the rationale behind this improvement. - [x] I have included any relevant technical details or design suggestions. - [x] I understand that this is a suggestion and that there is no guarantee of implementation. <sub>[DOC-312](https://linear.app/documenso/issue/DOC-312/add-eslint-rules-to-handle-promises-not-being-awaited)</sub>
kerem 2026-02-26 18:45:17 +03:00
Author
Owner

@Mythie commented on GitHub (Aug 28, 2023):

/bounty 15

<!-- gh-comment-id:1694886266 --> @Mythie commented on GitHub (Aug 28, 2023): /bounty 15
Author
Owner

@algora-pbc[bot] commented on GitHub (Aug 28, 2023):

💎 $15 bounty created by Mythie
🙋 If you start working on this, comment /attempt #315 to notify everyone
👉 To claim this bounty, submit a pull request that includes the text /claim #315 somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to documenso/documenso!

Attempt Started (GMT+0) Solution
🟢 @adithyaakrishna Aug 28, 2023, 2:45:50 AM #316
🟢 @AnitKrJha Aug 28, 2023, 5:43:52 AM WIP
<!-- gh-comment-id:1694886302 --> @algora-pbc[bot] commented on GitHub (Aug 28, 2023): ~~💎 **$15** bounty created by Mythie~~ ~~🙋 If you start working on this, comment `/attempt #315` to notify everyone~~ ~~👉 To claim this bounty, submit a pull request that includes the text `/claim #315` somewhere in its body~~ ~~📝 Before proceeding, please make sure you can [**receive payouts**](https://docs.algora.io/bounties/payments#country-support) in your country~~ ~~💵 Payment arrives in your account 2-5 days after the bounty is rewarded~~ ~~💯 You keep 100% of the bounty award~~ ~~🙏 Thank you for contributing to documenso/documenso!~~ | Attempt | Started (GMT+0) | Solution | |---|---|---| | 🟢 @adithyaakrishna | Aug 28, 2023, 2:45:50 AM | [#316](https://github.com/documenso/documenso/pull/316) | | 🟢 @AnitKrJha | Aug 28, 2023, 5:43:52 AM | WIP |
Author
Owner

@adithyaakrishna commented on GitHub (Aug 28, 2023):

/attempt #315

Options
<!-- gh-comment-id:1694922894 --> @adithyaakrishna commented on GitHub (Aug 28, 2023): /attempt #315 <details id="algora-options"> <summary>Options</summary> <ul> <li> <a href="https://console.algora.io/api/bounties/cllu8hicu0002l50fw4txwv8e/cancel-attempt"> Cancel my attempt </a> </li> </ul> </details>
Author
Owner

@AnitKrJha commented on GitHub (Aug 28, 2023):

/attempt #315

Options
<!-- gh-comment-id:1695046377 --> @AnitKrJha commented on GitHub (Aug 28, 2023): /attempt #315 <details id="algora-options"> <summary>Options</summary> <ul> <li> <a href="https://console.algora.io/api/bounties/cllu8hicu0002l50fw4txwv8e/cancel-attempt"> Cancel my attempt </a> </li> </ul> </details>
Author
Owner

@algora-pbc[bot] commented on GitHub (Aug 28, 2023):

Note: The user @adithyaakrishna is already attempting to complete issue #315 and claim the bounty. If you attempt to complete the same issue, there is a chance that @adithyaakrishna will complete the issue first, and be awarded the bounty. We recommend discussing with @adithyaakrishna and potentially collaborating on the same solution versus creating an alternate solution.

<!-- gh-comment-id:1695046420 --> @algora-pbc[bot] commented on GitHub (Aug 28, 2023): Note: The user @adithyaakrishna is already attempting to complete issue #315 and claim the bounty. If you attempt to complete the same issue, there is a chance that @adithyaakrishna will complete the issue first, and be awarded the bounty. We recommend discussing with @adithyaakrishna and potentially collaborating on the same solution versus creating an alternate solution.
Author
Owner

@algora-pbc[bot] commented on GitHub (Aug 30, 2023):

💡 @adithyaakrishna submitted a pull request that claims the bounty. You can visit your org dashboard to reward.

<!-- gh-comment-id:1698361446 --> @algora-pbc[bot] commented on GitHub (Aug 30, 2023): 💡 @adithyaakrishna submitted a [pull request](https://github.com/documenso/documenso/pull/316) that claims the bounty. You can [visit your org dashboard](https://console.algora.io/org/documenso/bounties) to reward.
Author
Owner

@algora-pbc[bot] commented on GitHub (Aug 30, 2023):

🎉🎈 @adithyaakrishna has been awarded $15! 🎈🎊

<!-- gh-comment-id:1698361701 --> @algora-pbc[bot] commented on GitHub (Aug 30, 2023): 🎉🎈 @adithyaakrishna has been awarded **$15**! 🎈🎊
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#82
No description provided.