Summary
Enhance AGENTS.md so agents do not add blanket ESLint suppression entries when they add or modify tests with many @typescript-eslint/no-explicit-any violations.
Rationale
AGENTS.md already states that suppression counts must not increase and that new code must use typed test doubles or unknown guards instead of any. The guidance needs a concrete workflow for large test files. This will make the rule easier to apply during implementation and review.
Affected area
AGENTS.md
- Test files that use
@typescript-eslint/no-explicit-any suppression counts in src/eslint-suppressions.json
Required changes
- Add a concise test-typing checklist for new and substantially changed test files.
- Require typed structural doubles, typed mock helpers, or
unknown plus type guards before a suppression is considered.
- Prohibit adding a new per-file
no-explicit-any suppression entry for a new test file.
- Require a narrow ESLint command with
--prune-suppressions after test typing changes.
- State that an unavoidable exception requires a local explanation and maintainer approval.
Acceptance criteria
AGENTS.md contains the new checklist and exception process.
- The text does not conflict with the existing
ESLint Suppressions section.
- The change does not increase any count in
src/eslint-suppressions.json.
References
Summary
Enhance
AGENTS.mdso agents do not add blanket ESLint suppression entries when they add or modify tests with many@typescript-eslint/no-explicit-anyviolations.Rationale
AGENTS.mdalready states that suppression counts must not increase and that new code must use typed test doubles orunknownguards instead ofany. The guidance needs a concrete workflow for large test files. This will make the rule easier to apply during implementation and review.Affected area
AGENTS.md@typescript-eslint/no-explicit-anysuppression counts insrc/eslint-suppressions.jsonRequired changes
unknownplus type guards before a suppression is considered.no-explicit-anysuppression entry for a new test file.--prune-suppressionsafter test typing changes.Acceptance criteria
AGENTS.mdcontains the new checklist and exception process.ESLint Suppressionssection.src/eslint-suppressions.json.References