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

Abierto
#2,713 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
eslint, typescript
Área
devtools

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
2k
Forks
301
Merge medio
3 d 14 h
PR fusionados (30 d)
103

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Zoo-Code-Org/Zoo-Code

Todos los issues de Zoo-Code-Org/Zoo-Code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.