Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 593 Bytes

no-each.md

File metadata and controls

29 lines (22 loc) · 593 Bytes

no-each

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

Rule details

❌ Examples of incorrect code:

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

✔️ Examples of correct code:

each();
[].each();
div.each();
div.each;

Resources