Boshen
70c983d4bb
feat(prettier): print rest parameters ( #2370 )
2024-02-09 22:59:28 +08:00
Boshen
9b6c313ebf
fix(prettier): flatten all binary expressions for now ( #2367 )
2024-02-09 21:48:27 +08:00
Boshen
90a834f87b
chore: update snapshot
2024-02-09 21:08:39 +08:00
Dunqing
e4754873ee
fix(prettier): printing value instead of key in BindingProperty ( #2334 )
...
fix : #2314
2024-02-08 21:49:10 +08:00
Dunqing
3268d7d66e
feat(tasks/prettier): add some information for debug no spec calls ( #2333 )
2024-02-07 16:55:59 +08:00
Boshen
e8dc68c525
chore: update prettier to v3.2.5 ( #2332 )
2024-02-06 22:55:43 +08:00
Boshen
d2f7ea2923
chore: manually clone git modules instead of using submodules ( #2274 )
...
closes #2231
Submodules are a blocker for beginners, we should make it clone on
demand.
It is also a blocker for people who wants to target this repo as a crate
for testing purposes, cargo will do a full clone if you specify
oxc_parser = { git = "this repo" } in Cargo.toml
2024-02-02 11:56:18 +00:00
Boshen
a69b76ab77
chore: update snapshots
2024-01-15 21:13:05 +08:00
Valerii Smirnov
c60c31521e
feat(linter): eslint-plugin-import no-named-as-default-member rule ( #1988 )
...
- Docs:
https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default-member.md
- Code:
https://github.com/import-js/eslint-plugin-import/blob/main/src/rules/no-named-as-default-member.js
- Tests:
https://github.com/import-js/eslint-plugin-import/blob/main/tests/src/rules/no-named-as-default-member.js
2024-01-15 11:03:04 +00:00
magic-akari
869643b03b
fix(prettier): Correctly format call expression arguments ( #2018 )
2024-01-13 21:25:26 +08:00
Wenzhe Wang
c49a1f6b32
feat(prettier): add print_binaryish_expressions ( #1664 )
2023-12-13 22:52:53 +08:00
Dunqing
0c19991471
feat(prettier): print CallExpression arguments correctly ( #1631 )
2023-12-10 15:59:13 +08:00
Wenzhe Wang
286644714f
feat(prettier): wrap parameters in indent ( #1633 )
2023-12-06 10:20:31 +08:00
Wenzhe Wang
bb4a2c7930
chore: fix typo ( #1627 )
2023-12-04 21:52:50 +08:00
Wenzhe Wang
cfe207fb53
feat(tasks): ignore some invalid cases and support read parser from source text ( #1616 )
2023-12-03 21:17:47 +08:00
Wenzhe Wang
9af24842a8
fix(tasks): escape more special characters ( #1615 )
...
We also need escape `$` and `\`:
9527e65a38/packages/snapshot/src/port/inlineSnapshot.ts (L78-L94)
2023-12-03 16:56:18 +08:00
Wenzhe Wang
2f90ca1b54
fix(tasks): find the right output to diff ( #1596 )
2023-12-03 15:29:13 +08:00
Cameron
b7b3073f3f
feat(prettier) port should_break_after_operator ( #1606 )
2023-12-02 20:40:25 +08:00
Cameron
502d61dc9f
fix(prettier) fix use chain formatting ( #1605 )
2023-12-02 15:44:25 +08:00
Boshen
811b219b27
feat(prettier): add parens to new class {} ( #1604 )
2023-12-01 21:36:01 +08:00
Boshen
bb61f10399
feat(prettier): handle parens for (x % y) % z ( #1603 )
2023-12-01 21:29:56 +08:00
Boshen
f4f392e19f
feat(prettier): add parens to left of instanceof ( #1602 )
2023-12-01 19:08:45 +08:00
Cameron
66452c95f5
fix(prettier) print computed object property key correctly ( #1599 )
2023-12-01 18:36:38 +08:00
Cameron
0134211b6f
fix(prettier) use print_assignment for ObjectProperty ( #1598 )
2023-12-01 18:32:03 +08:00
Boshen
da87b9b29e
feat(prettier): binaryish expressions with parens ( #1597 )
2023-12-01 13:52:22 +08:00
Boshen
e3c54b92c9
fix(prettier): object pattern in function parameters ( #1595 )
2023-11-30 23:49:24 +08:00
Wenzhe Wang
9f38072002
feat(tasks): add visualize_end_of_line ( #1593 )
2023-11-30 23:42:57 +08:00
Dunqing
39188d00e1
feat(prettier): support arrowParens option ( #1592 )
2023-11-30 17:41:34 +08:00
Boshen
fd6a3ed918
feat(prettier): format for((async) of and for((let) of ( #1586 )
2023-11-29 22:55:42 +08:00
Boshen
1bd1c5b51b
feat(prettier): check parens for (let)[a] = 1 ( #1585 )
2023-11-29 21:57:59 +08:00
Boshen
e6681a8683
feat(prettier_conformance): ignore more stage3 features ( #1584 )
2023-11-29 19:51:41 +08:00
Boshen
c50fcececa
feat(prettier): wrap return statements with parentheses ( #1583 )
2023-11-29 19:31:55 +08:00
Boshen
b8ce6266ad
feat(prettier): handle parens for sequence expression ( #1582 )
2023-11-29 19:15:57 +08:00
Boshen
405d1228a0
feat(prettier): wrap BindingIdentifier ( #1581 )
2023-11-29 19:08:29 +08:00
Boshen
e6f85a9a62
chore(prettier_conformance): remove stage3 export-default-from ( #1580 )
2023-11-29 19:03:26 +08:00
Dunqing
63b9d2cf81
feat(prettier/conformance): print options ( #1579 )
2023-11-29 18:37:38 +08:00
Dunqing
f19032e102
feat(prettier): support quoteProps option in PropertyKey ( #1578 )
2023-11-29 18:32:30 +08:00
Boshen
7236368d5a
feat(prettier): implement is_next_line_empty_after_index ( #1575 )
2023-11-29 14:37:33 +08:00
Boshen
a9f0206805
feat(prettier): print es5 comma for object expression ( #1574 )
2023-11-29 13:36:28 +08:00
Boshen
f7cb7838e5
chore(prettier_conformance): ignore range / cursor tests; ignore module-blocks
2023-11-28 23:30:32 +08:00
Boshen
6ea1bf2f18
Revert "chore(prettier_conformance): temporary disable code coverage"
...
This reverts commit e1266c69f9 .
2023-11-28 17:34:59 +08:00
Boshen
7fca9504d2
chore: update snapshots
2023-11-28 16:27:10 +08:00
Cameron
9a0a6f5004
feat(prettier) further improve class printing ( #1566 )
2023-11-28 10:59:37 +08:00
Cameron
522cf29489
feat(prettier) improve class printing ( #1565 )
2023-11-28 10:54:33 +08:00
Cameron
cc25f7897d
fix(prettier) Fix printing of array expressions ( #1562 )
2023-11-28 10:39:37 +08:00
Cameron
cda0b97ade
feat(prettier) use groupId in fluid assignments ( #1560 )
2023-11-28 10:29:32 +08:00
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
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
Boshen
13cac62402
feat(prettier): print leading comments for all ast nodes ( #1537 )
2023-11-25 00:35:51 +08:00
Boshen
32b19561a8
chore(prettier_conformance): ignore bind-expressions ( #1535 )
2023-11-24 20:26:27 +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
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
78c6fcd1d0
feat(prettier): improve format of ExportDefaultDeclaration ( #1520 )
2023-11-23 21:52:56 +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
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
aa8656df0f
feat(task/prettier-confromance): escape template literal ( #1493 )
2023-11-22 15:30:59 +08:00
Dunqing
f06f0f2078
feat(task/prettier-confromance): ignore tests with non-standard syntax ( #1492 )
2023-11-22 11:01:26 +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
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
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
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
Boshen
27dc1ed1b2
chore(prettier_conformance): ignore more non-es6 syntax ( #1437 )
2023-11-19 23:15:24 +08:00
Boshen
0218ae8641
feat(prettier): print leading comments with newlines ( #1434 )
2023-11-19 22:46:55 +08:00
Boshen
95f1b3beba
chore(prettier_conformance): ignore stage3 and multiparser tests ( #1432 )
2023-11-19 18:47:39 +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
Wenzhe Wang
3c567d6549
task(prettier): add diff view ( #1428 )
2023-11-19 17:13:25 +08:00
Boshen
cc8b8719f7
feat(prettier): format for loop and update expression ( #1427 )
2023-11-19 14:04:47 +08:00
Boshen
902d4d0bab
feat(prettier): format with and if statements ( #1425 )
2023-11-19 11:47:31 +08: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