Which @angular/* package(s) are relevant/related to the feature request?
core
Description
The new control flow migration is a marvellous bit of engineering, however the formatter has a troublesome side-effect of removing all newlines from the templates. It would be preferable were the migration formatter to take a more minimalistic approach to formatting, only adding newlines / whitespace where the control flow code is added to the html templates.
Proposed solution
Add a property to the control migration schema to preserve existing newlines when formatting. And naturally, the formatter should thus obey this.
Something like:
"preserveNewLines": {
"type": "boolean",
"description": "Preserve newlines when formatting",
"x-prompt": "Should existing newlines be preserved when formatting?",
"default": "false"
}
Alternatives considered
There are other formatters such as prettier, which is too opinionated, or beautify-js does not yet support the new control flow syntax.
Which @angular/* package(s) are relevant/related to the feature request?
core
Description
The new control flow migration is a marvellous bit of engineering, however the formatter has a troublesome side-effect of removing all newlines from the templates. It would be preferable were the migration formatter to take a more minimalistic approach to formatting, only adding newlines / whitespace where the control flow code is added to the html templates.
Proposed solution
Add a property to the control migration schema to preserve existing newlines when formatting. And naturally, the formatter should thus obey this.
Something like:
Alternatives considered
There are other formatters such as prettier, which is too opinionated, or beautify-js does not yet support the new control flow syntax.