Skip to content

Commit 3ff14e0

Browse files
authored
Enable Biome checks for async mistakes and import cycles (#1541)
1 parent 786e46e commit 3ff14e0

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

‎CONTRIBUTING.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ npm test # the check CI runs: biome, typecheck, and the frontend unit tests
7373
```
7474

7575
`npm test` checks the entire frontend codebase (html, css, js, ts).
76+
Biome also rejects promise-valued conditions and synchronous callbacks that discard
77+
promises (`noMisusedPromises`), awaiting synchronous values (`useAwaitThenable`),
78+
and runtime import cycles (`noImportCycles`). Type-only imports may form cycles.
79+
Keep async Playwright assertions and actions awaited or returned;
80+
`noPlaywrightMissingAwait` checks these even when TypeScript inference cannot
81+
follow the shared fixture's types. The promise and Playwright rules are in
82+
Biome's nursery group, so review their diagnostics when upgrading Biome.
7683

7784
## Testing
7885

‎biome.json‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@
2424
"linter": {
2525
"rules": {
2626
"nursery": {
27-
"noFloatingPromises": "error"
27+
"noFloatingPromises": "error",
28+
"noMisusedPromises": "error",
29+
"useAwaitThenable": "error",
30+
"noPlaywrightMissingAwait": "error"
31+
},
32+
"suspicious": {
33+
"noImportCycles": "error"
2834
}
2935
}
3036
}

0 commit comments

Comments
 (0)