Dunqing
211275fd7f
feat(prettier): implement format function for ObjectPattern ( #1309 )
...
feat(prettier): implement format function for ObjectPattern
feat: replace space with Line
2023-11-14 21:09:26 +08:00
Dunqing
f597a43d8a
feat(prettier): implement format function for StringLiteral ( #1308 )
2023-11-14 21:03:26 +08:00
Dunqing
e26e8dd6f8
feat(prettier): implement format function for CallExpression ( #1307 )
2023-11-14 20:55:26 +08:00
Dunqing
e0af69a884
feat(prettier): implement format function for BindingPattern ( #1306 )
...
feat(prettier): implement format function for BindingPattern
feat: full match
2023-11-14 20:48:34 +08:00
Dunqing
071efded7c
feat(prettier): implement format function for VariableDeclarator ( #1305 )
2023-11-14 20:40:29 +08:00
Cameron
6a062a882f
fix(prettier) Fix subtract with overflow ( #1314 )
2023-11-14 20:35:33 +08:00
Boshen
5f316626f6
feat(prettier): add the basics of comment printing ( #1313 )
2023-11-14 12:32:03 +00:00
Dunqing
4967ca2cdb
feat(prettier): implement format function for VariableDeclaration ( #1304 )
2023-11-14 20:30:27 +08:00
magic-akari
ac6f5884a5
feat(prettier): implement format for MemberExpression ( #1312 )
2023-11-14 20:23:50 +08:00
Cameron
891d353ade
feat(prettier) Improve function printing ( #1301 )
2023-11-14 17:14:34 +08:00
magic-akari
3fd97505d1
feat(prettier): implement format for ClassElement ( #1299 )
2023-11-14 15:16:05 +08:00
magic-akari
b95ec556fc
feat(prettier): implement format for StaticBlock ( #1298 )
2023-11-14 15:15:47 +08:00
magic-akari
73e0bd7edf
feat(prettier): implement format for CatchClause ( #1297 )
2023-11-14 15:15:18 +08:00
Boshen
90c7fee1bc
refactor(prettier): make the printer code more rusty ( #1296 )
2023-11-14 13:54:32 +08:00
Dunqing
6c1435a3c1
feat(prettier): implement format for ContinueStatement ( #1293 )
...
Deleted by mistake at #1285
Co-authored-by: Boshen <boshenc@gmail.com>
2023-11-14 05:49:04 +00:00
Boshen
a8ecdaecb9
refactor(prettier): move printer.rs to its own folder ( #1294 )
2023-11-14 13:42:41 +08:00
Cameron
92cd6df08a
feat(printer) A Working Printer ( #1287 )
...
Co-authored-by: Boshen <boshenc@gmail.com>
2023-11-14 05:00:57 +00:00
Cameron
be181c1bc8
feat(printer) Print BinaryExpression ( #1282 )
2023-11-14 12:20:25 +08:00
Dunqing
c15b76b92d
feat(prettier): add HardLine and Semicolon in ExpressionStatement ( #1285 )
2023-11-14 12:14:45 +08:00
Cameron
b528af1b93
feat(printer) Print SwitchStatement ( #1281 )
2023-11-14 12:14:02 +08:00
Cameron
7182cc6ebe
feat(printer) Print Argument ( #1280 )
2023-11-14 09:50:30 +08:00
Cameron
232b93ba41
feat(printer) Print ArrayExpression ( #1279 )
2023-11-14 09:45:26 +08:00
Cameron
561c73d88c
feat(printer) Basic Printer options ( #1278 )
2023-11-14 09:37:18 +08:00
Dunqing
0297cf7cc7
fix(prettier): remove redundant newline and semicolons from the Program ( #1284 )
2023-11-14 09:36:37 +08:00
Dunqing
3942256af4
feat(prettier): correctly format the NumberLiteral ( #1283 )
2023-11-14 09:27:56 +08:00
Cameron
3db074b87c
feat(printer) Print TryStatement ( #1277 )
2023-11-13 19:16:05 +00:00
Cameron
2adfec6c0f
feat(printer) Print ContinueStatement ( #1276 )
2023-11-13 18:29:28 +00:00
Cameron
4ea0aacdb4
feat(printer) Print ThrowStatement ( #1275 )
2023-11-13 18:28:14 +00:00
Cameron
f892a9e8a1
feat(printer) Print BreakStatement ( #1274 )
2023-11-13 18:28:06 +00:00
Cameron
cef4c88579
feat(printer) Print UnaryExpression ( #1273 )
2023-11-13 18:27:52 +00:00
Cameron
a7acd07df8
feat(printer) Print UpdateExpression ( #1272 )
2023-11-13 18:27:08 +00:00
Cameron
1fb12d0088
feat(printer) Print RegExpLiteral ( #1269 )
2023-11-13 15:06:59 +00:00
Cameron
1cc003f194
feat(printer) Print PrivateIdentifier ( #1268 )
2023-11-13 15:06:49 +00:00
Boshen
5c1637b786
feat(prettier): add some basic formatting functions ( #1266 )
2023-11-13 13:27:53 +00:00
Cameron
ca82125f0b
feat(printer) Print Debugger statement ( #1265 )
2023-11-13 13:06:29 +00:00
Cameron
74e5616acc
feat(prettier) Print Super expression ( #1264 )
2023-11-13 13:02:36 +00:00
Cameron
728b7832dc
feat(prettier) Print this expression ( #1263 )
2023-11-13 13:02:21 +00:00
Boshen
65be4acdd4
feat(prettier): init project and infrastructure ( #1260 )
...
> [!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](https://discord.com/invite/9uXCAwqQZW )
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
- [x] Have the basic infrastructure ready for contribution
- [ ] Implement a test runner in Rust which extracts the snapshots and
do a comparison over it
- [ ] Establish a way to pass all the tests by manually porting code
- [ ] Pass as many tests as possible in
https://github.com/prettier/prettier/tree/main/tests/format/js
2023-11-13 14:34:20 +08:00