eslint --prune-suppressions run per-file rewrites the whole suppressions ledger (AGENTS recipe side effect)

未關閉
#2,713 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 3 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
半天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
eslint, typescript
領域
devtools

研究方向

The trigger is the single-file eslint --prune-suppressions run recorded in src/eslint-suppressions.json, which rewrites entries for files it never linted. Start by reading how ESLint's suppression pruning decides which entries to keep, and check the AGENTS.md recipe that the issue quotes. Done means a per-file run leaves unrelated entries untouched or the recipe is changed to a safe dry-run form, verified by diffing the ledger after a single-file invocation on src/core/checkpoints/changeJournal.spec.ts.

由索引模型根據 Issue 內容生成。

描述

Our lane hit a side effect of the AGENTS.md recipe: running pnpm --dir src exec eslint --prune-suppressions --max-warnings=0 <one-file> rewrites src/eslint-suppressions.json for the whole repository - in our run it deleted and re-added 1,306 entries total, dropping entries of every file not linted in that single-file pass (e.g. anthropic-vertex 31 among them, none of them touching changeJournal).

Effect: following the documented per-file check and then committing silently rewrites the repo-wide suppression ledger to only what that one run saw.

Our mitigation (lane SOP, not a repo fix): use --prune-suppressions output read-only for the target file's count, restore the JSON before committing.

Ask: either scope pruning to the files actually linted, or add a keep-others/dry-run mode so the recipe can't footgun itself. Evidence from our run: single-file invocation on src/core/checkpoints/changeJournal.spec.ts; ledger diff 1,306 deletions + 1,306 additions with every other file's entries removed then restored via git checkout.
[Filed by the issue-1410 split lane; measurements and full diff available on request.]

主要語言
TypeScript
星號
2k
分支
301
平均合併
3 天 14 小時
30 天內合併 PR
103

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

Zoo-Code-Org/Zoo-Code 的其他 Issue

查看 Zoo-Code-Org/Zoo-Code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。