From 7ad5e39758d93679859c227577751705edd924e0 Mon Sep 17 00:00:00 2001 From: Christophe Hurpeau <302891+christophehurpeau@users.noreply.github.com> Date: Thu, 28 Nov 2024 21:12:26 +0100 Subject: [PATCH] fix: ignore node test for floating promises --- .../eslint-config-typescript/lib/overrides/test.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/@pob/eslint-config-typescript/lib/overrides/test.js b/@pob/eslint-config-typescript/lib/overrides/test.js index 8d5b28517..a692472b8 100644 --- a/@pob/eslint-config-typescript/lib/overrides/test.js +++ b/@pob/eslint-config-typescript/lib/overrides/test.js @@ -13,5 +13,19 @@ export default { // don't force return type in test "@typescript-eslint/explicit-function-return-type": "off", + + // https://github.com/nodejs/node/issues/51292 + "@typescript-eslint/no-floating-promises": [ + "error", + { + allowForKnownSafeCalls: [ + { + from: "package", + name: ["it", "describe"], + package: "node:test", + }, + ], + }, + ], }, };