Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 659 Bytes

no-map.md

File metadata and controls

32 lines (25 loc) · 659 Bytes

no-map

Disallows the .map method and $.map utility. Prefer Array#map.

Rule details

❌ Examples of incorrect code:

$.map();
$( 'div' ).map();
$div.map();
$( 'div' ).first().map();
$( 'div' ).append( $( 'input' ).map() );
$( 'select' ).val( [] ).map();

✔️ Examples of correct code:

map();
[].map();
div.map();
div.map;
$( 'div' ).toArray().map();
$( 'select' ).val().map();

Resources