ai-slop/ts-directive manual fix
Unexplained TypeScript directive.
A `@ts-ignore`, `@ts-expect-error`, or `@ts-nocheck` directive without a reason comment. Silences the type checker on that line forever.
Bad — what an agent ships
// @ts-ignore
mod.doSomething(payload) Good — what aislop hands back
// @ts-expect-error mod's types lag behind v3 — tracked in #1234
mod.doSomething(payload) Why an AI agent produces this
Agents silence type errors instead of solving them. Without a reason, the directive becomes load-bearing and nobody can safely remove it later.
Provenance
How this rule is justified.
Rule id
ai-slop/ts-directive
Enforcing engine
ai-slop
Detector strategy
Deterministic regex match: flags `@ts-ignore`, `@ts-expect-error`, or `@ts-nocheck` with no trailing reason text.
Legitimate code that is NOT flagged
A directive followed by an explanatory reason (ideally with a tracking reference) is not flagged.
Evidence
Provenance: repeated across public scans where agents suppress type errors instead of resolving them.