Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 836 Bytes

no-noop.md

File metadata and controls

36 lines (26 loc) · 836 Bytes

no-noop

Disallows the $.noop property. Prefer function(){}.

📋 This rule is enabled in plugin:no-jquery/all.

🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

Rule details

❌ Examples of incorrect code:

$.noop;
$.noop();

✔️ Examples of correct code:

foo.noop;
foo.noop();
foo.noop( bar );
$.noOp;

🔧 Examples of code fixed by this rule:

$.noop;   /* → */ ( function () {} );
$.noop(); /* → */ ( function () {}() );

Resources