Commit graph

1854 commits

Author SHA1 Message Date
Cameron
6d0e647c13
feat(prettier) print TS literals (#1380) 2023-11-17 21:23:27 +08:00
Boshen
7e9adeb222
ci: fix labeler 2023-11-17 21:19:14 +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
Dunqing
badf6f51cf
feat(task/prettier-conformance): splitting test cases by file (#1373) 2023-11-17 20:14:00 +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
a0a61df71f
chore: format README.md 2023-11-17 13:51:31 +08:00
Boshen
e68212abc8
chore(README): fix biome license link 2023-11-17 13:50:18 +08:00
Boshen
3bfe05ec7c
chore(resolver): remove tracing_subscriber (#1362)
this is no longer required for rspack
2023-11-17 13:34:54 +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
128406a8ab
Rust v1.74.0 (#1357) 2023-11-16 15:21:45 +00: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
Dunqing
a099d06866
fix(tasks/prettier-conformance): incorrect snapshot (#1352)
fix(tasks/prettier-conformance): incorrect snapshot

fix: lint
2023-11-16 20:43:32 +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
526db66984
ci: make tests less verbose, printing takes time too 2023-11-16 18:33:11 +08:00
Shannon Rothe
735beb7fab
feat(playground): add prettier formatting + IR (#1349)
- [x] add Prettier format button which takes source text and updates
view with formatted source text
- [ ] add button to show Prettier IR
2023-11-16 09:33:37 +00:00
Boshen
c1c2a01135
ci: no need to build tests on PR branches (#1348) 2023-11-16 17:32:10 +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
Dunqing
638bd1ce23
feat(tasks/prettier-conformance): allow specifying filter as specific files (#1343)
This is useful in directories with a large number of files, so that we only need to focus on the file we are debugging.
2023-11-16 15:56:47 +08:00
Boshen
9780621925
chore: run fmt 2023-11-16 13:36:42 +08:00
Boshen
73d6d40778
rust: do not compile libs and bins that do not have tests (#1342) 2023-11-16 13:35:24 +08:00
Boshen
767744afc1
ci: remove cargo nextest because cargo test is now faster (#1341) 2023-11-16 13:31:51 +08:00
Boshen
e8b6e32b7c
ci: disable prettier tests 2023-11-16 12:41:29 +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