Skip to content

Commit afe0b7d

Browse files
authored
feat(eslint-plugin-template): add rule no-empty-control-flow (#2592)
1 parent 9168a57 commit afe0b7d

File tree

8 files changed

+1198
-2
lines changed

8 files changed

+1198
-2
lines changed

packages/angular-eslint/src/configs/template-all.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default (
3434
'@angular-eslint/template/no-call-expression': 'error',
3535
'@angular-eslint/template/no-distracting-elements': 'error',
3636
'@angular-eslint/template/no-duplicate-attributes': 'error',
37+
'@angular-eslint/template/no-empty-control-flow': 'error',
3738
'@angular-eslint/template/no-inline-styles': 'error',
3839
'@angular-eslint/template/no-interpolation-in-attributes': 'error',
3940
'@angular-eslint/template/no-negated-async': 'error',

packages/eslint-plugin-template/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Please see https://github.com/angular-eslint/angular-eslint for full usage instr
5858
| [`no-autofocus`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-autofocus.md) | [Accessibility] Ensures that the `autofocus` attribute is not used | | :wrench: | | :accessibility: |
5959
| [`no-call-expression`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-call-expression.md) | Disallows calling expressions in templates, except for output handlers | | | | |
6060
| [`no-distracting-elements`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-distracting-elements.md) | [Accessibility] Enforces that no distracting elements are used | | :wrench: | | :accessibility: |
61+
| [`no-empty-control-flow`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-empty-control-flow.md) | Ensures that control flow blocks are not empty. Empty control flow blocks usually occur due to refactoring that wasn't completed. They can cause confusion when reading code. | | | | |
6162
| [`no-inline-styles`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-inline-styles.md) | Disallows the use of inline styles in HTML templates | | | | |
6263
| [`no-interpolation-in-attributes`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-interpolation-in-attributes.md) | Ensures that property-binding is used instead of interpolation in attributes. | | :wrench: | | |
6364
| [`no-negated-async`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-negated-async.md) | Ensures that async pipe results, as well as values used with the async pipe, are not negated | :white_check_mark: | | :bulb: | |

0 commit comments

Comments
 (0)