I have problem with '>' in tags. I got:
<label
class="custom-control-label"
for="building{{building.Id}}"
>
{{ building.City }}, {{ building.Name }}
</label>
How to make label starting tag '>' in the same line as last attribute? I use Prettier, but I neither couldn't find solution in their config nor in code settings.
<label
class="custom-control-label"
for="building{{building.Id}}">
{{ building.City }}, {{ building.Name }}
</label>
Solution: I've used built-in VS Code formatter.
In Prettier < 2.4.0:
jsxBracketSameLine: true
in your Prettier settings.In Prettier >= 2.4., jsxBracketSameLine
is deprecated, so:
bracketSameLine: true
in your Prettier settings.You can refer to the official documentation for more information.
That setting in prettier is called jsxBracketSameLine
and needs to be set to true
https://prettier.io/docs/en/options.html#jsx-brackets
You can follow this thread.
This a feature request for Prettier.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With