Files
bot-agents/.agents/memory/lint-overrides-policy.md
T
Danny Kim ccfb08f4d5 Document that package.json aliases may target only direct subfolders of src (#21)
Follow-up to #20, which was merged before this landed.

bot-agents has no `package.json` `imports` aliases (`src/` is flat and everything imports relatively), so no code changes. This records the new rule in the docs:

- `.agents/memory/imports-aliases-barrels.md`: aliases may target only a direct subfolder of `src/` (its `index.ts` or a `#x/*` pattern); nothing outside `src/`, not `src/` itself, not deeper folders; such code imports relatively.
- `.agents/memory/tests-layout-vitest.md`: `tests/` reach the public entry through a relative import, not a `#plugin` alias.
- `.agents/skills/migrate-deno-repo/SKILL.md` and `AGENTS.md`: same rule.

`vp check`, `vp test`, and `damem doctor` pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Reviewed-on: #21
Reviewed-by: bot <noreply@capsulizers.com>
Co-authored-by: Danny Kim <temeddix@gmail.com>
Co-committed-by: Danny Kim <temeddix@gmail.com>
2026-10-18 14:37:49 +00:00

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 overrides entry may target src/** or any other hand-written production or test code.
  • The one exception is in lint-plugin repos: import/max-dependencies off for src/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-console in a CLI script.
  • Generated files: list them in ignorePatterns, never overrides.
  • 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).