Skip to content

Commit fc7cdaa

Browse files
authored
chore: enable eslint rule to detect floating promises (#31)
A "floating" Promise is one that is created without any code set up to handle any errors it might throw. Floating Promises can cause several issues, such as improperly sequenced operations, ignored Promise rejections, and more.
1 parent d1f0c70 commit fc7cdaa

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

eslint.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ export default tseslint.config(
2020
"@typescript-eslint/no-explicit-any": "off",
2121
// Covered by @typescript-eslint/no-floating-promises.
2222
"@typescript-eslint/require-await": "warn",
23+
// Customize @typescript-eslint/no-floating-promises.
24+
"@typescript-eslint/no-floating-promises": [
25+
"warn",
26+
{ checkThenables: true },
27+
],
2328
},
2429
},
2530
{

0 commit comments

Comments
 (0)