Remove redundant parentheses around SequenceExpression and AssignmentExpression (#18142)

This commit is contained in:
fisker Cheung authored and GitHub committed 2025-12-06 17:10:37 +08:00
1 parent bdab9d8845
commit b6cf29f3d0
8 files changed
+350 -14

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
#### Remove redundant parentheses in "return statement" (#18142 by @fisker)
<!-- prettier-ignore -->
```jsx
// Input
function sequenceExpressionInside() {
return ( // Reason for a
a, b
);
}
// Prettier stable
function sequenceExpressionInside() {
return (
// Reason for a
(a, b)
);
}
// Prettier main
function sequenceExpressionInside() {
return (
// Reason for a
a, b
);
}
```