Skip to content

consoleCalls

Reports calls to console methods.

✅ This rule is included in the ts preset.

Console methods like console.log, console.warn, and console.error are useful during development but should typically be removed before shipping to production. They can expose sensitive information to users and clutter the browser console.

function processUser(user: User) {
console.log("Processing user:", user);
return user.name;
}

This rule is not configurable.

If your project intentionally uses console methods for logging in production, such as in a Node.js server application, you might choose to disable this rule. You might also disable it if you have a build step that strips console calls from production builds.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.