Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Jan 23, 2025
1 parent 40cfbbb commit 070c313
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions crates/oxc_prettier/src/needs_parens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use oxc_ast::{
ast::{
match_member_expression, AssignmentTarget, ChainElement, ExportDefaultDeclarationKind,
Expression, ForStatementInit, ForStatementLeft, MemberExpression,
ObjectExpression, SimpleAssignmentTarget,
Expression, ForStatementInit, ForStatementLeft, MemberExpression, ObjectExpression,
SimpleAssignmentTarget,
},
AstKind,
};
Expand Down Expand Up @@ -493,10 +493,7 @@ impl<'a> Prettier<'a> {

fn should_wrap_function_for_export_default(&mut self) -> bool {
let kind = self.current_kind();
let b = matches!(
self.parent_kind(),
AstKind::ExportDefaultDeclaration(_)
);
let b = matches!(self.parent_kind(), AstKind::ExportDefaultDeclaration(_));
if matches!(kind, AstKind::Function(f) if f.is_expression())
|| matches!(kind, AstKind::Class(c) if c.is_expression())
{
Expand Down

0 comments on commit 070c313

Please sign in to comment.