From 981bac654e71dced8e1267cd8920961a2655f14e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Pallar=C3=A9s?= Date: Fri, 5 Sep 2025 12:22:38 +0200 Subject: [PATCH] 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. --- eslint.config.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index 0f32f82..f4cf933 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -20,6 +20,11 @@ export default tseslint.config( "@typescript-eslint/no-explicit-any": "off", // Covered by @typescript-eslint/no-floating-promises. "@typescript-eslint/require-await": "warn", + // Customize @typescript-eslint/no-floating-promises. + "@typescript-eslint/no-floating-promises": [ + "warn", + { checkThenables: true }, + ], }, }, {