No hardcoded `process.env.NODE_ENV === 'development'` blocks with empty else
Why it matters
A bare if (process.env.NODE_ENV === 'development') { console.log(state) } with no else branch marks code as dev-only but ships it anyway — the gate evaluates at runtime, not build time, so the branch stays in the production bundle and fires for anyone whose NODE_ENV is misconfigured. More often it is just dead clutter left behind from debugging sessions, and it signals poor code-quality hygiene across the repo.
Severity rationale
Low because the impact is mostly bundle bloat and noise, but clustered markers indicate broader cleanup gaps.
Remediation
Remove orphaned debug blocks or route them through a real logging library that handles levels and production silencing. A single logger.debug() is cleaner than an inline NODE_ENV check and gives you a kill switch. Fix at src/store/index.ts:
import { logger } from '@/lib/logger'
logger.debug('state', state)
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 WIP-in-Production Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ai-slop-half-finished·automated