Describe the bug
dprint-plugin-typescript version: 0.95.13
Non-html-standard components that have no children but are not self-closing are not safe to add newlines/spaces in children
(in fact, even standard html element is probably an incorrect change for a formatter as adding whitespaces technically changes the program's behaviour given it can render differently with the right CSS)
type MyCustomComponentProps = {
bar: bool
baz: bool
}
const MyCustomComponent: React.FC<MyCustomComponentProps> = (props) => <>{bar}{baz}</>
Input Code
const foo = () => (
<MyCustomComponent
bar
baz
></MyCustomComponent>
)
Expected Output
const foo = () => (
<MyCustomComponent
bar
baz
></MyCustomComponent>
)
Actual Output
const foo = () => (
<MyCustomComponent
bar
baz
>
</MyCustomComponent>
)
Type '{ children: never[]; className: string; id: string; fetcher: DataEventLogFetcher; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
Property 'children' does not exist on type 'IntrinsicAttributes & ButtonProps'.
Relates to:
Describe the bug
dprint-plugin-typescript version: 0.95.13
Non-html-standard components that have no children but are not self-closing are not safe to add newlines/spaces in children
(in fact, even standard html element is probably an incorrect change for a formatter as adding whitespaces technically changes the program's behaviour given it can render differently with the right CSS)
Input Code
Expected Output
Actual Output
Relates to: