dprint-plugin-typescript
dprint-plugin-typescript copied to clipboard
JSX elements with no children don't self close on format
Describe the bug
JSX elements with no children don't self close on format.
Deno version: 1.37.0
Input Code
const a = <div></div>
Expected Output
const a = <div />
Actual Output
const a = <div></div>
It currently works the way it does because personally I find it annoying when a formatter makes these kind of changes while I'm editing a file. This could be behind an option maybe.
+1