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

fix(rome_js_formatter): make empty line after hashbang optional #3552

Merged
merged 5 commits into from
Nov 3, 2022
Merged

fix(rome_js_formatter): make empty line after hashbang optional #3552

merged 5 commits into from
Nov 3, 2022

Conversation

unvalley
Copy link
Contributor

@unvalley unvalley commented Nov 2, 2022

Summary

Closes #3497

Test Plan

I updated snapshot results by cargo insta review.

@netlify
Copy link

netlify bot commented Nov 2, 2022

Deploy Preview for docs-rometools ready!

Name Link
🔨 Latest commit 463bd03
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/63637873d04e190008c62891
😎 Deploy Preview https://deploy-preview-3552--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.

Comment on lines 127 to 131
if interpreter.kind() == JsSyntaxKind::JS_SHEBANG {
write!(f, [interpreter.format(), hard_line_break()])
} else {
write!(f, [interpreter.format(), empty_line()])
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly speaking, I don't have confidence that the changes here are reasonable.
This file is under the utils/, Is JS_SHEBANG allowed to appear here?
Please let me know, if this change is not correct direction.

@unvalley unvalley requested review from MichaReiser and removed request for ematipico November 3, 2022 05:18
@unvalley unvalley requested a review from MichaReiser November 3, 2022 08:16
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.

Nice! Thanks for fixing this issue

@unvalley
Copy link
Contributor Author

unvalley commented Nov 3, 2022

I've learned a lot!

@MichaReiser MichaReiser changed the title fix(rome_js_formatter): unexpected empty_line addition fix(rome_js_formatter): make empty line after hashbang optional Nov 3, 2022
@MichaReiser MichaReiser merged commit bca19a7 into rome:main Nov 3, 2022
@unvalley unvalley deleted the fix/unexpected-empty-newline-format-shebang branch November 3, 2022 09:23
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.

🐛 Rome enforces an empty newline after a hashbang, prettier doesn't
2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载