I've searched a lot about it and tried so much solutions,
I'm using Angular when formatting html with prettier it's quite ugly because it wraps every single attribute to a new line eg:
<button
pButton
class="btn"
type="button"
label="Add Item(s)"
(click)="handleClick()"
></button>
.prettierrc.json
file with {"printWidth": 100}
Important thing to note is that prettier is applying printWidth 80 something like built-in because I'm sure that it's not set in any settings by user, I have some attributes that are two per line when they quite little in space eg:
<div class="p-col-2" style="float: left">
{{ "modules.user.orderdisplay.quantity" | translate }}
</div>
You should also check for.editorconfig file - if it is present prettier will use it's values.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.