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

Aberta
#2,713 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 3 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
Meio dia
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
eslint, typescript
Domínio
devtools

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.]

Linguagem predominante
TypeScript
Estrelas
2k
Forks
301
Merge médio
3d 14h
PRs com merge (30d)
103

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Zoo-Code-Org/Zoo-Code

Todas as issues de Zoo-Code-Org/Zoo-Code

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.