Problem
Tests with no expect() calls silently pass, giving false confidence. The standard jest/expect-expect rule exists in oxlint but its Rust implementation only recognizes jest and vitest imports — it silently ignores bun:test.
We also have no .oxlintrc.json config file — the lint script runs bare oxlint --deny-warnings . with implicit defaults.
Proposal
- Add
.oxlintrc.json — explicit config instead of relying on defaults
- Write a custom JS plugin (
lint/expect-expect.ts) using oxlint's JS plugins API that implements expect-expect for bun:test
- Register it via
jsPlugins in .oxlintrc.json
The rule should flag any test() or test.skipIf(...)() call whose body contains no expect() call.
Context
Discovered during test cleanup in #352 — several tests were passing with zero assertions (early return instead of test.skipIf, empty callback bodies, tautological assertions). The lack of a lint rule meant these accumulated silently over time.
oxlint JS plugins support TypeScript natively in Bun, so the plugin can be a .ts file with no build step.
References
Problem
Tests with no
expect()calls silently pass, giving false confidence. The standardjest/expect-expectrule exists in oxlint but its Rust implementation only recognizesjestandvitestimports — it silently ignoresbun:test.We also have no
.oxlintrc.jsonconfig file — the lint script runs bareoxlint --deny-warnings .with implicit defaults.Proposal
.oxlintrc.json— explicit config instead of relying on defaultslint/expect-expect.ts) using oxlint's JS plugins API that implementsexpect-expectforbun:testjsPluginsin.oxlintrc.jsonThe rule should flag any
test()ortest.skipIf(...)()call whose body contains noexpect()call.Context
Discovered during test cleanup in #352 — several tests were passing with zero assertions (early
returninstead oftest.skipIf, empty callback bodies, tautological assertions). The lack of a lint rule meant these accumulated silently over time.oxlint JS plugins support TypeScript natively in Bun, so the plugin can be a
.tsfile with no build step.References