Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 611 Bytes

no-each-util.md

File metadata and controls

31 lines (23 loc) · 611 Bytes

no-each-util

Disallows the $.each utility. Prefer Array#forEach.

📋 This rule is enabled in plugin:no-jquery/all.

Rule details

❌ Examples of incorrect code:

$.each();

✔️ Examples of correct code:

each();
[].each();
div.each();
div.each;
$( 'div' ).each();
$div.each();
$( 'div' ).first().each();
$( 'div' ).append( $( 'input' ).each() );

Resources