Recent versions cannot close empty jsx tags
```jsx
It will help me close the label before, now it won't work.
### Actual result
```jsx
<One></One>
VS Code Version:
鐗堟湰: 1.37.1 (user setup)
鎻愪氦: f06011ac164ae4dc8e753a3fe7f9549844d15e35
鏃ユ湡: 2019-08-15T16:17:55.855Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362
Prettier - Code formatter 2.2.2
OS and version:
wind10
This is expected behavior, the change was made in Prettier 1.18:
https://prettier.io/blog/2019/06/06/1.18.0.html#stop-converting-empty-jsx-elements-to-self-closing-elements-6127-by-duailibe
Version 1.9.0 works fine. Later versions don't close empty tabs. How do I get back to the original style?
You can either install a specific (old) version of extension or prettier itself. If the extension finds a custom local version of prettier it picks it instead of using the built-in one.
I'm having the same issue now as well.
I get changing the default behavior, but is there not a way to change this behavior should a user have liked/been accustomed to the old method? Using an old version of Prettier is hardly a long-term solution.
VSCode extension for Prettier has no way to fix the behavior for you as it simply calls Prettier core. The only way to get the behavior back is to persuade Prettier core team that self-closing jsx tags need to become configurable. Given their option philosophy, I guess it鈥檚 easier to just get used to the new behavior and don鈥檛 think of this issue much rather than getting that option. Simplicity brings more benefit in this case compared to ultimate flexibility.
Closing, this is expected. @kachkaev gave the _solution_
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
VSCode extension for Prettier has no way to fix the behavior for you as it simply calls Prettier core. The only way to get the behavior back is to persuade Prettier core team that self-closing jsx tags need to become configurable. Given their option philosophy, I guess it鈥檚 easier to just get used to the new behavior and don鈥檛 think of this issue much rather than getting that option. Simplicity brings more benefit in this case compared to ultimate flexibility.