No implicit any types
Why it matters
Implicit any is TypeScript's escape hatch — every untyped function parameter defaults to any, which propagates through the call chain and silently disables type checking for all downstream code that touches it. ISO 25010:2011 §6.5.4 classifies this as a maintainability defect. When noImplicitAny is off, a renamed field in an API response or database schema causes zero compile-time errors and surfaces only as a runtime crash or silent data corruption in production.
Severity rationale
Critical because implicit `any` on a single function parameter can propagate silently through an entire call chain, making TypeScript's type guarantees meaningless for that code path.
Remediation
Re-enable noImplicitAny (or use strict: true) and add explicit type annotations. Use unknown when the type is genuinely unknown at compile time — never any as a shortcut — then narrow at the callsite.
// Bad: implicit any causes noImplicitAny error:
function transform(value) { return value.toString(); }
// Good: explicit type:
function transform(value: string): string { return value.toString(); }
// Good: unknown + runtime narrowing:
function parsePayload(raw: unknown): MyType {
if (!isMyType(raw)) throw new Error('Unexpected shape');
return raw;
}
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Code Quality Essentials Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · maintainability.modifiability — Maintainability — Modifiability
Taxons
History
- 2026-04-18·v1.0.0·Initial import from code-quality-essentials·automated
- 2026-04-20·v1.1.0·Add Phase 6.0 detect-jq snippet for deterministic tsconfig.noImplicitAny parse·by cakleinman