From 3cbe4171eace7a9f8d85489a82b37977b2464ce7 Mon Sep 17 00:00:00 2001 From: Danny Kim Date: Sat, 17 Oct 2026 18:50:24 +0900 Subject: [PATCH] Describe the Deno size limits in the notes --- .agents/memory/bot-agents-lint-opt-outs.md | 12 ++++---- .agents/memory/lint-config-shape.md | 18 ++++++------ .agents/memory/lint-overrides-policy.md | 33 ++++++---------------- .agents/memory/project-lint-plugin.md | 8 +++--- 4 files changed, 28 insertions(+), 43 deletions(-) diff --git a/.agents/memory/bot-agents-lint-opt-outs.md b/.agents/memory/bot-agents-lint-opt-outs.md index 7145c6d..c80e8d5 100644 --- a/.agents/memory/bot-agents-lint-opt-outs.md +++ b/.agents/memory/bot-agents-lint-opt-outs.md @@ -1,5 +1,5 @@ --- -description: bot-agents lint has prefer-readonly-parameter-types off (Node/web types can't satisfy it) and no overrides; nothing else +description: bot-agents lint has prefer-readonly-parameter-types and the size/complexity rules off (Deno had no limits) and no overrides; nothing else --- The repo follows [[lint-config-shape]] with one recorded exception, present @@ -14,8 +14,8 @@ when the migration PR was approved: from `@typescript-eslint/types` instead of string literals ([[lint-overrides-policy]]). -Oxlint's default size limits apply to `src/`; the migration split `run.ts` -into `run-context.ts`, `agents.ts`, and `agent-{claude,codex,opencode}.ts`, -and `post.ts` into `post.ts` + `post-artifacts.ts`, rather than raising them. -Sequential awaits in loops became recursion or a `reduce` chain to stay -sequential. Add no other opt-out without the user. +Size and complexity limits match Deno, which had none here, so every Oxlint +limit rule is `"off"` ([[lint-config-shape]]). `run.ts` and `post.ts` keep +main's single-file layout (2026-10-17 revert of the size splits). Sequential +awaits in loops became recursion or a `reduce` chain (`no-await-in-loop`) to +stay sequential. Add no other opt-out without the user. diff --git a/.agents/memory/lint-config-shape.md b/.agents/memory/lint-config-shape.md index ffe5e0f..6bd2c3e 100644 --- a/.agents/memory/lint-config-shape.md +++ b/.agents/memory/lint-config-shape.md @@ -1,5 +1,5 @@ --- -description: vite.config.ts lint uses Oxlint categories at error with default limits, names no rule itself, and spreads configs from the plugins and scripts/project-lint.ts +description: vite.config.ts lint uses Oxlint categories at error with Deno size limits, names no rule itself, and spreads configs from the plugins and scripts/project-lint.ts --- The lint config is short and category-driven (user decisions 2026-10-14/15): @@ -19,13 +19,15 @@ lint: { - **Categories:** `correctness`, `suspicious`, `pedantic`, `perf` at `error`. `style` and `restriction` are never turned on wholesale; pick single rules from them in `configs.project`. Extra rules that categories bring are fine. -- **Default limits stay** (2026-10-16): pedantic's `max-lines` 300, - `max-lines-per-function` 50, `max-classes-per-file` 1, - `max-dependencies` 10, `max-params` 3, `complexity` 20. Don't raise them to - make code pass; refactor (see [[lint-overrides-policy]]). `max-lines` stays - at 300 everywhere, `scripts/` included, with no override (2026-10-16): split - a long file by theme instead. Do not add new opt-outs anywhere without - asking the user. +- **Size limits match Deno** (2026-10-17, replaces the 2026-10-16 "default + limits stay"): repos behave as they did on Deno. bot-agents ran `deno lint` + with no config, so it had no size or complexity limit, and every Oxlint + limit rule (`complexity`, `max-lines`, `max-params`, `id-length`, + `no-nested-ternary`, `max-lines-per-function`, `max-classes-per-file`, + `max-depth`, `max-nested-callbacks`, `max-statements`, + `import/max-dependencies`, `unicorn/max-nested-calls`) is `"off"` in + `configs.project`. No file is split for size. Do not add new opt-outs + anywhere without asking the user. - **`vite.config.ts` names no rule.** Every rule id, built-in ones included, lives in `configs.project` of `scripts/project-lint.ts` ([[project-lint-plugin]]). `vite.config.ts` only spreads configs. diff --git a/.agents/memory/lint-overrides-policy.md b/.agents/memory/lint-overrides-policy.md index 3bdeef4..d745855 100644 --- a/.agents/memory/lint-overrides-policy.md +++ b/.agents/memory/lint-overrides-policy.md @@ -1,5 +1,5 @@ --- -description: No lint overrides for source files; narrow ones only for scripts/**; generated files go in ignorePatterns; refactor (barrels, splits) instead of raising limits +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 @@ -18,31 +18,14 @@ practice. ## Fix the code instead -Oxlint's defaults stay; violations are refactored without behavior change, -covered by the tests, inside the same migration PR. +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 = new Set([...])` with `.has`. -| Rule | Usual fix | -| ------------------------- | ------------------------------------------------------- | -| `import/max-dependencies` | import a barrel (`#ui`) instead of many direct modules | -| `max-lines` | split the file by responsibility | -| `max-lines-per-function` | extract helpers | -| `max-classes-per-file` | one class per file | -| `max-params` | pass one options object | -| `prefer-set-has` | `const K: ReadonlySet = new Set([...])`, `.has` | - -```ts -// before: 14 imports, over the limit of 10 -import { a } from "#ui/button"; -import { b } from "#ui/dialog"; -// after: one barrel -import { a, b } from "#ui"; -``` - -Measured on memona before the move (Oxlint 1.87, default limits): 921 -pedantic hits in 274 files, of which `max-lines-per-function` 206, -`max-lines` 145, `max-classes-per-file` 59, `max-dependencies` 45 (median 14 -imports, worst 29). The user chose refactoring over raising limits or -matching memona's old hugoalh limits (2048 lines per file, no function limit). +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 diff --git a/.agents/memory/project-lint-plugin.md b/.agents/memory/project-lint-plugin.md index da61ac1..f0af358 100644 --- a/.agents/memory/project-lint-plugin.md +++ b/.agents/memory/project-lint-plugin.md @@ -13,10 +13,10 @@ Oxlint plugin with `meta.name` `"project"`, loaded through `jsPlugins` in - **Custom rules**, enabled as `project/`. Every repo has `no-disable-comments` and `no-asset-imports`; bot-agents has no others. -`scripts/` stays flat; don't add `scripts/rules/`. A file that would pass -`max-lines` (300) splits into flat themed files sharing the prefix: -`scripts/project-lint.ts` keeps the plugin object and the rule list and -imports the others (`project-lint-modules.ts`, `project-lint-types.ts`, ...). +`scripts/` stays flat; don't add `scripts/rules/`. If the plugin ever needs +more files, they sit flat beside it and share the prefix +(`project-lint-modules.ts`, ...); `scripts/project-lint.ts` keeps the plugin +object and the rule list. ```ts import type { DummyRuleMap } from "vite-plus/lint";