👗 The extends: 'stylistic'
property in a configuration file enables this rule.
Good indentation is crucial for long-term maintenance of templates. For example, having blocks misaligned is a common cause of logic errors.
This rule forbids the following:
This rule allows the following:
The following values are valid configuration:
- boolean --
true
indicates a 2 space indent,false
indicates that the rule is disabled. - numeric -- the number of spaces to require for indentation
- "tab" -- To indicate tab style indentation (1 char)
- object -- An object with the following keys:
indentation: <numeric>
- number of spaces to indent (defaults to 2)ignoreComments: <boolean>
- skip indentation for comments (defaults tofalse
)
If .editorconfig
file present, rule configuration will be inherit from it.