feat(scanner): ts-type-suppression detector (issue #129, first TS lite slice)#134
Open
noelsaw1 wants to merge 1 commit into
Open
feat(scanner): ts-type-suppression detector (issue #129, first TS lite slice)#134noelsaw1 wants to merge 1 commit into
noelsaw1 wants to merge 1 commit into
Conversation
…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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.json—category: 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.dist/PATTERN-LIBRARY.json/.md(viapattern-library-manager.sh) +run-fixture-tests.shexpectation.Verification
bin/check-pattern-library-json.sh→ OK; the pattern is registered inPATTERN-LIBRARY.json.@ts-expect-error // reasonline..ts/.tsx-scoped — cannot regress existing PHP/JS scans.Scope
First slice only. Remaining #129 patterns (
as any,<any>,: any, broadeslint-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-swarmrelay harness.🤖 Generated with Claude Code