Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,14 @@ rules in templates can be disabled with eslint directives with mustache or html

### Stylistic Issues

| Name                     | Description | 💼 | 🔧 | 💡 |
| :----------------------------------------------------------------- | :------------------------------------------------------------- | :- | :- | :- |
| [order-in-components](docs/rules/order-in-components.md) | enforce proper order of properties in components | | 🔧 | |
| [order-in-controllers](docs/rules/order-in-controllers.md) | enforce proper order of properties in controllers | | 🔧 | |
| [order-in-models](docs/rules/order-in-models.md) | enforce proper order of properties in models | | 🔧 | |
| [order-in-routes](docs/rules/order-in-routes.md) | enforce proper order of properties in routes | | 🔧 | |
| [template-attribute-order](docs/rules/template-attribute-order.md) | enforce consistent ordering of attributes in template elements | | | |
| Name                       | Description | 💼 | 🔧 | 💡 |
| :--------------------------------------------------------------------- | :--------------------------------------------------------------------- | :- | :- | :- |
| [order-in-components](docs/rules/order-in-components.md) | enforce proper order of properties in components | | 🔧 | |
| [order-in-controllers](docs/rules/order-in-controllers.md) | enforce proper order of properties in controllers | | 🔧 | |
| [order-in-models](docs/rules/order-in-models.md) | enforce proper order of properties in models | | 🔧 | |
| [order-in-routes](docs/rules/order-in-routes.md) | enforce proper order of properties in routes | | 🔧 | |
| [template-attribute-order](docs/rules/template-attribute-order.md) | enforce consistent ordering of attributes in template elements | | | |
| [template-block-indentation](docs/rules/template-block-indentation.md) | enforce consistent indentation for block statements and their children | | | |

### Testing

Expand Down
57 changes: 57 additions & 0 deletions docs/rules/template-block-indentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# ember/template-block-indentation

<!-- end auto-generated rule header -->

Migrated from [ember-template-lint/block-indentation](https://github.com/ember-template-lint/ember-template-lint/blob/master/docs/rule/block-indentation.md).

## Rule Details

Forces valid indentation for blocks and their children.

1. Forces block begin and block end statements to be at the same indentation level, when not on one line.
2. Forces children of all blocks to start at a single indentation level deeper.

## Configuration

<!-- begin auto-generated rule options list -->

| Name | Type |
| :--------------- | :------ |
| `ignoreComments` | Boolean |
| `indentation` | Integer |

<!-- end auto-generated rule options list -->

## Examples

Examples of **incorrect** code for this rule:

```hbs
{{#each foo as |bar|}}{{/each}}
```

```hbs
<div>
<p>{{t 'greeting'}}</p>
</div>
```

Examples of **correct** code for this rule:

```hbs
{{#each foo as |bar|}}{{/each}}
```

```hbs
<div>
<p>{{t 'greeting'}}</p>
</div>
```

## Options

- Integer (e.g., `2`, `4`): Number of spaces for indentation.
- `"tab"`: Use tab-style indentation (1 character).
- Object:
- `indentation` (integer, default `2`): Number of spaces to indent.
- `ignoreComments` (boolean, default `false`): Skip indentation checking for comments.
Loading
Loading