This issue will act as the hub for tracking the GritQL formatter as it gets built out. Listed here are all of the different pieces that will need to be implemented to get "complete" support in place.
To see how this issue fits into our plugin efforts, please look at the overview here: #2463
Everyone is welcome to contribute pieces here! Some of these may also be good first issues, so if you're looking for guidance, just reach out to us.
If you'd like to tackle something, please leave a comment below this issue for which item(s) of the checklist below you'd like to pick up. We will create a separate issue and assign it to you to simplify tracking.
Note
In order to have the issue assigned to you, you must comment on this issue.
Please only pick a single piece or group to work on at a time, and try to have time available to work on the piece when you select it so that we can keep progressing quickly. If you need any help or have any questions about our plugin efforts in Biome, feel free to ask in the #plugins
channel in Discord.
Since GritQL is quite a new language, there is no reference formatter to base our efforts on. However, there is a Grit stdlib that has a wide variety of common patterns that can be used as reference. It's probably best if we start by taking some of their patterns and using them as "expected results" in our test suite. Then we can mangle the formatting and verify the formatter returns them as expected.
Listed here are various things that are ready to be implemented or fixed that apply to the GritQL formatter in general.
can_format_grit_yet
flag into biome_service
biome ignore: format
suppression comments in appropriate placesThis is a guide that covers most of the nodes that need formatting rules:
before
/ after
any
/ some
/ every
/ and
/ or
bubble
contains
/ includes
/ within
if
like
/ where
any
/ and
/ or
if
These tasks need to be completed for the GritQL formatter to be "publicly available" with parity with the JS formatter:
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too