Disallows the $.isFunction
utility. Prefer typeof
.
📋 This rule is enabled in plugin:no-jquery/deprecated-3.3
.
📋 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:
$.isFunction( expression( arg ) );
if ( $.isFunction( fn ) ) { g(); }
✔️ Examples of correct code:
isFunction();
myClass.isFunction();
$div.isFunction();
🔧 Examples of code fixed by this rule:
$.isFunction( expression( arg ) ); /* → */ typeof expression( arg ) === 'function';
if ( $.isFunction( fn ) ) { g(); } /* → */ if ( typeof fn === 'function' ) { g(); }