Skip to content

Commit 981bac6

Browse files
committed
chore: enable eslint rule to detect floating promises
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 5e2cb57 commit 981bac6

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)