Enforces the use of .textContent
over .innerText
for DOM nodes. There are some advantages of using .textContent
, like performance and more predictable behavior when updating it.
This rule is fixable.
foo.innerText = '🦄';
foo.textContent = '🦄';