How do I disable prettier from adding extra space in self closing tag HTML element? #18289
Unanswered
hashfiputra
asked this question in
Q&A
Replies: 1 comment
-
|
This is intentional JSX formatting behavior and there is no Prettier option to disable it. The space before Why it exists:
Workarounds:
{/* prettier-ignore */}
<div className="..."/>
Unfortunately Prettier is opinionated here and does not provide a config option for this specific behavior. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For example in my React component:
I can't find anything to disable this in the docs
Beta Was this translation helpful? Give feedback.
All reactions