Skip to content

Instantly share code, notes, and snippets.

@petetnt
Last active October 17, 2019 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petetnt/5c8253a5f13a3343ea9259ceb93d0362 to your computer and use it in GitHub Desktop.
Save petetnt/5c8253a5f13a3343ea9259ceb93d0362 to your computer and use it in GitHub Desktop.
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