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.
❌ 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 () {}() );