Skip to content

VBC-018: console-logs-detected

warning

Category: clean-code
Analysis: Regex (line by line)
File types: .js, .ts, .tsx, .astro
Scope: source code only, ignoring anything inside strings and comments
Tags: clean-code

What it reports

Production code with console usage '{match}' found at line {line}. Consider a professional logging library.

Flagged

js
console.log("debug me");

Not flagged

js
logger.info("started");
js
#!/usr/bin/env node
console.log("2 errors, 5 warnings");

Pattern

regex
console\.(log|info|debug|dir)\(

Released under the MIT License.