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