From 5984a0ad0448cd34f4512995bf0c4cef2605f4a9 Mon Sep 17 00:00:00 2001 From: Ophir Lojkine Date: Thu, 8 Oct 2026 21:47:34 +0000 Subject: [PATCH] Enable Biome checks for async mistakes and import cycles --- CONTRIBUTING.md | 7 +++++++ biome.json | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 252c86e9d..0d46ee99b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,6 +73,13 @@ npm test # the check CI runs: biome, typecheck, and the frontend unit tests ``` `npm test` checks the entire frontend codebase (html, css, js, ts). +Biome also rejects promise-valued conditions and synchronous callbacks that discard +promises (`noMisusedPromises`), awaiting synchronous values (`useAwaitThenable`), +and runtime import cycles (`noImportCycles`). Type-only imports may form cycles. +Keep async Playwright assertions and actions awaited or returned; +`noPlaywrightMissingAwait` checks these even when TypeScript inference cannot +follow the shared fixture's types. The promise and Playwright rules are in +Biome's nursery group, so review their diagnostics when upgrading Biome. ## Testing diff --git a/biome.json b/biome.json index 5d53a9f58..0e5c22347 100644 --- a/biome.json +++ b/biome.json @@ -24,7 +24,13 @@ "linter": { "rules": { "nursery": { - "noFloatingPromises": "error" + "noFloatingPromises": "error", + "noMisusedPromises": "error", + "useAwaitThenable": "error", + "noPlaywrightMissingAwait": "error" + }, + "suspicious": { + "noImportCycles": "error" } } }