Console.log spam
Debug logs left in shipped code serialize their arguments on every call, add DevTools overhead, and in a hot path (a render loop, a scroll handler) they measurably slow the page. They also leak app internals to anyone who opens the console and bury the one real error under noise. Vibe-coded features accumulate these fast, because logging is how the agent "sees" while it works — and it rarely cleans up.
Symptoms
How VibeCheck catches it
In your widget · Problems
To your coding agent · MCP
The same string in your widget and in your agent’s context — no screenshot, no copy-paste.
Root causes
The fix
Strip console output at build time for production, keep intentional error reporting behind a level-aware logger, and add an ESLint no-console rule so new debug logs can’t be merged. Configure noisy libraries down to warn/error.
- Enable build-time console stripping for production builds
- Replace ad-hoc logs with a logger that is silent in production
- Add the ESLint
no-consolerule (allowing warn/error) to prevent regressions
{ "rules": { "no-console": ["error", { "allow": ["warn", "error"] }] } }FAQ
- Should I remove
console.errortoo? - No — keep
console.error(and usuallyconsole.warn) so genuine failures still surface. Strip only the debug-levelconsole.log/info/debug noise. The examples here exclude error on purpose. - Is
console.logactually a performance problem? - In a hot path, yes. Each call serializes its arguments and incurs DevTools overhead. One log on click is nothing; a log inside a scroll handler or render loop firing hundreds of times a second is measurable.
- How does VibeCheck count this?
- It wraps
console.log/warn/error and counts calls in a rolling 10-second window. More than 20 in that window trips the console-spam detector.