Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 439 Bytes

File metadata and controls

20 lines (13 loc) · 439 Bytes

avoid-removeChild

Rejects using element.parentNode.removeChild(element) when element.remove() can be used instead.

Examples of incorrect code for this rule:

elt.parentNode.removeChild(elt);

Examples of correct code for this rule:

elt.remove();
elt.parentNode.removeChild(elt2);