Strict null checks active
Why it matters
With strictNullChecks disabled, null and undefined are subtypes of every type — string implicitly includes null. This means the compiler cannot warn when you call .trim() on a value that could be null, or access .user.name on a possibly-undefined response. ISO 25010:2011 §6.5.4 classifies null-safety gaps as reliability defects. Null pointer exceptions are one of the most common runtime crashes in production JavaScript: nearly always preventable, never fun to debug from a Sentry alert.
Severity rationale
High because disabling strictNullChecks allows null and undefined to flow into any typed value silently, making null-dereference crashes invisible to the compiler until they hit production.
Remediation
Enable strictNullChecks via strict: true in tsconfig.json. During migration, the compiler will surface every place where null or undefined could flow into a non-nullable type — fix each with optional chaining, null guards, or explicit non-null assertions with a comment.
// Errors with strictNullChecks: user might be null
const name = user.name;
// Fixed: optional chaining
const name = user?.name ?? 'Anonymous';
// Fixed: explicit guard
if (user === null) throw new Error('User not authenticated');
const name = user.name;
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.strictNullChecks parse·by cakleinman