Skip to content

Commit

Permalink
Add self-closing tags rule to Angular config
Browse files Browse the repository at this point in the history
  • Loading branch information
matejchalk committed Jan 15, 2024
1 parent b3dde32 commit a64d872
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ module.exports = {
'@angular-eslint/template/no-positive-tabindex': 'warn',
// "@angular-eslint/template/prefer-control-flow": "warn", <-- disabled until control flow out of developer preview
'@angular-eslint/template/prefer-ngsrc': 'warn',
'@angular-eslint/template/prefer-self-closing-tags': 'warn',
'@angular-eslint/template/role-has-required-aria': 'error',
'@angular-eslint/template/use-track-by-function': 'warn',
},
Expand Down
7 changes: 4 additions & 3 deletions docs/angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ Config for **Angular** projects.
```
## πŸ“ Rules (366)
## πŸ“ Rules (367)
**290** rules are included from [`@code-pushup/eslint-config/typescript`](./typescript.md#πŸ“-rules-290). For brevity, only the **76** additional rules are listed in this document.
**290** rules are included from [`@code-pushup/eslint-config/typescript`](./typescript.md#πŸ“-rules-290). For brevity, only the **77** additional rules are listed in this document.
> πŸ”§ 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).
Expand Down Expand Up @@ -92,7 +92,7 @@ Config for **Angular** projects.
| [![rxjs](./icons/other/rxjs.png)](https://github.com/cartant/eslint-plugin-rxjs#readme) | [no-unsafe-subject-next](https://github.com/cartant/eslint-plugin-rxjs/tree/main/docs/rules/no-unsafe-subject-next.md)<br>Forbids unsafe optional `next` calls. | | | |
| [![rxjs](./icons/other/rxjs.png)](https://github.com/cartant/eslint-plugin-rxjs#readme) | [no-unsafe-takeuntil](https://github.com/cartant/eslint-plugin-rxjs/tree/main/docs/rules/no-unsafe-takeuntil.md)<br>Forbids the application of operators after `takeUntil`. | | | |

### ⚠️ Warnings (42)
### ⚠️ Warnings (43)

| Plugin | Rule | Options | Autofix | Overrides |
| :-: | :-- | :-- | :-: | :-: |
Expand Down Expand Up @@ -128,6 +128,7 @@ Config for **Angular** projects.
| [![@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. | | | |
| [![@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 | | πŸ’‘ | |
| [![@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 | | | πŸ§ͺ🚫 |
| [![@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. | | πŸ”§ | |
| [![@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 | | | πŸ§ͺ🚫 |
| [![rxjs](./icons/other/rxjs.png)](https://github.com/cartant/eslint-plugin-rxjs#readme) | [finnish](https://github.com/cartant/eslint-plugin-rxjs/tree/main/docs/rules/finnish.md)<br>Enforces the use of Finnish notation. | | | πŸ§ͺ🚫 |
| [![rxjs](./icons/other/rxjs.png)](https://github.com/cartant/eslint-plugin-rxjs#readme) | [no-async-subscribe](https://github.com/cartant/eslint-plugin-rxjs/tree/main/docs/rules/no-async-subscribe.md)<br>Forbids passing `async` functions to `subscribe`. | | | |
Expand Down

0 comments on commit a64d872

Please sign in to comment.