What is landmines?
landmines is a set of Oxlint plugins from Interfere, published on npm as @interfere/landmines. Its testing rules target the ways an agent can make a Vitest suite pass without making the code work: replacing dependencies with module mocks or `vi.fn` implementations, starting MSW without failing on unhandled requests, awaiting a fixed delay, polling spy state instead of awaiting an event, and adding retries or longer timeouts. Each rule's message names the honest fix, so the agent that tripped it can correct course in the same loop.
The recommended config also switches on six more opinionated rules across style, structure and types: no prose comments, tests beside their subject, fixed test file names, explicit package exports and no annotated return types. The repository was created on 28 October 2026, has 690 stars and an MIT licence; 0.1.0 shipped on 17 November and 0.1.1 a day later. It needs Oxlint 1.81 or later and Node 22.18 or later.
Is landmines worth it?
A coding agent told to make CI green will often do exactly that. It mocks the module it was meant to test, adds a fixed sleep until a race usually resolves, or wraps a flaky test in retries. Every one of those passes review at a glance. landmines turns them into lint failures, which matters because lint runs on every edit and an agent reads its output.
The five testing rules are the reason to install it. `no-test-doubles` allows observation-only spies but rejects replaced behaviour, steering you to real implementations and MSW for the network; `strict-msw` then makes MSW fail on any unmocked request. `no-fixed-sleep` also catches sleeps inside `act`, `waitFor` and `.then` callbacks, and `no-flake-masking` reads `retry`, `testTimeout` and `hookTimeout` in Vitest config as well as per test. In our reading of the changelog, 0.1.1 closed several of the easy escapes, such as timer callbacks with a block body.
Adoption in an old codebase is handled well. Three rules take a per-file allowance with an exact count, and the rule reports when a file has fewer violations than allowed, so the list can only shrink.
The catch: no rule judges assertion quality, so a test that asserts `true` or only checks that a function was called still passes. The rules are written around Vitest and MSW; Jest, Mocha or Playwright Test suites get little from them. The recommended config is opinionated beyond testing: banning prose comments and annotated return types will fight many teams' conventions, so most will register only the testing plugin. And the project is three weeks old at 0.1.x, from one company.
Our take: for a TypeScript team already on Oxlint and Vitest, the testing plugin is a small dependency that closes the cheapest ways an agent can lie, and it pairs naturally with a person who still reads the assertions.
Where it earns its place
A platform engineer at a 20-person SaaS company
Stop agent pull requests that pass CI by mocking the code under test
Register only `landmines-testing` in `.oxlintrc.json` and run Oxlint in the agent's loop and in CI; `no-test-doubles` fails the change and its message points the agent at the real implementation plus MSW.
A tech lead with a flaky legacy Vitest suite
Adopt the rules without fixing hundreds of tests in one go
Set `no-flake-masking` and `no-fixed-sleep` with an `allow` block listing today's counts per file. New files must be clean, and each allowance must fall as old tests are fixed.
Before you commit
- Setup
- `bun add -d oxlint @interfere/landmines` (or the npm equivalent), then extend `./node_modules/@interfere/landmines/configs/recommended.json` in `.oxlintrc.json`, or list individual plugins and rules. Needs Oxlint 1.81+ and Node 22.18+.
- Integrations
- Oxlint JS plugins; rules understand Vitest APIs and config, MSW 2 and 3, and React Testing Library callbacks. The README suggests pairing it with anti-slop for type-level rules.
- Data and privacy
- Runs locally as a linter with no network access or telemetry described. Published to npm with provenance. MIT licence.
- Cost at scale
- Free. The cost is engineering time: real implementations and MSW handlers in place of mocks take longer to write than the shortcuts they replace.
- Limits
- Ten rules in 0.1.1, all set to error in the recommended config. No checks on assertion strength. Style and types rules are opinionated and may clash with existing conventions.
What’s good
- Catches mocked subjects, fixed sleeps, retries and raised timeouts
- Error messages tell the agent what to do instead
- Ratcheting per-file allowances for existing codebases
- Plugins can be registered one at a time
What’s not
- Does not detect weak or empty assertions
- Written for Vitest and MSW; little for other runners
- Recommended config bans comments and return types
- Young project at 0.1.x from one company
Best for
TypeScript teams on Oxlint and Vitest who let coding agents write or fix tests and want the common shortcuts blocked automatically.
landmines alternatives
landmines: common questions
- Is landmines worth it?
- landmines puts the test-gaming tricks of coding agents behind a lint error, which is cheap and useful, but it polices how a test waits and fakes, not whether it checks anything. We rate it 3.7 out of 5.
- How much does landmines cost?
- Free and open source (MIT).
- What are the downsides of landmines?
- Does not detect weak or empty assertions; written for Vitest and MSW; little for other runners; recommended config bans comments and return types; young project at 0.1.x from one company.
- Who is landmines best for?
- TypeScript teams on Oxlint and Vitest who let coding agents write or fix tests and want the common shortcuts blocked automatically.
- How much does landmines cost for a team or in production?
- Free. The cost is engineering time: real implementations and MSW handlers in place of mocks take longer to write than the shortcuts they replace.
- Is landmines safe for company data?
- Runs locally as a linter with no network access or telemetry described. Published to npm with provenance. MIT licence.
- What are the best landmines alternatives?
- The closest alternatives we have reviewed are Superpowers, ast-grep and CC Safety Net.
Answers checked Nov 20, 2026.