Repository navigation
fix(BREAKING): restore spaceSurroundingExpression spacing around object & array literals and add specific options - #900
Merged
dsherret merged 2 commits intoNov 6, 2026
Conversation
this option brings back the behavior fixed by dprint#882 (as mentioned in dprint#602)
…eral and spaceSurroundingArrayLiteral Both default to the value of `jsxExpressionContainer.spaceSurroundingExpression`, which restores the output from before dprint#882. Set them to `false` to keep the brackets beside the braces (ex. `{{ value: true }}`).
dsherret
approved these changes
Nov 6, 2026
dsherret
left a comment
Member
There was a problem hiding this comment.
Thanks! I think it was wrong to switch the old behaviour actually. I just assumed it was a bug, but it was just the one person who complained. I updated this pr to have it as true by default so spaceSurroundingExpression: true is all you'll need and then if someone wants to turn it off they can specify the more specific jsxExpressionContainer.spaceSurroundingObjectLiteral: false and jsxExpressionContainer.spaceSurroundingArrayLiteral: false
spaceSurroundingExpression and add jsxExpressionContainer.spaceSurroundingObjectLiteral + spaceSurroundingArrayLiteral
spaceSurroundingExpression and add jsxExpressionContainer.spaceSurroundingObjectLiteral + spaceSurroundingArrayLiteralspaceSurroundingExpression spacing around object & array literals and add specific options
Member
|
Kicked off a minor release. Sorry about that! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this option brings back the behavior fixed by #882 (as mentioned in #602)