Search tools, AI agents, MCP servers
Submit a tool

Search iThub

Search tools, categories and collections. Type at least two characters.

Explore all tools
↑ ↓ to explore resultsEnter to open · Esc to close
L

landmines

Oxlint plugins from Interfere that flag mocks, fixed sleeps, test retries and other shortcuts in AI-written code

API Clients, Testing & QAOpen source@interfere/landmines@0.1.1

landmines at a glance

Pricing
Open source
License
Open source
Version
@interfere/landmines@0.1.1November 18, 2026
Language
TypeScript
Data location
landmines runs locally inside Oxlint on the developer's machine or CI runner; it operates no service and sends no code or data anywhere.
Maker
interfere-inc
Founded
2026

What is landmines?

landmines is a set of plugins for the Oxlint JavaScript and TypeScript linter, published on npm as @interfere/landmines by Interfere, Inc. under the MIT license. The README summarizes its purpose as rules that keep AI-written code honest. It lists shortcuts coding agents take to get green checks, such as mocking the code under test, sleeping until a race usually passes, retrying flaky tests, raising timeouts and narrating the diff in comments, and adds rules that fail on these patterns. Each rule message says what to do instead, so that an agent or a person can fix the finding in the same loop. According to the README, the rules were built and are used in production at Interfere, a company that offers production visibility and bug detection for software teams.

The package contains ten rules in four Oxlint JS plugins, each exported as its own entry point: landmines-testing (five rules for test code), landmines-style (one rule against prose comments), landmines-structure (three rules for test placement, file names and package exports) and landmines-types (one rule against explicit return types). A recommended configuration registers all four plugins and sets every rule to error. The rules are written in TypeScript against @oxlint/plugins and use zod to validate rule options. The repository's own tests run on Vitest, and each rule has a test file next to it.

landmines requires Oxlint 1.81 or later, declared as a peer dependency, and Node.js 22.18 or later. The README installs it with Bun as a development dependency together with Oxlint and configures it in .oxlintrc.json, either by extending the recommended configuration from node_modules or by listing selected plugins under jsPlugins and enabling individual rules. Packages are published to npm with provenance from the repository's release workflow, and versions are managed with Changesets.

The first functional version, 0.1.0, was released on November 17, 2026 as the initial release of the testing, style, structure and types plugins. The current version, 0.1.1 of November 18, 2026, is a patch release. According to the changelog, it adds an allow option to no-comments, extends no-fixed-sleep to timer callbacks with block bodies and to callbacks that run while a test waits (configurable with runNow), makes no-flake-masking report testTimeout and hookTimeout in a Vitest config file, reports no-unsignaled-poll on expect.poll chains that end in a spy matcher, and lets strict-msw accept msw 3's onUnhandledFrame option.

The testing rules target Vitest-style APIs such as vi.fn, vi.waitFor, vi.setConfig, vi.useFakeTimers and expect.poll, and Mock Service Worker (MSW) versions 2 and 3 for network mocking. The documentation covers Oxlint only. For type-level problems such as chained assertions and unsafe dictionaries, the README points to the separate anti-slop project. Related listings on iThub include React Doctor, which produces deterministic diagnostics for React projects, and antislop, agent skills that filter generic AI-generated interfaces, copy and code comments.

