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

feat(rome_js_formatter): trailing comma option #3305 #3430

Merged
merged 2 commits into from
Oct 18, 2022

Conversation

denbezrukov
Copy link
Contributor

@denbezrukov denbezrukov commented Oct 15, 2022

Summary

Add support for a trailing_comma option that can either be es5 or all (default)

Close #3305

Test Plan

Add new snapshots

cargo test -p rome_js_formatter

@netlify
Copy link

netlify bot commented Oct 15, 2022

Deploy Preview for docs-rometools ready!

Name Link
🔨 Latest commit 8b910e9
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/634e474e24ff710008c62029
😎 Deploy Preview https://deploy-preview-3430--docs-rometools.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@denbezrukov denbezrukov force-pushed the feature/tralling-comma-option branch 6 times, most recently from 8d70415 to 1a57648 Compare October 15, 2022 09:56
@denbezrukov denbezrukov marked this pull request as ready for review October 15, 2022 10:05
@denbezrukov denbezrukov requested a review from a team October 15, 2022 10:05
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.

Awesome work! There are three more places where trailing commas exist but think this is otherwise good to merge (search for if_group_breaks(&text(","))

dsadsadasdasdasdasdasdasdasd,
dsadsadasdasdasdasdasdasdasd,
] = [1, 2, 10];
## Output 2
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Unrelated to your change but something we may want to change in another PR. We should wrap the code in "```" and ensure there is at least one new line between the code and the Output titles.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will do so after this PR is merged.

@denbezrukov denbezrukov force-pushed the feature/tralling-comma-option branch 3 times, most recently from f671b30 to a96b95b Compare October 17, 2022 13:28
@denbezrukov denbezrukov force-pushed the feature/tralling-comma-option branch from a96b95b to fc99a71 Compare October 18, 2022 06:21
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.

📎 Formatter: Trailing Comma option
3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载