Answer the question
In order to leave comments, you need to log in
Closing tag in JSX?
I use vscode + prettier. Is it possible to configure that tags of this kind are replaced by ? <tag></tag>
<tag />
Answer the question
In order to leave comments, you need to log in
This rule exists, but not in Prettier, but in ESlint.
The fact is that prettier has 21 rules that can be specified in the configuration file. These rules are described here . There are so few of them, since prettier has its own narrow range of tasks, so to speak, its own philosophy ( you can read about it here ).
What you are interested in about ESlint is called self-closing-comp )
Documentation on adding and configuring ESlint is here
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question