📝 Allow the floating-promise header in test files
Agents may add the fixed file-level typescript/no-floating-promises oxlint-disable header at the top of a `*.test.ts` file — the expectTypeOf() misidentification is a documented false positive (development/testing.md § Known issues) and the await/void workarounds collide with eslint/no-void. Every other suppression stays the human last resort it was.
This commit is contained in:
1 parent
c51e32d6a6
commit
484e5c8ca5
2 files changed
+7
-3
No files matched your search
+5
-1
@@ -151,7 +151,11 @@ reaches for by default:
|
||||
- **`oxlint-disable` directives live in source, not `.oxlintrc.json`.** The
|
||||
trade-off must sit next to the code it silences. This is a _human_ last-resort
|
||||
convention; agents must not add these — see
|
||||
[AGENTS.md § Never do](./AGENTS.md#never-do). (why:
|
||||
[AGENTS.md § Never do](./AGENTS.md#never-do). The sole agent exception is the
|
||||
fixed file-level header at the top of a `*.test.ts` file, spelled exactly:
|
||||
`/* oxlint-disable typescript/no-floating-promises -- expectTypeOf() is a sync
|
||||
type-assertion library that the type-aware linter misidentifies as a promise
|
||||
*/` — any other suppression stays human-last-resort. (why:
|
||||
[development/tooling.md](./development/tooling.md#oxlint-disable-directives-live-next-to-the-code))
|
||||
- **Don't put slow / network / whole-project scans in `check` or pre-commit.**
|
||||
Advisory scans are not correctness gates; they belong under `maintain:`. (why:
|
||||
|
||||
Reference in new issue
Block a user