# lodash-template/html-indent
enforce consistent HTML indentation.
- ⚙️ 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 a consistent HTML indentation style. The default style is 2 spaces.
# Options
{
"lodash-template/html-indent": ["error", type, {
"attribute": 1,
"closeBracket": 0
}]
}
type
(number | "tab"
) ... The type of indentation. Default is2
. If this is a number, it's the number of spaces for one indent. If this is"tab"
, it uses one tab for one indent.attribute
(integer
) ... The multiplier of indentation for attributes. Default is1
.closeBracket
(integer
) ... The multiplier of indentation for right brackets. Default is0
.
# Examples for this rule with { attribute: 1, closeBracket: 1 }
option:
# Examples for this rule with { attribute: 2, closeBracket: 1 }
option: