Disallows the $.error utility. Prefer throw.
📋 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:
$.error( msg );✔️ Examples of correct code:
error( msg );
myClass.error( msg );
$div.error( msg );🔧 Examples of code fixed by this rule:
$.error( msg ); /* → */ throw new Error( msg );