Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 635 Bytes

no-innerText.md

File metadata and controls

27 lines (17 loc) · 635 Bytes

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.

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