feat(migrations): add migration to convert to self-closing tags#57342
feat(migrations): add migration to convert to self-closing tags#57342eneajaho wants to merge 1 commit intoangular:mainfrom
Conversation
5348820 to
1028f1f
Compare
packages/core/schematics/ng-generate/self-closing-tag-migration/index.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/self-closing-tag-migration/index.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/self-closing-tag-migration/index.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/self-closing-tag-migration/to-self-closing-tags.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/self-closing-tag-migration/to-self-closing-tags.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/self-closing-tag-migration/to-self-closing-tags.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/self-closing-tag-migration/to-self-closing-tags.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/test/self_closing_tag_migration_spec.ts
Outdated
Show resolved
Hide resolved
|
Excited to use this!!! |
|
Hi @eneajaho , I think that could be nice to have part of other schematics! I was able to move all my components to self-closing-tags by activating this rule from "@angular-eslint". So if you add this to .eslintrc.json, and run eslint command, it will help converting all the components {
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended", "plugin:prettier/recommended"],
"rules": {
"@angular-eslint/template/prefer-control-flow": "error",
"@angular-eslint/template/prefer-self-closing-tags": "error",
"@angular-eslint/template/use-track-by-function": "error"
}
},then
|
|
@eneajaho this would be exciting to land in v19 🎉 |
b99aa9f to
92338e6
Compare
72cc7c2 to
7f2f305
Compare
|
Hi @pkozlowski-opensource |
3bdc0fd to
6c3c270
Compare
6c3c270 to
a8ebb21
Compare
packages/core/schematics/ng-generate/self-closing-tag-migration/README.md
Outdated
Show resolved
Hide resolved
|
@eneajaho seems like you need to re-format the changed files: https://github.com/angular/angular/actions/runs/11157920075/job/31037369150?pr=57342 |
a8ebb21 to
d5107f8
Compare
Should be good now. |
packages/core/schematics/ng-generate/self-closing-tag-migration/README.md
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/self-closing-tag-migration/to-self-closing-tags.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/self-closing-tag-migration/util.ts
Outdated
Show resolved
Hide resolved
d5107f8 to
48bf55d
Compare
eca60bd to
29df155
Compare
There was a problem hiding this comment.
This was unused but I converted it to use the proper functions to be usable with tsurge.
There was a problem hiding this comment.
Perfect, was going to leave a comment about this, but you cleaned it up already. Nice work
packages/core/schematics/test/self_closing_tags_migration_spec.ts
Outdated
Show resolved
Hide resolved
29df155 to
30d9c75
Compare
|
Hi @pkozlowski-opensource @JeanMeche Happy New Year 🎊 |
9a23332 to
5bdbcb3
Compare
packages/core/schematics/migrations/self-closing-tags-migration/util.ts
Outdated
Show resolved
Hide resolved
|
Deployed adev-preview for 6527488 to: https://ng-dev-previews-fw--pr-angular-angular-57342-adev-prev-bqtr5kvt.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
31f121d to
13fe584
Compare
13fe584 to
855c761
Compare
…ing tags This schematic helps developers to convert their templates to use self-closing tags mostly as a aesthetic change.
855c761 to
6527488
Compare
|
This PR was merged into the repository by commit 1cd3a7d. The changes were merged into the following branches: main |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This schematic helps developers to convert their templates to use self-closing tags mostly as a aesthetic change.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?