From d9733dc1c8752d8b92f7acd3c78d9323950ef095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Mon, 6 Jan 2025 23:09:18 +0100 Subject: [PATCH] fix: relax `@typescript-eslint/no-floating-promises` for `node:test` Ref: https://github.com/nodejs/node/issues/51292 --- eslint.config.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index 2145363..1710c5b 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -388,7 +388,19 @@ export default typescriptESLint.config( }, ], - "@typescript-eslint/no-floating-promises": "error", + "@typescript-eslint/no-floating-promises": [ + "error", + { + allowForKnownSafeCalls: [ + { + from: "package", + name: ["it", "describe"], + package: "node:test", + }, + ], + }, + ], + "@typescript-eslint/no-for-in-array": "error", "@typescript-eslint/no-invalid-void-type": "error", "@typescript-eslint/no-misused-new": "error",