Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 644 Bytes

no-unbind.md

File metadata and controls

30 lines (22 loc) · 644 Bytes

no-unbind

Disallows the .unbind method. Prefer .off/EventTarget#removeEventListener.

⚠️ This rule is deprecated. Use no-bind instead.

Rule details

❌ Examples of incorrect code:

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

✔️ Examples of correct code:

unbind();
[].unbind();
div.unbind();
div.unbind;

Resources