mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
feat(prettier): wrap a group in BinaryExpression (#1370)
This commit is contained in:
parent
6ac6d7158f
commit
a8e4c3333c
2 changed files with 8 additions and 6 deletions
|
|
@ -911,11 +911,14 @@ impl<'a> Format<'a> for UnaryExpression<'a> {
|
|||
|
||||
impl<'a> Format<'a> for BinaryExpression<'a> {
|
||||
fn format(&self, p: &mut Prettier<'a>) -> Doc<'a> {
|
||||
binaryish::print_binaryish_expression(
|
||||
group!(
|
||||
p,
|
||||
&BinaryishLeft::Expression(&self.left),
|
||||
BinaryishOperator::BinaryOperator(self.operator),
|
||||
&self.right,
|
||||
binaryish::print_binaryish_expression(
|
||||
p,
|
||||
&BinaryishLeft::Expression(&self.left),
|
||||
BinaryishOperator::BinaryOperator(self.operator),
|
||||
&self.right,
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Compatibility: 14/173 (8.09%)
|
||||
Compatibility: 15/173 (8.67%)
|
||||
|
||||
# Failed
|
||||
|
||||
|
|
@ -82,7 +82,6 @@ Compatibility: 14/173 (8.09%)
|
|||
* import-attributes
|
||||
* import-attributes/bracket-spacing
|
||||
* import-reflection
|
||||
* in
|
||||
* label
|
||||
* last-argument-expansion
|
||||
* line-suffix-boundary
|
||||
|
|
|
|||
Loading…
Reference in a new issue