Migrated from ember-template-lint/attribute-indentation.
This rule requires the positional params, attributes, and block params of helpers/components to be indented by moving them to multiple lines when the open invocation has more than 80 characters (configurable).
| Name | Type | Choices |
|---|---|---|
as-indentation |
attribute, closing-brace |
|
element-open-end |
new-line, last-attribute |
|
indentation |
Integer | |
mustache-open-end |
new-line, last-attribute |
|
open-invocation-max-len |
Integer | |
process-elements |
Boolean |
Examples of incorrect code for this rule:
Non-block form (> 80 characters):
Block form (> 80 characters):
HTML element (> 80 characters):
Examples of correct code for this rule:
Non-block form (attributes on separate lines):
Block form (attributes on separate lines):
HTML element (attributes on separate lines):
Short invocations (< 80 characters) are allowed on a single line:
open-invocation-max-len(integer, default80): Maximum length of the opening invocation before attributes must be on separate lines.indentation(integer, default2): Number of spaces for attribute indentation.process-elements(boolean, defaulttrue): Also validate indentation of HTML/SVG element attributes.element-open-end("new-line"|"last-attribute", default"new-line"): Position of the closing>bracket.mustache-open-end("new-line"|"last-attribute", default"new-line"): Position of the closing}}braces.as-indentation("attribute"|"closing-brace", default"closing-brace"): Position ofas |param|block params relative to attributes or closing brace.