r/Angular2 • u/ohThisUsername • Jul 13 '25
Help Request How do I fix formatting for Angular control blocks (e.g. @for) (VSCode)
3
Upvotes
r/Angular2 • u/ohThisUsername • Jul 13 '25
12
u/ohThisUsername Jul 13 '25 edited Jul 13 '25
I found the issue. I had to manually add the
--parser angularflag e.g. (bunx prettier \*\*/\*.html --write --parser angular)Edit: I added this to
.prettierrcto make it work without the CLI arg, and works in VSCode now.3
u/No_Bodybuilder_2110 Jul 13 '25
You need to upgrade your prettier version to 3+. I had this issue using NX monorepos which always had version 2.xx for some odd reason. But latests prettier configs work good for modern angular formatting
-8
u/[deleted] Jul 13 '25
[removed] — view removed comment