Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 769 Bytes

no-ready.md

File metadata and controls

38 lines (31 loc) · 769 Bytes

no-ready

Disallows the document ready event, either $( function() {} ) or $( document ).ready().

Rule details

❌ Examples of incorrect code:

$( function () { } );
$( function init() { } );
$( () => {} );
$( document ).ready( function () { } );
$().ready( function () { } );
$( 'img' ).ready( function () { } );
$div.ready( function () { } );
$( 'img' ).first().ready( function () { } );

✔️ Examples of correct code:

ready( function () { } );
ready( () => {} );
ready();
[].ready();
div.ready();
div.ready;
$.ready();
$( 'div' );
$( document );
$();

Resources