Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 637 Bytes

no-filter.md

File metadata and controls

31 lines (23 loc) · 637 Bytes

no-filter

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

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

Rule details

❌ Examples of incorrect code:

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

✔️ Examples of correct code:

filter();
[].filter();
div.filter();
div.filter;

Resources