A
A
a91050513962020-12-27 10:25:46
React
a9105051396, 2020-12-27 10:25:46

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

1 answer(s)
K
Kirill Mager, 2020-12-28
@magerrrr

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 question

Ask a Question

731 491 924 answers to any question