googleapis / googleapis/synthtool

Enable no-floating-promises for eslint

Open
#1,809 0 comments 0 reactions 1 assignee Claimed by @sofisl View on GitHub
type: process
Dominant language
Python
Stars
108
Forks
102
Avg merge
1h 23m
Merged PRs (30d)
1

Description

The purpose of this proposal is to prevent accidentally "dangling" promises from called functions.

https://typescript-eslint.io/rules/no-floating-promises

In Node, it's possible to call an async function, or one that just returns a promise, and ignore the result. This leaves a promise that has no catch handler, which, in modern runtimes, can result in crashing the process.

The proposal here is two-fold:
* Turn this on and see if anything breaks in a few places
* Turn it on for all libraries, and do a fix pass

We might also consider this related rule:

https://typescript-eslint.io/rules/no-misused-promises

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.