const payload = {
accountId: account.id,
retryPolicy: 'exp',
}
// @ts-ignore
legacyClient.createSubscription(payload)
Deterministic regex match: flags `@ts-ignore`, `@ts-expect-error`, or `@ts-nocheck` with no trailing reason text.
A `@ts-ignore`, `@ts-expect-error`, or `@ts-nocheck` directive without a reason comment. Silences the type checker on that line forever.
Each example shows the exact code shape the rule is looking for, then the smallest version that keeps the intent without hiding risk or adding noise.
const payload = {
accountId: account.id,
retryPolicy: 'exp',
}
// @ts-ignore
legacyClient.createSubscription(payload)
Deterministic regex match: flags `@ts-ignore`, `@ts-expect-error`, or `@ts-nocheck` with no trailing reason text.
const payload = {
accountId: account.id,
retryPolicy: 'exp',
}
// @ts-expect-error legacy client types lag retryPolicy support — SDK-421
legacyClient.createSubscription(payload)
Prefer fixing the type error. If the dependency or compiler is wrong, use the narrowest directive available and include a reason with a tracking reference so it can be removed later.
Agents silence type errors instead of solving them. Without a reason, the directive becomes load-bearing and nobody can safely remove it later.
ai-slop/ts-directive
ai-slop
Deterministic regex match: flags `@ts-ignore`, `@ts-expect-error`, or `@ts-nocheck` with no trailing reason text.
A directive followed by an explanatory reason (ideally with a tracking reference) is not flagged.
Provenance: repeated across public scans where agents suppress type errors instead of resolving them.