prettier-vscode icon indicating copy to clipboard operation
prettier-vscode copied to clipboard

Prettier does not support new angular template syntax

Open marekdon opened this issue 1 year ago • 0 comments
trafficstars

Summary

Since angular 17, we can use new template syntax. Prettier does not seem to format html document in a proper way, when new template syntax is present.

Github Repository to Reproduce Issue

Screenshot attached

Steps To Reproduce:

  1. Use new template syntax in angular project
  2. Save the document

Expected result

@if (true) {
  <div>
    @if (true) { 
      @if (true) {
        <div></div>
      }
    }
  </div>
}

Actual result

@if (true) {
<div>
  @if (true) { @if (true) {
  <div> </div>
  } }
</div>
}

Additional information

image

VS Code Version:

Version: 1.94.0 (Universal)

Prettier Extension Version:

v.11.0.0

OS and version:

iOS 15.0.1 (24A348)

Prettier Log Output

{
  "parser": "angular",
  "useTabs": false,
  "tabWidth": 2,
  "trailingComma": "es5",
  "semi": true,
  "singleQuote": true,
  "arrowParens": "always"
}

marekdon avatar Oct 17 '24 12:10 marekdon