Skip to content
Esc

Catch what compiles but bites in production.

A family of 15 focused ESLint plugins for cross-file boundaries, IO contracts and the conventions generic linters cannot see.

src/api/users.ts
export async function loadUser(id: string) {
const res = await fetch(`/api/users/${id}`);
return res.json();
}
A fetch response must be checked with .ok or a status comparison before .json() parses its body.

Every rule is error or off. Never warn.

A warning is a rule nobody obeys. If a rule matters it fails the build, and if it does not fit your codebase you switch it off, where the config can see it.

  • error

    The build fails. The editor link lands on the rule's own page.

  • off

    Deferred on purpose, written down in your config, re-enabled one directory at a time.

  • warn

    Not shipped. A lint-meta check holds your repo to the same policy.

Start with three. Add the ones for your stack.

Each plugin is versioned and installed on its own. The starter set fits almost any TypeScript codebase.

code-quality

Portable code-quality, comment-hygiene and test-discipline ESLint rules: guard clauses, deterministic time, no stray process.exit, and tests that cannot pass vacuously.

no-vacuous-expect21 rules12 in recommended

async-safety

ESLint rules for async correctness: fetch timeouts, AbortSignal forwarding, and shared-state / concurrency races.

require-fetch-timeout7 rules4 in recommended

contracts

ESLint rules for IO contracts and config: checked fetch responses, parsed boundary data, error cause and taxonomy, zod schema and wire naming, env access, decimal money and translation keys.

fetch-must-check-ok17 rules6 in recommended

A few lines of config per plugin.

  1. Install it with the parser

    ESLint 9 or 10, flat config only, TypeScript 5 or 6.

  2. Spread its preset

    configs.recommended registers the plugin and sets severities, nothing else.

  3. Give it files and a parser

    The preset sets neither, so add both, or spread it next to your existing TypeScript config.

Every package page builds this config live: pick a preset and switch single rules. 15 plugins share the same shape.

Terminal
npm install --save-dev @noctcore/eslint-plugin-contracts @typescript-eslint/parser
# or: bun add -D / pnpm add -D @noctcore/eslint-plugin-contracts @typescript-eslint/parser
eslint.config.js
// eslint.config.js
import tsParser from '@typescript-eslint/parser';
import contracts from '@noctcore/eslint-plugin-contracts';
export default [
{
...contracts.configs.recommended,
files: ['**/*.{ts,tsx}'],
languageOptions: { parser: tsParser },
},
];

Yes, if you run a TypeScript codebase on ESLint 9 or 10 with flat config, and the bugs that reach review are structural: a component that drills props five levels down, a fetch with no timeout, a Prisma write outside its transaction, a log line that interpolates a user’s email. These plugins catch those with high-precision, mostly syntactic rules, and every rule is error or off, never warn (why).

Probably not, if you are on legacy .eslintrc config (these are flat-config only), you want a general style guide (use typescript-eslint and a formatter; these plugins assume both), or your codebase does not share the conventions a plugin encodes. Each package page says when it is a bad fit.

Every package is independently versioned. Install the one that matches the problem you have, or look up a single rule on the page that lists every rule.

Each rule page on this site is generated from the Markdown file that ships inside the npm tarball (docs/rules/<rule>.md), and the tables are generated from each plugin’s exported rule metadata. The Incorrect and Correct examples on every rule page are executed by that package’s test suite, so an example that stops matching the rule fails CI before it can reach this page.