This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 656
feat(rome_formatter): format import syntax #1992
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deploying with
|
Latest commit: |
332e184
|
Status: | ✅ Deploy successful! |
Preview URL: | https://41ea80cf.tools-8rn.pages.dev |
9 tasks
223b194
to
e09f855
Compare
Test262 comparison coverage results on ubuntu-latest
|
51ebdbb
to
ebf352c
Compare
577cf56
to
5ead0f9
Compare
crates/rome_formatter/tests/specs/js/module/import/import_specifiers.js
Outdated
Show resolved
Hide resolved
d0d3997
to
939dde6
Compare
939dde6
to
ee06d00
Compare
Parser conformance results on ubuntu-latestTS
T262
|
9597d78
to
9f51206
Compare
leops
reviewed
Jan 31, 2022
6e970ae
to
adab3ce
Compare
MichaReiser
reviewed
Jan 31, 2022
2008e7e
to
726243d
Compare
726243d
to
ed1bcd7
Compare
leops
reviewed
Jan 31, 2022
leops
approved these changes
Jan 31, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR formats the whole
import ...
syntax.I took the liberty to create a new
format_list
API inside theFormatter
, where there was some repeated pattern. The documentation is not the best to be honest, it would be great if someone else would suggest something more to it.There's an existing issue where a trailing comment is not well positioned in some cases. I reproduced this issue also with existing grammar, so it would be better to fix it with another PR so to not add too much to this PR.
Test Plan
Added various tests, with long variables and comments.