feat: add support for @let syntax in Angular
Hello,
Angular is adding support for @let syntax in https://github.com/angular/angular/pull/55848.
Having prettier support that would be great!
Feel free to submit a PR with the feature! I’m not an expert in Angular, but I guess that the change will look similar to #15777 (by @sosukesuzuki).
Maybe we should merge upstream in prettier/angular-html-parser...
Angular just released this feature, so now prettier is a blocker.
Our angular parser's side pr https://github.com/prettier/angular-html-parser/pull/40
Parser support has been added in #16466, @sosukesuzuki is implementing the print logic.
~Maybe we need support angular-estree-parser support to parse "Block-like syntax"? I don't know if it supports destructing, if not, we can use js parser to parse it as assignments.~ Misunderstood.
Released 3.3.3
Released 3.3.3
Excelent! Thanks.
What about the prettier-vscode extension?
Released 3.3.3
Excelent! Thanks. What about the
prettier-vscodeextension?
you can make prettier-vscode use a different prettier version by npm i -g prettier
@sosukesuzuki I think the tests missed a case:
@let foo = 'hello';
{{ foo }}
In v3.3.3 is still getting reformatted to:
@let foo = 'hello'; {{ foo }}
@tomasdev Please create new issue
We have indeed encountered this problem and hope that the experts can solve it. The project has been upgraded to Angular 18, but after formatting, it's too bad.
Locked due to age, if you have issues, please submit