Wenzhe Wang
21dffec8be
feat(prettier): add id on IfBreak and Group ( #1551 )
2023-11-27 22:53:32 +08:00
Dunqing
0e1abae757
feat(prettier): filter out EmptyStatement in BlockStatement ( #1546 )
2023-11-27 22:45:45 +08:00
Boshen
6e7892fcf0
refactor(prettier): move comment printing to its own directory ( #1556 )
2023-11-27 14:22:15 +08:00
Boshen
cc382835ef
feat(prettier): trailing comment (wip) ( #1538 )
2023-11-27 14:08:39 +08:00
Dunqing
85e8c8bad5
fix(prettier): incorrect order of print in AssignmentTargetPropertyProperty ( #1545 )
2023-11-27 12:18:32 +08:00
Cameron
d5b636b197
feat(prettier) Improve assignment compatibility ( #1547 )
2023-11-27 10:01:01 +08:00
Cameron
08b659455b
refactor(prettier) move assignment printing into seperate file ( #1544 )
2023-11-26 14:09:57 +08:00
Wenzhe Wang
46d1086c3e
feat(prettier): add LineSuffix Doc ( #1542 )
2023-11-25 13:46:02 +08:00
Wenzhe Wang
924d99e8d7
feat(prettier): init command of Fill ( #1460 )
2023-11-25 12:03:26 +08:00
Boshen
13cac62402
feat(prettier): print leading comments for all ast nodes ( #1537 )
2023-11-25 00:35:51 +08:00
Dunqing
3ca2f50773
feat(prettier): align ObjectProerty with prettier ( #1536 )
2023-11-24 20:20:07 +08:00
Dunqing
ac8a5ce574
feat(prettier): support handling of BlockStatement within consequent in SwitchCase ( #1533 )
2023-11-24 17:15:29 +08:00
Dunqing
ec0ee5cd07
feat(prettier): keep empty lines in SwitchStatement ( #1532 )
2023-11-24 17:10:27 +08:00
Boshen
4a0d18048b
feat(prettier): format () => ({} ? 1 : 2); to () => ({}) ? 1 : 2; ( #1534 )
2023-11-24 17:07:19 +08:00
Dunqing
75c75887e3
feat(prettier): trim spaces when printing hardline ( #1531 )
2023-11-24 17:05:20 +08:00
Boshen
e55fdc6452
feat(prettier): add parens to conditional and arrow expr ( #1530 )
2023-11-24 15:07:29 +08:00
Boshen
6e81b3d41a
fix(prettier): pop the stack in should_wrap_function_for_export_default ( #1529 )
2023-11-24 14:57:06 +08:00
Boshen
78c6fcd1d0
feat(prettier): improve format of ExportDefaultDeclaration ( #1520 )
2023-11-23 21:52:56 +08:00
Wenzhe Wang
f4c89ce5a6
feat(prettier): implement DocBuidler trait for Printer and Prettier ( #1519 )
2023-11-23 21:48:13 +08:00
Dunqing
3758e6f6a5
feat(prettier): handle the logic inside the parentheses in BinaryExpression and LogicalExpression ( #1516 )
2023-11-23 18:32:25 +08:00
Dunqing
490a589ded
feat(prettier): print binarylish correctly in SwitchStatement ( #1515 )
2023-11-23 18:29:00 +08:00
Dunqing
635008a408
feat(prettier): support print empty switch ( #1514 )
2023-11-23 16:19:42 +08:00
Boshen
ef59f544b4
feat(prettier): handle binary in in for statement init ( #1512 )
2023-11-23 12:50:30 +08:00
Dunqing
bec365e1b6
feat(prettier): support propagate breaks ( #1511 )
...
regression tests are the expected result
2023-11-23 10:44:41 +08:00
Boshen
2d5e0d5d07
feat(prettier): handle parens for member expression inside new expression ( #1505 )
2023-11-22 16:22:49 +00:00
Boshen
6410502cc6
refactor(prettier): rename file need_parens -> needs_parens ( #1504 )
2023-11-23 00:04:00 +08:00
Boshen
d3b7629b46
feat(prettier): handle parens for logical assignment expression ( #1503 )
2023-11-22 23:58:43 +08:00
Boshen
93c461a5b9
feat(prettier): format number in member expression ( #1499 )
2023-11-22 21:52:06 +08:00
Boshen
567c6ed757
feat(prettier): print directives ( #1497 )
2023-11-22 19:39:25 +08:00
Boshen
cf803d379a
feat(prettier): add parens to ExportDefaultDeclaration ( #1494 )
2023-11-22 19:34:37 +08:00
Dunqing
79c67d15c0
perf(prettier): check commandjs or amd in CallExpression only ( #1491 )
2023-11-22 10:57:31 +08:00
Boshen
064353c97e
feat(prettier): turn off preserve_parens and start working on need-parens ( #1487 )
2023-11-21 16:26:56 +00:00
Shannon Rothe
8934ddb590
feat(prettier): basic TaggedTemplateExpression printing ( #1486 )
2023-11-21 22:15:29 +08:00
Dunqing
347b5721c0
feat(prettier): print multiple variable declarator correctly in VariableDeclaration ( #1485 )
2023-11-21 18:54:26 +08:00
Dunqing
f1874c7955
feat(prettier): should be newline if break in AssigmentExpression ( #1484 )
2023-11-21 18:50:26 +08:00
Dunqing
c762a85fcc
feat(prettier): print inner comment in PropertyKey ( #1479 )
2023-11-21 17:26:36 +08:00
Dunqing
79c2bac6b1
feat(prettier): support longer source in ImportExpression ( #1478 )
2023-11-21 17:21:23 +08:00
Dunqing
51a78e2223
feat(prettier): support print inner comment in CallExpression ( #1475 )
2023-11-21 12:28:46 +08:00
Dunqing
d64ed0a953
feat(prettier): support format commonjs and amd call ( #1473 )
2023-11-21 10:05:39 +08:00
magic-akari
f81f15ff71
fix(prettier): Private Field Expression ( #1459 )
2023-11-20 23:32:16 +08:00
Wenzhe Wang
5aca375a94
feat(prettier): add should_break for array ( #1454 )
2023-11-20 22:58:52 +08:00
magic-akari
4c213a1c14
fix(prettier): async arrow expression ( #1457 )
2023-11-20 22:58:37 +08:00
magic-akari
59b8fdfaa5
fix(prettier): class extends clause ( #1456 )
2023-11-20 21:45:28 +08:00
magic-akari
18d8be0353
fix(prettier): class without name ( #1455 )
2023-11-20 21:41:14 +08:00
magic-akari
eecf8d3dc6
fix(prettier): print_method ( #1453 )
2023-11-20 12:41:36 +00:00
Shannon Rothe
712505bfce
chore(prettier): fix typo in function name ( #1451 )
...
Small typo on the function name cloned from the Prettier repo
2023-11-20 18:51:45 +08:00
Boshen
0bf3dbfde4
feat(prettier): add infra for need_parens ( #1450 )
2023-11-20 17:18:39 +08:00
Dunqing
719ed744e0
feat(prettier): implement should_break in CallExpression and Object ( #1448 )
2023-11-20 17:07:32 +08:00
Dunqing
aabed6bee8
feat(prettier): when calculating the remaining width, the docs of the remaining commands should be included ( #1441 )
2023-11-20 16:59:06 +08:00
Dunqing
ca06126d50
feat(prettier): support format function for ImportNamespaceSpecifier ( #1443 )
2023-11-20 07:24:15 +00:00
Boshen
6892a298cf
feat(prettier): add spacing before empty bracket in ImportDeclaration ( #1447 )
...
Co-authored-by: Dunqing <dengqing0821@gmail.com>
2023-11-20 15:14:38 +08:00
Boshen
1a576f60a8
refactor(rust): move to workspace lint table ( #1444 )
2023-11-20 14:38:10 +08:00
Cameron
d02b7470d9
feat(prettier) print ?. when a printing an optional call expression ( #1440 )
2023-11-20 09:40:28 +08:00
Cameron
a53c5e9bab
feat(prettier) check original state for new lines when formatting properties ( #1439 )
2023-11-20 09:36:26 +08:00
Cameron
008eb0d178
feat(prettier) Support should_break option for group doc ( #1438 )
2023-11-20 09:32:05 +08:00
Boshen
18f19ee164
refactor(prettier): improve comment handling API ( #1435 )
2023-11-19 23:08:23 +08:00
Boshen
0218ae8641
feat(prettier): print leading comments with newlines ( #1434 )
2023-11-19 22:46:55 +08:00
Boshen
6ee072aafd
refactor(prettier): comment flags should be bigflags ( #1433 )
2023-11-19 21:24:22 +08:00
Boshen
cf388ae79e
feat(prettier): format empty try catch ( #1430 )
2023-11-19 18:01:49 +08:00
Boshen
18fa8e45a4
feat(prettier): format for((let) of .. ( #1429 )
2023-11-19 17:48:09 +08:00
Boshen
cc8b8719f7
feat(prettier): format for loop and update expression ( #1427 )
2023-11-19 14:04:47 +08:00
Wenzhe Wang
c1450d8e90
feat(prettier): basic print of TemplateLiteral ( #1426 )
2023-11-19 13:51:47 +08:00
Boshen
902d4d0bab
feat(prettier): format with and if statements ( #1425 )
2023-11-19 11:47:31 +08:00
Cameron
08ce4474e1
feat(prettier) Add IndentIfBreak support ( #1420 )
2023-11-19 03:11:52 +00:00
Dunqing
b945307ab3
feat(prettier): support format function for ImportDefaultSpecifier ( #1424 )
2023-11-19 11:10:08 +08:00
Wenzhe Wang
d6b913e46a
feat(prettier): add trailing comma ( #1422 )
2023-11-19 11:08:25 +08:00
Cameron
91ee3e8bfc
fix(prettier) Print intend in doc debug view ( #1419 )
2023-11-19 11:07:32 +08:00
Boshen
1dacb645d0
feat(prettier): start adding parent stack ( #1415 )
2023-11-18 16:39:24 +00:00
Boshen
abaa8c37a5
refactor(prettier): clean up some code ( #1414 )
2023-11-18 14:46:11 +00:00
Boshen
d0a70d0626
feat(prettier): print class method and read tab width ( #1413 )
2023-11-18 22:42:53 +08:00
Dunqing
b0248acb7b
refactor(prettier): refactor binaryish expression formatting ( #1412 )
2023-11-18 22:03:26 +08:00
Dunqing
f6ecd96e69
feat(prettier): print getter/setter function in PropertyKey ( #1411 )
2023-11-18 21:59:22 +08:00
Boshen
bc3069ec76
feat(prettier): print empty object properties ( #1409 )
2023-11-18 16:52:54 +08:00
Wenzhe Wang
70b80ba542
feat(prettier): print TSTupleType ( #1408 )
2023-11-18 16:44:27 +08:00
Wenzhe Wang
97fee26e25
feat(prettier): print empty array ( #1407 )
2023-11-18 16:40:39 +08:00
Boshen
481af5040d
feat(prettier): format hashbang ( #1406 )
2023-11-18 16:00:52 +08:00
Boshen
c9f7f1308f
chore(prettier): allow trailing comma in some macros ( #1405 )
2023-11-18 15:42:39 +08:00
Boshen
323f2f9789
feat(prettier): format more import and export declarations ( #1404 )
2023-11-18 15:37:56 +08:00
Dunqing
b251c10b09
feat(prettier): print parameters in ArrowExpression ( #1400 )
2023-11-18 05:37:55 +00:00
Dunqing
7951849ec1
feat(prettier): support format function for ImportExpression ( #1399 )
2023-11-18 13:34:14 +08:00
magic-akari
f5894b636b
perf(regexp): remove unnecessary sort ( #1402 )
2023-11-18 13:28:55 +08:00
Dunqing
75eb708526
feat(prettier): transform expression to identifier in PropertyKey ( #1398 )
2023-11-18 11:20:43 +08:00
Boshen
fb7cdc6687
refactor(prettier): impl Display for Doc ( #1401 )
2023-11-18 11:17:03 +08:00
Boshen
8cb0795796
feat(prettier): format SequenceExpression and ParenthesizedExpression ( #1397 )
2023-11-18 10:19:12 +08:00
Cameron
08f00cbd82
fix(prettier) if statement closing bracket indentation ( #1396 )
2023-11-18 09:51:25 +08:00
Cameron
39341e4688
feat(prettier) Print function args correctly ( #1395 )
2023-11-18 09:47:27 +08:00
Cameron
cff04ed09c
feat(prettier) print do while loop ( #1394 )
2023-11-18 09:41:27 +08:00
Cameron
db71974655
feat(prettier) Print labeled statement ( #1393 )
2023-11-18 09:36:28 +08:00
Cameron
ecbe0a4b98
feat(prettier) object assignments ( #1392 )
2023-11-18 09:31:26 +08:00
Cameron
6bb40a8f86
feat(prettier) array assignments ( #1391 )
2023-11-18 09:27:26 +08:00
Cameron
ba57544b6e
feat(prettier) TSInferType, TSIndexAccessType ( #1390 )
2023-11-18 09:22:37 +08:00
Boshen
7ed067ec28
feat(prettier): print NumberLiteral ( #1389 )
...
feat(prettier): print NumberLiteral
feat(prettier): format `NumberLiteral`
2023-11-18 02:06:09 +08:00
Cameron
b025213795
feat(prettier) port adjust clause ( #1388 )
2023-11-18 01:58:27 +08:00
Cameron
5cb6ff2895
feat(prettier) print while statement ( #1387 )
2023-11-18 01:52:27 +08:00
Cameron
0195affb5a
feat(prettier) print for in statements ( #1386 )
2023-11-18 01:46:27 +08:00
Cameron
b613eab2f0
feat(prettier) print for of statements ( #1385 )
2023-11-18 01:41:27 +08:00
Cameron
788e9b3807
feat(prettier) print for statement ( #1384 )
2023-11-18 01:36:14 +08:00
Boshen
f8b9679d74
feat(prettier): print module specifiers ( #1383 )
2023-11-17 22:03:28 +08:00
Cameron
001a8d8fe9
feat(prettier) print array pattern ( #1382 )
2023-11-17 21:56:41 +08:00
Cameron
6d0e647c13
feat(prettier) print TS literals ( #1380 )
2023-11-17 21:23:27 +08:00
Cameron
e3c8b12bbb
feat(prettier) print simple types ( #1379 )
2023-11-17 21:17:26 +08:00
Boshen
9a21d1af7b
feat(prettier): print ExportAllDeclaration ( #1381 )
2023-11-17 13:16:55 +00:00
Cameron
a305b84143
feat(prettier) types backbone ( #1378 )
2023-11-17 21:11:26 +08:00
Boshen
1dcd29a91b
feat(prettier): support endOfLine option ( #1377 )
2023-11-17 20:50:17 +08:00
Cameron
5f5926e0ba
feat(prettier) Use minimum amount of escapes in strings ( #1376 )
...
```ts
[
"foo",
'bar',
"bar'",
'bar\'',
'bar"',
"bar\"",
"bar\"\"\"''",
"bar\"\"\"'''",
]
```
Becomes:
```ts
["foo", "bar", "bar'", "bar'", 'bar"', 'bar"', 'bar"""\'\'', "bar\"\"\"'''"];
```
2023-11-17 20:44:17 +08:00
Dunqing
7b85843981
feat(task/prettier-conformance): add spacing before block in IfStatement ( #1374 )
2023-11-17 20:19:26 +08:00
Boshen
2d3b5eb299
feat(prettier): add comments before expressions ( #1375 )
2023-11-17 19:38:25 +08:00
Dunqing
a8e4c3333c
feat(prettier): wrap a group in BinaryExpression ( #1370 )
2023-11-17 19:00:29 +08:00
Dunqing
6ac6d7158f
fix(prettier): incorrect dot operator in MetaProperty ( #1369 )
...
fix(prettier): incorrect dot operator in MetaProperty
test: update snap
2023-11-17 17:56:57 +08:00
Boshen
6d8fa7ff36
feat(prettier): sort regex flags ( #1372 )
2023-11-17 17:08:57 +08:00
Boshen
5a6c83b0cc
feat(prettier): print NewExpression correctly ( #1368 )
2023-11-17 16:38:19 +08:00
Boshen
bfdb6eac86
feat(prettier): print statements with newlines ( #1367 )
2023-11-17 15:13:51 +08:00
Dunqing
9b94226531
feat(prettier): support single_quote option ( #1366 )
2023-11-17 14:07:29 +08:00
Dunqing
1116afa7bc
fix(prettier): remove extra empty lines inside the function body ( #1365 )
...
I'm not sure that's the right approach. But we can handle it this way for now
2023-11-17 14:03:26 +08:00
Dunqing
210dbd3ff2
feat(prettier): support format arrow function as expression ( #1364 )
2023-11-17 13:59:29 +08:00
Dunqing
5af76b4bcd
fix(prettier): incorrect square brackets in ComputedMemberExpression ( #1363 )
2023-11-17 13:55:27 +08:00
Boshen
c6957ae8f1
refactor(prettier): use plain print_xxx functions ( #1361 )
2023-11-17 12:36:05 +08:00
Wenzhe Wang
3267437128
feat(prettier): split ArrayExpression to single file ( #1359 )
2023-11-16 16:03:29 +00:00
Boshen
e65ec46705
feat(prettier): print ImportDeclaration ( #1358 )
2023-11-17 00:03:14 +08:00
Boshen
2aca2d0894
feat(prettier): add print_class ( #1355 )
2023-11-16 15:21:26 +00:00
Wenzhe Wang
a3658ca5f9
feat(prettier): add more on function parameters format ( #1356 )
2023-11-16 22:37:02 +08:00
Boshen
9754ef0d95
feat(pretter): start formatting ModuleDeclaration and ArrowExpression ( #1354 )
2023-11-16 21:38:21 +08:00
Dunqing
40be405a57
feat(prettier): support for printing objects with longer properties ( #1353 )
2023-11-16 20:48:27 +08:00
Shannon Rothe
abd5924ce9
feat(playground): add prettier IR output ( #1350 )
...
<img width="1549" alt="image"
src="https://github.com/oxc-project/oxc/assets/803013/08046826-9141-48ce-985d-6dd22642bfd6 ">
- Close : #1338
2023-11-16 20:42:02 +08:00
Boshen
bc302f4f8b
feat(prettier): print big int with lowercase ( #1351 )
2023-11-16 19:04:12 +08:00
Boshen
aee733d250
feat(prettier): add print_return_or_throw_argument ( #1347 )
2023-11-16 17:16:30 +08:00
Boshen
66aae99c63
feat(prettier): add print_function and print_function_parameters ( #1346 )
2023-11-16 17:01:19 +08:00
Boshen
147b4bc530
feat(prettier): attempt to print leading comments ( #1345 )
2023-11-16 16:19:40 +08:00
Dunqing
95268c9e0d
feat(prettier): implement format function for ObjectExpression ( #1344 )
2023-11-16 16:01:36 +08:00
Boshen
187299bd8f
feat(prettier): add print_call_expression for CallExpression and NewExpression ( #1340 )
2023-11-16 11:47:30 +08:00
Boshen
cf3318c609
refactor(prettier): use allocator for IfBreak's Box ( #1339 )
2023-11-16 11:33:30 +08:00
Dunqing
b443a0798f
fix(prettier): remove unnecessary group and ident in BinaryishExpression ( #1337 )
2023-11-16 11:16:26 +08:00
Dunqing
8d7c0d73d1
feat(prettier): improve the format of ReturnStatement to support longer width ( #1336 )
2023-11-16 11:10:27 +08:00
Dunqing
2bed242016
feat(prettier): Doc::IfBreak should a accept single doc and add if_break macro ( #1335 )
2023-11-16 11:03:53 +08:00
Boshen
a2f9c8c6b7
feat(prettier): add more expression formatting logic ( #1334 )
2023-11-15 16:36:15 +00:00
Boshen
9594f62caf
feat(prettier): add print_block ( #1333 )
2023-11-15 14:56:20 +00:00
Wenzhe Wang
f04921fa95
feat(prettier): format WithStatement ( #1332 )
2023-11-15 14:49:52 +00:00
Boshen
45d5cf7e0a
chore(prettier): move format.rs to its own directory ( #1331 )
2023-11-15 13:08:29 +00:00
Boshen
33a14902d3
perf(prettier): preallocate the output buffer ( #1328 )
2023-11-15 14:24:47 +08:00
Cameron
e5a34366af
fix(prettier) Fix printing of array expressions ( #1325 )
2023-11-15 10:18:32 +08:00
Cameron
9c170b89ff
refactor(prettier) Remove flat_contents from IfBreak ( #1324 )
2023-11-15 10:13:30 +08:00
Cameron
01a3a77ead
fix(prettier) indent block stmts correctly ( #1323 )
2023-11-15 09:59:11 +08:00
Cameron
ebcd707e8b
feat(prettier) Get indentation working ( #1322 )
2023-11-15 09:58:35 +08:00
Boshen
be043c37e9
refactor(ast): VariableDeclarationKind::to_string -> as_str ( #1321 )
2023-11-14 15:28:13 +00:00
Boshen
d2b73122c5
refactor(prettier): add a static string ss construction macro ( #1320 )
2023-11-14 15:20:50 +00:00
Dunqing
96753c2efd
feat(prettier): add HardLine if the next line of the VariableDeclartion is a empty line ( #1318 )
2023-11-14 23:04:27 +08:00
Dunqing
ca7e0ab208
fix(prettier): calculate overflow for ObjectPattern ( #1317 )
2023-11-14 22:58:09 +08:00
Boshen
5773af9536
feat(prettier): complete PrettireOptions ( #1319 )
2023-11-14 14:57:19 +00:00
Dunqing
dee24c7092
feat(prettier): implement format function for PropertyKey ( #1311 )
2023-11-14 21:22:30 +08:00
Dunqing
fae2813683
feat(prettier): implement format function for BindingProperty ( #1310 )
2023-11-14 21:16:31 +08:00
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