mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
feat(prettier): print parameters in ArrowExpression (#1400)
This commit is contained in:
parent
7951849ec1
commit
b251c10b09
2 changed files with 5 additions and 6 deletions
|
|
@ -9,7 +9,10 @@ pub(super) fn print_arrow_function<'a>(
|
|||
) -> Doc<'a> {
|
||||
let mut parts = p.vec();
|
||||
|
||||
parts.push(ss!("() => "));
|
||||
let parameters = expr.params.format(p);
|
||||
parts.push(parameters);
|
||||
parts.push(ss!(" => "));
|
||||
|
||||
if expr.expression {
|
||||
let stmt = &expr.body.statements[0];
|
||||
match stmt {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Compatibility: 90/881 (10.22%)
|
||||
Compatibility: 92/881 (10.44%)
|
||||
|
||||
# Failed
|
||||
|
||||
|
|
@ -180,7 +180,6 @@ Compatibility: 90/881 (10.22%)
|
|||
* break-calls/break.js
|
||||
* break-calls/parent.js
|
||||
* break-calls/react.js
|
||||
* break-calls/reduce.js
|
||||
|
||||
### call/first-argument-expansion
|
||||
* call/first-argument-expansion/expression-2nd-arg.js
|
||||
|
|
@ -440,9 +439,6 @@ Compatibility: 90/881 (10.22%)
|
|||
* do/call-arguments.js
|
||||
* do/do.js
|
||||
|
||||
### dynamic-import
|
||||
* dynamic-import/test.js
|
||||
|
||||
### empty-paren-comment
|
||||
* empty-paren-comment/class-property.js
|
||||
* empty-paren-comment/class.js
|
||||
|
|
|
|||
Loading…
Reference in a new issue