oxc/crates/oxc_prettier
Boshen 7d9d04c569
refactor(prettier): align line with prettier (#1559)
This PR alines all the line types with prettier

```
const hardlineWithoutBreakParent = { type: DOC_TYPE_LINE, hard: true };
const literallineWithoutBreakParent = {
  type: DOC_TYPE_LINE,
  hard: true,
  literal: true,
};


const line = { type: DOC_TYPE_LINE };
const softline = { type: DOC_TYPE_LINE, soft: true };
const hardline = [hardlineWithoutBreakParent, breakParent];
const literalline = [literallineWithoutBreakParent, breakParent];
```

101598f94f/src/document/builders.js (L165-L175)
2023-11-27 23:11:53 +08:00
..
examples feat(prettier): turn off preserve_parens and start working on need-parens (#1487) 2023-11-21 16:26:56 +00:00
src refactor(prettier): align line with prettier (#1559) 2023-11-27 23:11:53 +08:00
Cargo.toml refactor(rust): move to workspace lint table (#1444) 2023-11-20 14:38:10 +08:00
README.md feat(prettier): init project and infrastructure (#1260) 2023-11-13 14:34:20 +08:00

Note

This is going to be a community project because I don't have the time and energy to work on this alone.

Prettier

Background: 22.5K USD bounty for prettier written in Rust?!

See https://console.algora.io/challenges/prettier

Warning

Contribution Agreement

You hereby agree that you contribute for fun and for the purpose of learning, not for the goal of winning the challenge.

In the unlikely event of winning the challenge, @boshen will ultimately decide on how to spend the money.

Important

Please talk to me on discord and indicate that you are willing to contribute and agree to the contribution agreement.

Getting started

Create a test.js and run the example just example prettier from crates/oxc_prettier/examples/prettier.rs, follow the code structure and read the references documented at the top of the files.

Tasks