[Vuejs]-VSCode Prettier and vue confusing formatting

3👍

That is expected behaviour.
Prettier does a line break after 80 characters or so. And it breaks before the > because if it breaks after, it actually adds a white space, so you might run into display issues later on.

this is correct:

 <v-btn color="brown lighten-3" class="hidden-sm-and-down"
   >REGISTRIEREN</v-btn
 >

this is not (the line break before and after ‘REGISTRIEREN’ is an actual character):

<v-btn color="brown lighten-3" class="hidden-sm-and-down">
   REGISTRIEREN
</v-btn>

You can customise some of these rules, but I honestly recommend just keeping what comes out of the box – the more you customise, the more things keep breaking during updates etc.

Leave a comment