Disallows the .trigger
method. Prefer EventTarget#dispatchEvent
.
📋 This rule is enabled in plugin:no-jquery/all
.
❌ Examples of incorrect code:
$( 'div' ).trigger();
$div.trigger();
$( 'div' ).first().trigger();
$( 'div' ).append( $( 'input' ).trigger() );
✔️ Examples of correct code:
trigger();
[].trigger();
div.trigger();
div.trigger;