Disallow Element.prototype.innerText
in favor of Element.prototype.textContent
(github/no-innerText
)
💼 This rule is enabled in the 🔍 browser
config.
🔧 This rule is automatically fixable by the --fix
CLI option.
👎 Examples of incorrect code for this rule:
const el = document.createElement('div')
el.innerText = 'foo'
👍 Examples of correct code for this rule:
const el = document.createElement('div')
el.textContent = 'foo'
4.3.2