Prettier is removing space between two jsx elements
how i should configure prettier to have a space between two jsx elements:
6 Replies
Prettier is "intentionally opinionated" & "minimally configurable".
https://prettier.io/docs/en/options.html is what you can change. You're not going to get the fine-grained control you seek.
(The space is ignored when the HTML is parsed, so there's no problems with removing it other than the appearance of your text.)
Options ยท Prettier
Prettier ships with a handful of format options.
is there any another way??
i have seen some open source project where prettier is configured and there is space between two jsx element
https://prettier.io/docs/en/options.html#html-whitespace-sensitivity
htmlWhitespaceSensitivity: strict
?https://prettier.io/docs/en/configuration.html tells you where you can put the config.
Configuration File ยท Prettier
Prettier uses cosmiconfig for configuration file support. This means you can configure Prettier via (in order of precedence):
I have added this configuration still not working
If you can find one of these projects then surely post a link. If they're using prettier then we can look at the config and figure out how they've done it