indentation 🪄
Allows the user to specify indentation rules. This rule can be configured in a more granular level and uses following rules by default:
- Expected indentation for Feature, Background, Scenario, Examples heading: 0 spaces
- Expected indentation for Steps and each example: 2 spaces
Configuration
Name | Type | Description | Default |
---|---|---|---|
Feature | number | Defines the indentation size for the node Feature . | 0 |
Background | number | Defines the indentation size for the node Background . | 2 |
Rule | number | Defines the indentation size for the node Rule . | 2 |
Scenario | number | Defines the indentation size for the node Scenario . | 2 |
Step | number | Defines the indentation size for the node Step . | 4 |
Examples | number | Defines the indentation size for the node Examples . | 4 |
example | number | Defines the indentation size for the node example . | 6 |
given | number | Defines the indentation size for the node given . | 4 |
when | number | Defines the indentation size for the node when . | 4 |
then | number | Defines the indentation size for the node then . | 4 |
and | number | Defines the indentation size for the node and . | 4 |
but | number | Defines the indentation size for the node but . | 4 |
RuleFallback | number | If enabled, the indentation for nodes inside Rule is the sum of "Rule" and the node itself, else it uses the node directly. | true |
Examples
Example
Override some indentations
{
"indentation": [
"error",
{
"Feature": 0,
"Background": 2,
"Scenario": 2,
"Step": 4,
"Examples": 2,
"example": 3,
"given": 3,
"when": 3,
"then": 3,
"and": 3,
"but": 3,
"feature tag": 0,
"scenario tag": 2,
"examples tag": 2
}
]
}