-
-
Notifications
You must be signed in to change notification settings - Fork 595
feat(formatter): support printing comments #11716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
5e5667c
to
8843917
Compare
CodSpeed Instrumentation Performance ReportMerging #11716 will degrade performances by 4.07%Comparing Summary
Benchmarks breakdown
|
704cdda
to
1b91111
Compare
1b91111
to
0bbbfd8
Compare
This PR supports printing leading, trailing, and dangling comments based on the Prettier algorithm.
There are two main things done in this PR:
following_node
field inAstNode
.This field, which is a
SiblingNode
(which could be replaced byAstKind
after #11490), is an enum that includes all the AST structs. It will store the next node of the current node. The purpose of this field is to help us determine whether a comment is leading or trailing.Comments
with our ownComments
.