Skip to content

feat(migrations): add migration to convert to self-closing tags#57342

Closed
eneajaho wants to merge 1 commit intoangular:mainfrom
eneajaho:feat/self-closing-tag-migration
Closed

feat(migrations): add migration to convert to self-closing tags#57342
eneajaho wants to merge 1 commit intoangular:mainfrom
eneajaho:feat/self-closing-tag-migration

Conversation

@eneajaho
Copy link
Copy Markdown
Contributor

@eneajaho eneajaho commented Aug 12, 2024

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?

  • Feature

Does this PR introduce a breaking change?

  • No

@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: migrations Issues related to `ng update`/`ng generate` migrations labels Aug 12, 2024
@ngbot ngbot bot modified the milestone: Backlog Aug 12, 2024
@eneajaho eneajaho changed the title wip feat(migrations): add migration to convert templates to use self-clos… wip feat(migrations): add migration to convert to self-closing tags Aug 12, 2024
@eneajaho eneajaho force-pushed the feat/self-closing-tag-migration branch from 5348820 to 1028f1f Compare August 17, 2024 22:52
@JeevanMahesha
Copy link
Copy Markdown
Contributor

Excited to use this!!!

@medbenmakhlouf
Copy link
Copy Markdown

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

eslint --fix

@pkozlowski-opensource
Copy link
Copy Markdown
Member

@eneajaho this would be exciting to land in v19 🎉
Is there any way I could help with moving this migration forward?

@eneajaho eneajaho force-pushed the feat/self-closing-tag-migration branch from b99aa9f to 92338e6 Compare September 20, 2024 23:35
@eneajaho eneajaho changed the title wip feat(migrations): add migration to convert to self-closing tags feat(migrations): add migration to convert to self-closing tags Sep 20, 2024
@eneajaho eneajaho force-pushed the feat/self-closing-tag-migration branch from 72cc7c2 to 7f2f305 Compare September 20, 2024 23:41
@eneajaho eneajaho marked this pull request as ready for review September 20, 2024 23:41
@eneajaho
Copy link
Copy Markdown
Contributor Author

Hi @pkozlowski-opensource
I think this is ready for review now.

@eneajaho eneajaho force-pushed the feat/self-closing-tag-migration branch 2 times, most recently from 3bdc0fd to 6c3c270 Compare September 21, 2024 19:04
@eneajaho eneajaho force-pushed the feat/self-closing-tag-migration branch from 6c3c270 to a8ebb21 Compare October 3, 2024 07:42
@pkozlowski-opensource
Copy link
Copy Markdown
Member

@eneajaho seems like you need to re-format the changed files: https://github.com/angular/angular/actions/runs/11157920075/job/31037369150?pr=57342

@pkozlowski-opensource pkozlowski-opensource added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews action: review The PR is still awaiting reviews from at least one requested reviewer target: minor This PR is targeted for the next minor release labels Oct 4, 2024
@eneajaho eneajaho force-pushed the feat/self-closing-tag-migration branch from a8ebb21 to d5107f8 Compare October 4, 2024 17:36
@eneajaho
Copy link
Copy Markdown
Contributor Author

eneajaho commented Oct 4, 2024

@eneajaho seems like you need to re-format the changed files: https://github.com/angular/angular/actions/runs/11157920075/job/31037369150?pr=57342

Should be good now.

@eneajaho eneajaho force-pushed the feat/self-closing-tag-migration branch from d5107f8 to 48bf55d Compare October 4, 2024 21:03
@eneajaho eneajaho requested a review from JeanMeche October 5, 2024 14:51
@eneajaho eneajaho force-pushed the feat/self-closing-tag-migration branch from eca60bd to 29df155 Compare January 2, 2025 21:34
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was unused but I converted it to use the proper functions to be usable with tsurge.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, was going to leave a comment about this, but you cleaned it up already. Nice work

@eneajaho eneajaho force-pushed the feat/self-closing-tag-migration branch from 29df155 to 30d9c75 Compare January 2, 2025 21:41
@eneajaho
Copy link
Copy Markdown
Contributor Author

eneajaho commented Jan 2, 2025

Hi @pkozlowski-opensource @JeanMeche
Migrated this one to tsurge. Should be ready for review now.

Happy New Year 🎊

@eneajaho eneajaho marked this pull request as ready for review January 2, 2025 21:43
@pullapprove pullapprove bot removed the request for review from devversion January 2, 2025 21:43
@eneajaho eneajaho force-pushed the feat/self-closing-tag-migration branch 2 times, most recently from 9a23332 to 5bdbcb3 Compare January 3, 2025 10:11
Copy link
Copy Markdown
Member

@JeanMeche JeanMeche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides some nits.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 3, 2025

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.

@eneajaho eneajaho force-pushed the feat/self-closing-tag-migration branch 2 times, most recently from 31f121d to 13fe584 Compare January 8, 2025 16:49
@eneajaho eneajaho force-pushed the feat/self-closing-tag-migration branch from 13fe584 to 855c761 Compare February 17, 2025 12:53
…ing tags

This schematic helps developers to convert their templates to use self-closing tags mostly as a aesthetic change.
@eneajaho eneajaho force-pushed the feat/self-closing-tag-migration branch from 855c761 to 6527488 Compare February 17, 2025 13:36
@pkozlowski-opensource pkozlowski-opensource added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 18, 2025
@pkozlowski-opensource pkozlowski-opensource removed the request for review from crisbeto February 18, 2025 17:12
@thePunderWoman
Copy link
Copy Markdown
Contributor

This PR was merged into the repository by commit 1cd3a7d.

The changes were merged into the following branches: main

@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker adev: preview area: migrations Issues related to `ng update`/`ng generate` migrations detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants