diff --git a/crates/oxc_prettier/src/lib.rs b/crates/oxc_prettier/src/lib.rs index aa76358ab435e..fee1ed2a6be95 100644 --- a/crates/oxc_prettier/src/lib.rs +++ b/crates/oxc_prettier/src/lib.rs @@ -8,7 +8,7 @@ mod comment; mod doc; mod format; mod macros; -mod need_parens; +mod needs_parens; mod options; mod printer; diff --git a/crates/oxc_prettier/src/need_parens.rs b/crates/oxc_prettier/src/needs_parens.rs similarity index 99% rename from crates/oxc_prettier/src/need_parens.rs rename to crates/oxc_prettier/src/needs_parens.rs index c8cfeada81fb4..f47931d361c02 100644 --- a/crates/oxc_prettier/src/need_parens.rs +++ b/crates/oxc_prettier/src/needs_parens.rs @@ -76,7 +76,7 @@ impl<'a> Prettier<'a> { AssignmentTargetPattern::ObjectAssignmentTarget(_) ) ), - _ => false, + _ => true, }, AstKind::UpdateExpression(update_expr) => match parent_kind { AstKind::UnaryExpression(unary_expr) => { diff --git a/tasks/prettier_conformance/prettier.snap.md b/tasks/prettier_conformance/prettier.snap.md index 9a37773642442..b9447e7ca6413 100644 --- a/tasks/prettier_conformance/prettier.snap.md +++ b/tasks/prettier_conformance/prettier.snap.md @@ -1,4 +1,4 @@ -Compatibility: 141/597 (23.62%) +Compatibility: 142/597 (23.79%) # Failed @@ -407,9 +407,6 @@ Compatibility: 141/597 (23.62%) ### line-suffix-boundary * line-suffix-boundary/boundary.js -### logical-assignment -* logical-assignment/logical-assignment.js - ### logical_expressions * logical_expressions/issue-7024.js * logical_expressions/logical_expression_operators.js