Skip to content

Add Eslint rule to handle promises #6005

@milanholemans

Description

@milanholemans

Contributors and maintainers are humans and they make errors. Sometimes we merge stuff that we overlooked and have to fix later on. One thing I noticed is that we sometimes forget that logging a message is a promise. It used to be a void function, but since September last year, it has become a promise.
Sometimes messages are logged without being awaited, which results in undesired behavior. In fact, in almost all cases, we should always handle promises correctly. This is something that can be easily fixed by enabling an ESlint rule.

Goal

Configure ESlint rules to ensure that all promises are handled correctly.

Info

Something we can look into is the ESlint rule no-floating-promises. Let's check if this satisfies our needs.

Maybe it's also worth checking the no-misused-promises rule as extra.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions