Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 677 Bytes

File metadata and controls

37 lines (23 loc) · 677 Bytes

github/get-attribute

📝 Disallow wrong usage of attribute names.

💼 This rule is enabled in the 🔍 browser config.

🔧 This rule is automatically fixable by the --fix CLI option.

Rule Details

As HTML attributes are case insensitive, prefer using lowercase.

👎 Examples of incorrect code for this rule:

el.getAttribute('autoComplete')
el.getAttribute('dataFoo')

👍 Examples of correct code for this rule:

el.getAttribute('autocomplete')
el.getAttribute('data-foo')

Version

4.3.2