dprint / dprint-plugin-typescript

TypeScript and JavaScript code formatting plugin for dprint.
https://dprint.dev/plugins/typescript
MIT License
248 stars 50 forks source link

Option `jsxExpressionContainer.spaceSurroundingExpression` adds spaces between multiple braces #602

Open robertpin opened 5 months ago

robertpin commented 5 months ago

When using jsxExpressionContainer.spaceSurroundingExpression: true the formatter adds spaces between multiple braces.

dprint-plugin-typescript version: 0.88.8.wasm

Input Code

<MyComponent myProp={{value: true}} />
<MySecondComponent myProp={[{value: true}]} />

Expected Output

<MyComponent myProp={{ value: true }} />
<MySecondComponent myProp={[{ value: true }]} />

Actual Output

<MyComponent myProp={ { value: true } } />
<MySecondComponent myProp={ [ { value: true } ] } />