Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 682 Bytes

no-find-collection.md

File metadata and controls

33 lines (25 loc) · 682 Bytes

no-find-collection

Disallows the .find method. Prefer Document#querySelectorAll.

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

Rule details

❌ Examples of incorrect code:

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

✔️ Examples of correct code:

$.find();
find();
[].find();
div.find();
div.find;
$.extend().find();
$div.myPlugin( 'foo' ).find();

Resources