I am using prettier to format my code in VS Code but I really dislike how it does it.
My main beef is it splitting attributes over multiple lines.
<input
type="checkbox"
name="asiaNews"
id="asiaNews"
value="asiaNews"
/>
I'd much prefer it to look like this
<input type="checkbox" name="asiaNews" id="asiaNews" value="asiaNews" />
I can't find anything in the docs or on SO
How to prevent VS Code from breaking up long HTML lines into multiple lines?
Is there a way to do it or a different tool that I can use so I can have my own custom formatting rules that suits my sensibilities?
printWidth
settings since it will only break your attributes into multiple lines if you're over theprintWidth
limit. You can test things out in the prettier playground: prettier.io/playground If you're over theprintWidth
I don't think there is anything you can do to prevent the attributes from going over multiple lines while using prettier. – Robert Cooper