Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 638 Bytes

File metadata and controls

29 lines (18 loc) · 638 Bytes

github/no-innerText

📝 Disallow Element.prototype.innerText in favor of Element.prototype.textContent.

💼 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