Skip to content
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

Open
Boshen opened this issue Aug 22, 2024 · 6 comments
Open

Rework oxc_prettier #5068

Boshen opened this issue Aug 22, 2024 · 6 comments
Labels
A-prettier Area - Prettier C-enhancement Category - New feature or request E-Help Wanted Experience level - For the experienced collaborators

Comments

@Boshen
Copy link
Member

Boshen commented Aug 22, 2024

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:

As 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

@Boshen Boshen added C-enhancement Category - New feature or request A-prettier Area - Prettier E-Help Wanted Experience level - For the experienced collaborators labels Aug 22, 2024
@parkin-lin

This comment was marked as off-topic.

@DonIsaac

This comment was marked as off-topic.

@Boshen
Copy link
Member Author

Boshen commented Sep 4, 2024

@leaysgur is writing a series of articles in preparation of this task:


I'm also working on comment attachments to unblock prettier.

@Boshen Boshen pinned this issue Sep 4, 2024
@leaysgur
Copy link
Collaborator

leaysgur commented Sep 5, 2024

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.

@Boshen
Copy link
Member Author

Boshen commented Sep 5, 2024

Does this mean that you aim to implement Prettier equivalent which achieves with 60+ utils? 🫨

We need to figure out what exactly is prettier doing with those 60+ utils 🥲

@IWANABETHATGUY
Copy link
Contributor

IWANABETHATGUY commented Sep 7, 2024

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,
https://prettier.io/docs/en/technical-details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-prettier Area - Prettier C-enhancement Category - New feature or request E-Help Wanted Experience level - For the experienced collaborators
Projects
None yet
Development

No branches or pull requests

5 participants