Skip to content

Jsx spread attribute formatting#20924

Merged
uniqueiniquity merged 3 commits into
microsoft:masterfrom
uniqueiniquity:jsxSpreadAttributeFormatting
Jan 5, 2018
Merged

Jsx spread attribute formatting#20924
uniqueiniquity merged 3 commits into
microsoft:masterfrom
uniqueiniquity:jsxSpreadAttributeFormatting

Conversation

@uniqueiniquity
Copy link
Copy Markdown
Contributor

Fixes #20759.

This change updates the formatting option for including a space after the opening brace and before the closing brace of a JSX expression to also affect spread attributes.

@uniqueiniquity uniqueiniquity requested review from a user and RyanCavanaugh December 28, 2017 21:27

// Set the option to false first
format.setOption(propertyName, false);
format.setOption(propertyName.slice(0, -1), false);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of giving the markers this silly name, just use const propertyName = "InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"; and use markerName as a parameter.

@uniqueiniquity uniqueiniquity merged commit 5bd477e into microsoft:master Jan 5, 2018
@uniqueiniquity uniqueiniquity deleted the jsxSpreadAttributeFormatting branch January 5, 2018 18:27
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant