Disallow wrong usage of attribute names (github/get-attribute)
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
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