1.6 KiB
1.6 KiB
description
| description |
|---|
| No lint overrides for source files; narrow ones only for scripts/**; generated files go in ignorePatterns; size limits match Deno, so nothing is split for size |
Final policy (2026-10-16). The user considers per-file overrides bad
practice.
- Source files: never. No
overridesentry may targetsrc/**or any other hand-written production or test code. - The one exception is in lint-plugin repos:
import/max-dependenciesoff forsrc/rules/index.ts, the rule registry, which must import every rule. It is not a precedent for apps. scripts/**: a narrow override is allowed when a tooling script truly needs it, e.g.no-consolein a CLI script.- Generated files: list them in
ignorePatterns, neveroverrides. - Anything else needs the user's approval first. When the user is away, don't add it: refactor, or leave the violation failing and log the question.
Fix the code instead
Category rule violations are fixed in the code without behavior change,
covered by the tests, inside the same migration PR; e.g. prefer-set-has
becomes const K: ReadonlySet<string> = new Set([...]) with .has.
Size and complexity limits are not refactored for: they match what Deno
enforced (2026-10-17, replacing the earlier "refactor to Oxlint's defaults"),
which for bot-agents is none, so those rules are "off"
(lint-config-shape).
Alias rule: an alias may point anywhere and owns its target (a folder's
index.ts owns the folder and below, any other file owns only itself); no
two aliases may own the same file, and ../ is banned everywhere
(imports-aliases-barrels).