Our local team policy is to always run mix format
on our codebase. However, it’s causing me some grief at the moment.
I have in my LiveView code:
<textarea
id={"#{@id}-new-note"}
placeholder="Add new note ..."
></textarea>
mix format
turns this into:
<textarea
id={"#{@id}-new-note"}
placeholder="Add new note ..."
>
</textarea>
Unfortunately, while normally white space in HTML is not significant, in this case it will cause the textarea
to have white-space as its value. Which in turn means that a browser won’t show the placeholder text.
Anyone have any suggestions? I couldn’t see an option to control this, or anything analogous to eslint-disable-next-line
to temporarily turn off formatting for a specific region of code.