Skip to content

Commit 70cfa53

Browse files
committed
Add prefer-control-flow to angular config
1 parent a78d24b commit 70cfa53

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

β€Ždocs/angular.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ Config for **Angular** projects.
5252
);
5353
```
5454

55-
## πŸ“ Rules (421)
55+
## πŸ“ Rules (422)
5656

57-
**345** rules are included from [`typescript` config](./typescript.md#πŸ“-rules-345). For brevity, only the **76** additional rules are listed in this document.
57+
**345** rules are included from [`typescript` config](./typescript.md#πŸ“-rules-345). For brevity, only the **77** additional rules are listed in this document.
5858

5959
> πŸ”§ Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).<br>πŸ’‘ Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).<br>πŸ§ͺ🚫 Disabled for [test files](../README.md#πŸ§ͺ-test-overrides).<br>πŸ§ͺ⚠️ Severity lessened to warning for [test files](../README.md#πŸ§ͺ-test-overrides).
6060
@@ -97,7 +97,7 @@ Config for **Angular** projects.
9797
| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-unsafe-subject-next](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-unsafe-subject-next.md)<br />Disallow unsafe optional `next` calls. | | | |
9898
| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-unsafe-takeuntil](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-unsafe-takeuntil.md)<br />Disallow applying operators after `takeUntil`. | | | |
9999

100-
### ⚠️ Warnings (42)
100+
### ⚠️ Warnings (43)
101101

102102
| Plugin | Rule | Options | Autofix | Overrides |
103103
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :-------: |
@@ -131,6 +131,7 @@ Config for **Angular** projects.
131131
| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-inline-styles](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-inline-styles.md)<br />Disallows the use of inline styles in HTML templates | <details><summary>allowNgStyle: true, allowBi...</summary><pre lang="json"><code>{&#13; "allowNgStyle": true,&#13; "allowBindToStyle": true&#13;}</code></pre></details> | | |
132132
| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-interpolation-in-attributes](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-interpolation-in-attributes.md)<br />Ensures that property-binding is used instead of interpolation in attributes. | | | |
133133
| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-positive-tabindex](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-positive-tabindex.md)<br />Ensures that the `tabindex` attribute is not positive | | πŸ’‘ | |
134+
| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [prefer-control-flow](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/prefer-control-flow.md)<br />Ensures that the built-in control flow is used. | | | |
134135
| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [prefer-ngsrc](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/prefer-ngsrc.md)<br />Ensures ngSrc is used instead of src for img elements | | | |
135136
| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [prefer-self-closing-tags](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/prefer-self-closing-tags.md)<br />Ensures that self-closing tags are used for elements with a closing tag but no content. | | πŸ”§ | |
136137
| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [use-track-by-function](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/use-track-by-function.md)<br />Ensures trackBy function is used | | | |

β€Ždocs/ngrx.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ Config for **Angular** projects using **NgRx** library.
5252
);
5353
```
5454

55-
## πŸ“ Rules (451)
55+
## πŸ“ Rules (452)
5656

57-
**421** rules are included from [`angular` config](./angular.md#πŸ“-rules-421). For brevity, only the **30** additional rules are listed in this document.
57+
**422** rules are included from [`angular` config](./angular.md#πŸ“-rules-422). For brevity, only the **30** additional rules are listed in this document.
5858

5959
> πŸ”§ Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).<br>πŸ’‘ Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).<br>πŸ§ͺ🚫 Disabled for [test files](../README.md#πŸ§ͺ-test-overrides).<br>πŸ§ͺ⚠️ Severity lessened to warning for [test files](../README.md#πŸ§ͺ-test-overrides).
6060

β€Žsrc/configs/angular.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export default tseslint.config(
146146
],
147147
'@angular-eslint/template/no-interpolation-in-attributes': 'warn',
148148
'@angular-eslint/template/no-positive-tabindex': 'warn',
149-
// "@angular-eslint/template/prefer-control-flow": "warn", <-- disabled until control flow out of developer preview
149+
'@angular-eslint/template/prefer-control-flow': 'warn',
150150
'@angular-eslint/template/prefer-ngsrc': 'warn',
151151
'@angular-eslint/template/prefer-self-closing-tags': 'warn',
152152
'@angular-eslint/template/role-has-required-aria': 'error',

0 commit comments

Comments
Β (0)