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.
export async function loadUser(id: string) { const res = await fetch(`/api/users/${id}`); return res.json();}.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-expectasync-safety
ESLint rules for async correctness: fetch timeouts, AbortSignal forwarding, and shared-state / concurrency races.
require-fetch-timeoutcontracts
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-okServer and data
securityYou run server code (shell, HTTP, redirects, HTML rendering)10rulesobservabilityYou log through a structured logger4rulesprismaYou use Prisma (several rules need your tenant models)12rulesnestjsYou run BullMQ queues or@nestjs/schedule cron jobs9rulesllmYou call an LLM SDK1ruledatesYou store calendar days (due dates, leave days) as Dates and have a calendar module2rulesFrontend and apps
reactYou write React components18rulesrscYou use the Next.js App Router / React Server Components1rulequeryYou use TanStack Query, with or without tRPC6ruleselectronYou ship an Electron app3rulesA few lines of config per plugin.
Install it with the parser
ESLint 9 or 10, flat config only, TypeScript 5 or 6.
Spread its preset
configs.recommendedregisters the plugin and sets severities, nothing else.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.
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.jsimport tsParser from '@typescript-eslint/parser';import contracts from '@noctcore/eslint-plugin-contracts';
export default [ { ...contracts.configs.recommended, files: ['**/*.{ts,tsx}'], languageOptions: { parser: tsParser }, },];Is this for you?
Section titled “Is this for you?”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.
How these docs are built
Section titled “How these docs are built”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.