-
Notifications
You must be signed in to change notification settings - Fork 653
feat(rome_js_formatter): trailing comma option #3305 #3430
feat(rome_js_formatter): trailing comma option #3305 #3430
Conversation
✅ Deploy Preview for docs-rometools ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
8d70415
to
1a57648
Compare
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
...es/rome_js_formatter/tests/specs/js/module/array/trailing-comma/array_trailing_comma.js.snap
Outdated
Show resolved
Hide resolved
f671b30
to
a96b95b
Compare
a96b95b
to
fc99a71
Compare
Summary
Add support for a trailing_comma option that can either be
es5
orall
(default)Close #3305
Test Plan
Add new snapshots
cargo test -p rome_js_formatter