Key capabilities

  • npm package The package is @interfere/landmines on npm, installed with bun add -d oxlint @interfere/landmines as shown in the README. It ships compiled ES modules in dist and the configs folder, with exports for ./testing, ./style, ./structure, ./types and ./configs/recommended.json.
  • Recommended configuration Adding "extends": ["./node_modules/@interfere/landmines/configs/recommended.json"] to .oxlintrc.json loads all four plugins and turns on all ten rules at error level. The recommended.json file in the repository lists the exact rule set.
  • Selective registration Projects can instead register only some plugins in the jsPlugins array, each with a name and a specifier such as @interfere/landmines/testing, and enable chosen rules under rules, for example "landmines-testing/no-test-doubles": "error".
  • no-test-doubles Reports replacing dependency behaviour in tests: module mocks, vi.fn with an implementation, stubbed globals, patched prototypes, hand-written bindings and fake responses. The README asks for the real implementation and MSW for network calls. Spies that only observe calls are allowed.
  • strict-msw Reports MSW servers or workers started without strict handling of unmatched traffic: onUnhandledRequest: "error" for msw 2 or onUnhandledFrame: "error" for msw 3. Without that setting, requests that no handler covers can reach the real network.
  • no-fixed-sleep Reports awaited fixed delays inside test, it and the four lifecycle hooks: a new Promise resolved through setTimeout, setTimeout imported from node:timers/promises, scheduler.wait and Bun.sleep. Files that call vi.useFakeTimers() are not reported. The message asks to await the operation or a promise its handler resolves, or to use fake timers to move time.
  • Sleeps in callbacks that run immediately Since 0.1.1, no-fixed-sleep also checks callbacks that run while the test waits, by default those passed to act, waitFor, then, catch, finally and step. The runNow option replaces that list, for example to add within. Callbacks handed to other calls, such as page.route handlers, are not checked.
  • no-unsignaled-poll Reports expect.poll and vi.waitFor used on request recorders and spy state, which race a deadline instead of awaiting an event. Since 0.1.1 this includes expect.poll chains ending in a spy matcher such as toHaveBeenCalledTimes.
  • no-flake-masking Reports test retries and raised timeouts: a retry option or a timeout in the options of test, it, describe or suite, a numeric timeout passed as the third argument, testTimeout or hookTimeout passed to vi.setConfig, and the same keys in the test block of a Vitest config. The rule's description is to fix flaky tests at their cause.
  • Allowlists that only shrink no-fixed-sleep, strict-msw and no-flake-masking accept an allow map from file path to an exact count, for adopting the rules in an existing codebase. When a file has fewer violations than its allowance, the rule reports that the entry must be lowered, so the list can only shrink. In no-flake-masking the allowance covers timeouts; retry settings are always reported.
  • no-comments The landmines-style plugin reports prose comments, on the basis that rationale belongs in the pull request. Functional directives such as oxlint-disable, @ts-expect-error and /* @__PURE__ */, license headers, single-line // WARNING: comments and TSDoc on exported public API are allowed.
  • no-comments options publicApi takes regular expressions matched against file paths, so TSDoc is allowed only in published packages. allow, added in 0.1.1, sets the kept single-line prefixes; it defaults to WARNING, and adding SAFETY keeps the comments that anti-slop's type assertion rule requires.
  • colocated-tests Part of landmines-structure, this rule reports tests that are detached from the implementation they import. Tests are expected beside their subject or in its local tests/ directory.
  • test-file-names Reports file names such as .spec.ts, .tests.ts, helpers.ts and mocks.ts. The expected suffixes are .test.ts, .fixture.ts and .test-utils.ts.
  • package-exports Reports unrestricted source exports in package.json, such as "./*": "./src/*.ts". Packages are expected to declare explicit entry points or named public namespaces.
  • no-explicit-return-types The landmines-types plugin reports annotated return types on function implementations. The README suggests letting TypeScript infer them and using satisfies where a contract needs to be pinned.
  • Requirements Oxlint 1.81 or later and Node.js 22.18 or later. The package itself depends on @oxlint/plugins 1.81.0, the Babel parser and types, oxc-resolver and zod.
  • Development and releases Contributors run bun install, then bun run lint, bun run typecheck and bun run test, and add a changeset for user-facing changes. Releases appear on GitHub with tags such as @interfere/landmines@0.1.1 and on npm with provenance.

Where landmines fits

Removing fixed delays from a test suite

With no-fixed-sleep enabled, an awaited new Promise(r => setTimeout(r, 100)) or Bun.sleep inside a test or hook becomes a lint error whose message points to awaiting the operation itself or using vi.useFakeTimers(). Sleeps hidden in act or then callbacks are covered too, and the runNow list can be extended for project-specific helpers.

Keeping flaky tests visible

no-flake-masking blocks per-test retry options and raised timeouts in test calls, vi.setConfig and the Vitest config. The project's position, stated in the rule messages, is that a test that passes on rerun is a flake to fix by waiting on the event it depends on, with slow shared setup moved into a beforeAll hook.

Adopting the rules in an existing codebase

For legacy files, the allowlist option records the current number of violations per file, for example two timeout bumps in one test file. New violations fail immediately, and when a file is cleaned up the rule asks for its allowance to be lowered, so the backlog only decreases.

Testing against real implementations

Combining no-test-doubles and strict-msw leaves observation-only spies and MSW handlers as the remaining tools: module mocks and stubbed implementations are reported, and MSW must error on unhandled requests so nothing falls through to the real network.

Guardrails for coding agents

Because each rule message describes the expected fix, the rules fit into the loop of an AI coding agent that runs the linter after each change. The README frames this as making the honest path the only one that lints, so shortcuts such as sleeps, retries and narrating comments are caught before review.

Enforcing test layout and package boundaries

The structure rules keep tests next to the code they import, standardize test file suffixes and require explicit exports entries in package.json. Like no-explicit-return-types, these are layout and style conventions rather than test-reliability checks, and each rule can be enabled on its own.

Install

bun add -d oxlint @interfere/landmines

Reviews of landmines

No reviews yet

Be the first to share your experience with landmines.

Loading review form…

Found landmines useful? Upvote it todayYour vote helps other IT teams find it in the daily ranking.

Similar to landmines

Compare:landmines vs Postmanlandmines vs Insomnialandmines vs ARTEMIS

  1. PostmanAPI platform for designing, testing and documenting APIsAPI Clients, Testing & QA20 views
  2. InsomniaOpen-source API client for REST, GraphQL, gRPC and MCPAPI Clients, Testing & QA13 views
  3. ARTEMISGoogle's open-source agent that runs Android UI tasks and tests from natural-language instructionsAPI Clients, Testing & QA4 views
  4. BrunoOffline API client that stores collections as plain-text files in Git, with a desktop app, CLI and VS Code extensionAPI Clients, Testing & QA3 views
  5. AWS EmulatorLocal emulator of the AWS APIs for testing with the AWS CLI and SDKs, no AWS account neededAPI Clients, Testing & QA2 views
  6. HoppscotchOpen-source API client for REST, GraphQL and realtime protocols, on the web, desktop, CLI or your own serverAPI Clients, Testing & QA2 views
  7. RDReact DoctorDeterministic diagnostics for React projectsAPI Clients, Testing & QA2 views
  8. FFlociFree local AWS emulator for development, testing and CIAPI Clients, Testing & QA1 views