Skip to content

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

@Mythie

Description

@Mythie

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    💎 BountySet by Algora after adding bounty using /bounty💰 RewardedSet by Algora after bounty is rewarded to user

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions