Skip to content

Commit 682e85c

Browse files
committed
fix(formatter): missing parenthesis for NewExpression whose callee is a TSNonNullExpression with TaggedTemplateExpression
1 parent 4fb5120 commit 682e85c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/oxc_formatter/src/parentheses/expression.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,7 @@ fn member_chain_callee_needs_parens(e: &Expression) -> bool {
765765
std::iter::successors(Some(e), |e| match e {
766766
Expression::ComputedMemberExpression(e) => Some(&e.object),
767767
Expression::StaticMemberExpression(e) => Some(&e.object),
768+
Expression::TaggedTemplateExpression(e) => Some(&e.tag),
768769
Expression::TSNonNullExpression(e) => Some(&e.expression),
769770
_ => None,
770771
})

tasks/prettier_conformance/snapshots/prettier.ts.snap.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ts compatibility: 474/573 (82.72%)
1+
ts compatibility: 475/573 (82.90%)
22

33
# Failed
44

@@ -78,7 +78,6 @@ ts compatibility: 474/573 (82.72%)
7878
| typescript/module/global.ts | 💥 | 75.00% |
7979
| typescript/multiparser-css/issue-6259.ts | 💥 | 57.14% |
8080
| typescript/non-null/optional-chain.ts | 💥 | 72.22% |
81-
| typescript/non-null/parens.ts | 💥 | 96.00% |
8281
| typescript/nosemi/index-signature.ts | 💥 | 75.00% |
8382
| typescript/object-multiline/multiline.ts | 💥✨ | 23.21% |
8483
| typescript/optional-type/complex.ts | 💥 | 0.00% |

0 commit comments

Comments
 (0)