+
Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_js_formatter): JSX Expression child closing parentheses #3376 #3432

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

denbezrukov
Copy link
Contributor

Summary

Fix #3376

Test Plan

cargo test -p rome_js_formatter

@netlify
Copy link

netlify bot commented Oct 15, 2022

Deploy Preview for rometools canceled.

Name Link
🔨 Latest commit c424249
🔍 Latest deploy log https://app.netlify.com/sites/rometools/deploys/634ac5872fb2e70008064796

@@ -155,6 +155,12 @@ impl FormatNodeRule<JsArrowFunctionExpression> for FormatJsArrowFunctionExpressi
Some(GroupedCallArgumentLayout::GroupedLastArgument)
);

let should_add_soft_line = is_last_call_arg
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

Surprising that there isn't a single test in the prettier test suite. Thanks for adding a spec test.

soft_line_break()
])
is_last_call_arg
.then_some(format_args![if_group_breaks(&text(",")),]),
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh no, you'll end up with merge conflicts :(

@MichaReiser MichaReiser merged commit 819e767 into rome:main Oct 17, 2022
@denbezrukov denbezrukov deleted the bug/jsx_closing_parentheses branch October 18, 2022 11:16
@MichaReiser MichaReiser added the hacktoberfest Issues for hacktoberfest label Oct 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hacktoberfest Issues for hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Formatter: JSX Expression child closing parentheses
2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载