Skip to content

Instantly share code, notes, and snippets.

@petetnt
Last active Oct 17, 2019
Embed
What would you like to do?
eslint-rule-no-cats

Disallow Use of 🐱 (no-cats)

JavaScript's console.log(kissa) is often used while debugging code, which should be removed before deployment to production.

console.log("kissa");

Rule Details

This rule is aimed at catching debugging code that should be removed. As such, it will warn when it encounters console.log('kissa') calls.

Examples of incorrect code for this rule:

/*eslint no-cats: "error"*/

console.log('kissa');

Examples of correct code for this rule:

/*eslint no-cats: "error"*/

function logACat() {
    var log = console.log;
    log('kissa');
}

Related Rules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment