Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 674 Bytes

get-attribute.md

File metadata and controls

35 lines (22 loc) · 674 Bytes

Disallow wrong usage of attribute names (github/get-attribute)

💼 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