Skip to content

feat(scanner): ts-type-suppression detector (issue #129, first TS lite slice)#134

Open
noelsaw1 wants to merge 1 commit into
developmentfrom
marathon-dogfood/ts-type-suppression
Open

feat(scanner): ts-type-suppression detector (issue #129, first TS lite slice)#134
noelsaw1 wants to merge 1 commit into
developmentfrom
marathon-dogfood/ts-type-suppression

Conversation

@noelsaw1

Copy link
Copy Markdown
Contributor

First "lite" slice of #129 (TypeScript antipattern detection): a new advisory grep detector for TypeScript type-system suppression directives.

What it adds

  • dist/patterns/ts-type-suppression.jsoncategory: typescript, severity: LOW (advisory/warning), file_patterns: ["*.ts","*.tsx"] only. Three sub-patterns: @ts-ignore, @ts-nocheck, and bare @ts-expect-error (no trailing explanation).
  • dist/tests/fixtures/ts-type-suppression.ts — bad + good cases.
  • Regenerated dist/PATTERN-LIBRARY.json / .md (via pattern-library-manager.sh) + run-fixture-tests.sh expectation.

Verification

  • bin/check-pattern-library-json.sh → OK; the pattern is registered in PATTERN-LIBRARY.json.
  • Scanner flags exactly 3 findings on the fixture (the three suppression forms) and excludes a documented @ts-expect-error // reason line.
  • Additive + advisory + .ts/.tsx-scoped — cannot regress existing PHP/JS scans.

Scope

First slice only. Remaining #129 patterns (as any, <any>, : any, broad eslint-disable, non-null-assertion abuse) are follow-ons.

Provenance

Built by an automated marathon dogfood (codex builder + agy reviewer, Approved) from the xyz-3-agents-swarm relay harness.

🤖 Generated with Claude Code

…check/bare @ts-expect-error (advisory, .ts/.tsx)

Marathon-dogfood build (xyz-3-agents-swarm harness): codex builder + agy reviewer
(Approved). Advisory LOW-severity grep pattern, .ts/.tsx only, additive. Detects 3/3
suppression directives on the fixture; documented `@ts-expect-error // reason` excluded.
First WPCC slice of issue #129. Committed manually because the marathon's cross-repo
auto-commit skipped the new untracked files (harness bug; build itself passed gate + review).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant