# lodash-template/attribute-name-casing
enforce HTML attribute name casing. (ex. 🆗
<div foo-bar>
🆖<div fooBar>
<div FOO-BAR>
)
- ⚙️ This rule is included in
"plugin:lodash-template/recommended-with-html"
and"plugin:lodash-template/all"
. - 🔧 The
--fix
option on the command line (opens new window) can automatically fix some of the problems reported by this rule.
# Rule Details
This rule enforces attribute name casing style (kebab-case).
# Options
{
"lodash-template/attribute-name-casing": ["error", {
"ignore": [],
"ignoreSvgCamelCaseAttributes": true,
}]
}
# Examples for this rule with "ignore": ["onClick"]
option:
# Examples for this rule with "ignoreSvgCamelCaseAttributes": true,
(default)
# Further Reading
- Google HTML/CSS Style Guide Capitalization (opens new window)
- HTML - MDN - Mozilla
data-*
(opens new window) - HTML5 Embedding custom non-visible data with the
data-*
attributes (opens new window)