All rules
One row per rule, every package, generated from each plugin’s exported metadata. Each rule links to its page,
which has the options it takes and the Incorrect and Correct examples that run in that package’s test suite.
Filter the list below by name, package or description, by preset, or by what a rule can do. To jump straight
to one rule from any page, open the search with Ctrl K (⌘ K on a
Mac) or /. The same index is served as JSON at /eslint-plugins/rules.json
for tools and agents; the shape is documented below.
- rules
- 170
- on in recommended
- 54
- on in strict only
- 17
- opt-in
- 52
- lint-meta
- 47
- autofix
- 6
- suggestions
- 10
170 rules across 15 ESLint plugins and 1 lint-meta catalog. Of the 123 ESLint rules, 54 are switched on by a recommended preset, 17 more only by a strict preset (the house rules), 3 ship registered but off, and 49 are left out of every preset and enabled one by one. The 47 lint-meta rules run under @noctcore/harness, not ESLint. 2 rules read type information: noctcore-contracts/translation-key-exists (optional), noctcore-prisma/mutation-entry-must-reach-audit (required).
Showing 170 of 170
<Component>Props. Autofixes by renaming the in-file type declaration and its references when that is safe.strictautofixvalue must not be an inline object, array or function: a fresh reference each render re-renders every consumer. Memoize it with useMemo / useCallback and pass the stable reference.erroruse* hook in a hook file may return object literals (top-level or nested one level) of at most max (default 20) members. Wider returns are god-controllers in the making.strict*.hooks.ts / *.queries.ts / *.mutations.ts) may export at most max (default 4) use* hooks. Split larger files.strict*Props interface/type-literal may declare at most max (default 12) local members. extends clauses are not counted.strictuse* hook in a hook file may keep at most max (default 4) useState / useReducer slots, and a function inside it may call at most maxSettersPerFunction (default 3) distinct setters. Group the rest in a reducer.strictsetState calls with values derived purely from its dependencies is the "you might not need an effect" anti-pattern — compute the value during render (or with useMemo) instead.error{...}. Lift them to a const above the return or into the hook.strictuse*-named function must not return JSX — that is a component wearing a hook costume. Rename it to a PascalCase component, or return values instead of elements.errortype="date" and friends): Chromium formats them in the browser UI language and ignores lang, so the date order can contradict the page.not listedopt-inmaxForwarded+ (default 4) props each forwarded unchanged (name={name}) from the *Props param to the same child component is prop drilling. Compose instead.error<Name>.hooks.ts), not in the component .tsx body. The component is a thin shell.strictlocalStorage / sessionStorage access must sit inside a try with a catch: the access itself throws when storage is disabled, partitioned or full.errorsuggestionautoComplete purpose, so a password manager can fill the current password and save a new one.erroruseState initializer that is an expensive call (default JSON.parse / localStorage.getItem / sessionStorage.getItem, or a configured builder) must be wrapped in a function so it runs once on mount, not every render.errorautofixuserId, currentUser, *token*, *jwt*, *secret*, apiKey, ...) are disallowed. A live password input is a legitimate visual concern and is intentionally allowed.errorsetState/dispatch that runs after an await or .then() inside a useEffect must be guarded against a unmounted/re-run effect (AbortController, a cancelled flag, or a cleanup return).errorindex.* file with an export … from re-export) must contain only re-exports, never local declarations, side effects, or default-exported values.strictinclude glob must have a colocated *.test.* / *.spec.* sibling on disk.not listedopt-in <Name>/<Name>.tsx under <componentRoot>/<feature>/... must have its sibling set (.hooks.ts, .types.ts, .stories.tsx, .test.tsx, index.ts) present on disk.strictfolders, a file's basename must match pattern, a regular expression built from the folder's name.not listedopt-in index.ts must re-export the component default (export { default as <Name> } from './<Name>').strictmax parent levels (default 3). Autofixed to a path alias when one is configured.strictautofiximport().not listedopt-in scopes must be consumed through their package barrel only — never via a deep subpath into package internals.not listedopt-in @scope/pkg/<subpath> that the target workspace package's exports map does not expose. Reads the target package.json from disk.not listedopt-in process.env.FOO / import.meta.env.FOO key to be declared in a schema file (.env.example or a zod-env module), so config access and config declaration cannot drift apart.not listedopt-in .ok or a status comparison before .json() parses its body.errornumber. Money-named fields explicitly typed : number lose precision to float rounding; use a Decimal money type instead.errorprocess.env access. Force every consumer through a typed, validated config accessor so a missing variable fails at boot, not at use.error${error} interpolation, error.toString(), or error + "". These give "Error: <message>" or "[object Object]". Use error instanceof Error ? error.message : String(error) instead.errorsuggestioncatch to forward the caught error as { cause }. A throw new SomeError(...) that omits the cause severs the chain to the original failure.errorautofix suggestionas T instead of parsing it at runtime. Flags casts of JSON.parse, res.json(), web storage, URL search params, message-event data and LLM tool input, directly or through a const; use a zod/valibot parse.offopt-inthrow to an approved error taxonomy. Flags throwing a non-allowlisted error class and throwing a non-Error value (string, object, number, ...).not listedopt-in :name parameters to carry a param validator in its handler chain.not listedopt-inz.string() in another, which widens the wire type every consumer then narrows by hand.errort(...), i18n.t(...), <Trans i18nKey>) to exist in the catalog of the namespace in scope.not listedopt-in optionaltype: z.literal(...) must set that literal to kebab-case(const name minus its role suffix).strictautofix.describe() or .meta({ description }), so generated JSON Schema, tool definitions and API docs have text for each field.not listedopt-inSchema, paired with a same-named inferred type (export type Foo = z.infer<typeof FooSchema>).strictuseFakeTimers() must also call useRealTimers(), so fake timers do not leak into later tests.errorI followed by an uppercase letter. Module/global augmentations are exempt.not listedopt-inDate.now() / new Date() in business logic. Read wall-clock time through a shared clock util (nowMs() / now()) so time is mockable.strictexpect() inside a branch, catch or loop that may not run: a skipped assertion lets a broken test pass.errortoThrow() with no argument or with only a message: any error passes, including a TypeError from a broken mock. Pin the error class.not listedopt-inprocess.exit() outside bootstrap/shutdown paths and standalone CLIs. Application and service code must throw or reject so the lifecycle can shut down gracefully.errorDate.now(), new Date()) unless the file fakes it; an offset from now (Date.now() + 60_000) is allowed.not listedopt-innew Promise((r) => setTimeout(r, n)), timers/promises): fake the timers or wait for the condition.not listedopt-intry whose catch neither rethrows nor asserts, and .catch() handlers that swallow an expect(...).rejects/.resolves failure: the assertion fails, the error is dropped, and the test passes.error<template>.trim() === '' ? fallback : <template>.trim() patterns. Extract to a named utility so the expression is built once and is unit-testable in one place.not listedopt-intypeof checks, literal tautologies, a sole toBeDefined/toBeTruthy, a sole presence check on the render root): a test must assert behaviour that a real regression would break.errorif without an else.strictexpect(page.url()), expect(await page.title())): the check runs once, possibly before the navigation lands. Use the retrying toHaveURL / toHaveTitle.not listedopt-insuggestion.skip / .fixme / xit / xdescribe, and unconditional node:test { skip } / { todo } / t.skip()) must carry a tracking marker (an issue URL or TODO(@owner)) on or above the line, so the debt has an owner instead of rotting silently.errorsuggestionjest.fn() / vi.fn() mocks cast as unknown as T: the double cast switches type checking off, so a mock of a renamed or removed method keeps passing.not listedopt-inAbortSignal (param named signal or typed AbortSignal) but awaits a call without ever forwarding it leaves that work uncancellable.errorPromise.all(arr.map(async …)) callback, can lose updates.errorsetTimeout timeout raced with Promise.race must be cleared — otherwise the timer outlives the race whenever the other promise wins.errorinclude.not listedopt-in const x = await read() statements can run concurrently via await Promise.all([...]).offopt-insuggestionfetch (or configured wrapper) call must carry a signal/timeout in its options — an unbounded request can hang forever.errorsuggestione.message / String(e) / ${e} — log the error itself so its stack and cause survive.errorsession, sid, auth_token, authToken by default) must be written with httpOnly: true, secure and a valid sameSite.not listedopt-inhash / hashSync / genSalt / genSaltSync call must not pass a literal cost below minRounds (default 10).not listedopt-inexec/execSync, or spawn/execFile with a shell option that is not false), including through promisify(exec). Pass the program and arguments separately.error=== / !== / == / != or Buffer#equals; use crypto.timingSafeEqual.errorcreatePresignedPost call must pin the upload size and Content-Type in literal Conditions.errorreq.*) passed directly into path.join / path.resolve without a containment test on the result is a path-traversal sink.not listedopt-indangerouslySetInnerHTML, innerHTML, outerHTML or insertAdjacentHTML must be static markup or pass through a configured sanitizer.not listedopt-in'use server' module every exported action must be built from a configured action client; a raw exported function bypasses input validation, error shaping and middleware.not listedopt-in $transaction callback, where it rolls back with the business work. It does not check that mutations are audited at all.errorwhere or data is read from client input. Without row-level security, a client-supplied tenant id is a cross-tenant access (IDOR).errordata (or where) is the raw request body. Passing client input straight through lets a caller set any column (mass assignment) or widen the filter.error$transaction(async (tx) => ...) callback, writes must go through the tx parameter, not the outer client, so they participate in the transaction and roll back together.error$transaction. A partial failure between writes leaves half-written state.errorwhere. Soft delete is convention only, with no Prisma extension injecting the filter, so a query that omits it reads and mutates deleted rows.not listedopt-in where of a read or bulk write on a tenant-scoped model through the unscoped client, and a scope column in the where of any query on a hand-scoped model.not listedopt-in data of a create on a tenant-scoped Prisma model through the unscoped client, which does not inject the tenant scope.not listedopt-in redirect(), notFound() and the other throwing next/navigation calls inside a try whose catch swallows the error instead of rethrowing it.erroreval, a shell, raw SQL, HTML injection, a fetch origin or an fs path in the same function without being validated or sanitized first.error@Processor(...), @InjectQueue(...) and <queue>.add(...) to be shared constants, not inline string literals.not listedopt-in.add / .addBulk job to state attempts, and a backoff when it retries, in its options or its queue's defaultJobOptions.not listedopt-in.add / .addBulk job to carry a jobId or deduplication in literal options, so a producer retry cannot enqueue the same work twice.not listedopt-in.add job to state removeOnComplete and removeOnFail in its options or its queue's defaultJobOptions, so finished jobs do not pile up in Redis.not listedopt-inconnection to take its options from a configured factory function, not from literal host, port or URL values.not listedopt-in @Cron to state timeZone (or utcOffset) and a BullMQ cron schedule to state tz, so it does not run in whatever zone the host has.errorconcurrency, on new Worker(...) or @Processor(queue, options), to be a positive integer, and with requireExplicit require it to be stated.not listedopt-inWorker in a field to call .close() on it in a shutdown method such as onModuleDestroy, so in-flight jobs are not abandoned.errornew Worker(...) to have a .on('failed', ...) listener in the same file, so a failing job is not silent.erroruseMutation, not as per-call mutate() options, which a detached observer never delivers.erroronError on the hook, onError or a catch at the call, or a read of its error state.not listedopt-insetQueryData(PREFIX, ...) and getQueryData(PREFIX) when the file builds its query keys as [...PREFIX, id]: the exact-key call misses every entry, and setQueriesData / getQueriesData match the prefix.not listedopt-insuggestionqueryFn that catches its error and returns a fallback value, which turns a failed request into cached data the query reports as a success.not listedopt-inpathKey() when a tRPC procedure is invalidated, refetched, cancelled, removed or reset without an input. A bare queryKey() misses infinite queries.errorautofixipcMain.handle / ipcMain.on handler to check its sender (event.senderFrame) in its first statement, before it does anything else.not listedopt-inshell (openExternal, openPath) to the files listed in allowIn, so URLs and paths reach the operating system through one checked module.not listedopt-in nodeIntegration, webviewTag or allowRunningInsecureContent set to true, or contextIsolation, sandbox or webSecurity set to false.errorgetUTC* / setUTC*, Date.UTC(), setMonth, and milliseconds-per-day constants) outside the calendar module listed in allowIn.not listedopt-inDate accessors, new Date('YYYY-MM-DD'), and toISOString().slice(0, 10).not listedopt-in@sha256: digest (scratch and earlier build stages exempt).harnessfiles or ignores entry (and the directory a files glob starts in) must exist, so a moved folder cannot leave an override that applies to nothing.harnessconcurrency mapping must state cancel-in-progress; the string form passes unless requireMappingForm is set.harness${{ (an opener followed by another {, or one with no closing }}), which fails the whole workflow before any job runs.harnesspermissions: (no write-all/read-all, no <scope>: write); writes go on the job that needs them.harnessrun: and github-script bodies never expand attacker-controllable ${{ }} context (issue/PR titles, comments, branch names); pass it through env: instead.harnesspull-requests: read grant; a job-level permissions: block replaces the workflow-level one.harnesscancel-in-progress: true in a workflow-level or job-level concurrency, so a newer run cannot cancel a scan halfway.harnessuses: refs must be pinned to a 40-character commit SHA with a # vN comment (local ./ actions exempt).harness@sha256: digest (a service that builds locally is exempt).harnessinclude must have a colocated sibling test. Pure helpers must ship a test.harnessinclude or files (and the directory a glob entry starts in) must exist, so a renamed folder cannot drop out of type checking in silence.harnessNo rule matches these filters
Try a package name like prisma, a concept like timeout or tenant, or clear the preset and capability filters.
Preset: the rule's severity in its package's configs.recommended. strict is on only in configs.strict, the package'srecommended plus its house rules. error is on. off (registered, switched off) and not listed (left out) are both opt-in: you turn the rule on yourself. means it does nothing until you configure it. harness marks a lint-meta rule, which has no ESLint preset. deprecated marks a rule that still works but is in no preset and will be removed; move to the rule named after it. Fix:autofix with --fix,suggestion in your editor. Types: whether the rule needs a type-checked program (parserOptions.projectService), or uses one when present.
Machine-readable index
Section titled “Machine-readable index”rules.json is generated at build time from the same catalog as the
table above, so it cannot disagree with it. llms.txt at the site root
points here and at it. The shape is a public contract: fields are added, never renamed or removed,
without a schemaVersion bump. A build check asserts the file has exactly one entry per rule doc and
that every url resolves to a page on this site.
Top level:
| Field | Meaning |
|---|---|
schemaVersion |
Integer, currently 1. Bumped only on a breaking change to this shape. |
generatedAt |
ISO timestamp of the build that emitted the file. |
site |
The site root URL. |
rulesPage |
URL of this page. |
count |
Number of entries in rules. |
packages |
One entry per package: name (npm), short, version, description, kind, namespace, url. |
rules |
One entry per rule, in package order then by name. |
Each entry in rules:
| Field | Meaning |
|---|---|
id |
The id a config or a report uses: noctcore-react/no-prop-drilling, or the bare lint-meta id. |
name |
The rule name without its namespace. |
package |
npm name of the package that exports it. |
runner |
eslint, or harness for a lint-meta rule that runs under @noctcore/harness. |
description |
The rule’s meta.docs.description. |
url |
The rule’s page on this site, the same URL as its meta.docs.url. |
recommended |
error or off in the package’s recommended preset; null when the preset leaves it out, and for lint-meta rules. |
strict |
error or off in the package’s strict preset (recommended plus the house rules); null when the package has no strict preset, the preset leaves it out, and for lint-meta rules. |
fixable |
Whether the rule has an autofix. |
hasSuggestions |
Whether the rule offers suggestions. |
typeInfo |
required, optional or none: whether the rule needs a type-checked program. |
deprecated |
Whether the rule is deprecated. A deprecated rule still works, but no preset enables it. |
replacedBy |
Ids of the rules to use instead of a deprecated one; empty when there is none. |
deprecatedSince |
The package version that deprecated the rule, or null. |
category, ciCritical, factory, entry |
lint-meta rules only: the harness category, whether a violation fails CI by default, the factory export and the entry point that exposes it. |