Disallow Element.prototype.innerText in favor of Element.prototype.textContent (github/no-innerText)
February 8, 2023 ยท View on GitHub
๐ผ This rule is enabled in the ๐ browser config.
๐ง This rule is automatically fixable by the --fix CLI option.
Rule Details
๐ 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'
Version
4.3.2