Disallows the .clone
method and $.clone
utility. Prefer Node#cloneNode
.
📋 This rule is enabled in plugin:no-jquery/all
.
❌ Examples of incorrect code:
$.clone();
$( 'div' ).clone();
$div.clone();
this.prop.$div.clone();
$( 'div' ).first().clone();
$( 'div' ).append( $( 'input' ).clone() );
✔️ Examples of correct code:
clone();
[].clone();
div.clone();
div.clone;
$div.prop.clone();
$div[ 0 ].clone();