Disallows the jQuery constructor $()
.
📋 This rule is enabled in plugin:no-jquery/all
.
❌ Examples of incorrect code:
$( 'div' );
$( '#id' );
$( '.selector' );
$( '.selector', '.context' );
$( function () {} );
$( [] );
$( undefined );
$( false );
jQuery( 'div' );
✔️ Examples of correct code:
foo.$( '.selector' );
foo.$( '<div>' );
foo.jQuery( '.selector' );
foo.jQuery( '<div>' );
$;
jQuery;