-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
Rework oxc_prettier
#5068
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@leaysgur is writing a series of articles in preparation of this task: I'm also working on comment attachments to unblock prettier. |
Does this mean that you aim to implement Prettier equivalent which achieves with 60+ utils? 🫨 FYI: Babel also has relevant code(just 300 loc), but that did not seem to meet Prettier's requirement. |
We need to figure out what exactly is prettier doing with those 60+ utils 🥲 |
For those who are interested in algorithms under the hood, prettier is based on https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf, |
crates/oxc_prettier
was my attempt at the prettier bounty.I thought I could finish it in time, except the fact that I rushed too quickly without looking at all the requirements ... It was too late when I got blocked by printing comments.
In order to rework
oxc_prettier
, we need to understand at least:Doc
IR https://github.com/prettier/prettier/blob/main/commands.md https://github.com/oxc-project/oxc/blob/main/crates/oxc_prettier/src/doc.rsAs for the infrastructure, we already have most of the code:
Feel free to remove everything and start from scratch, and copy over the format code https://github.com/oxc-project/oxc/tree/main/crates/oxc_prettier/src/format
The text was updated successfully, but these errors were encountered: