Remove parens from chained assignments (#967)
parent
344401c038
commit
d034564481
|
@ -424,6 +424,8 @@ FPp.needsParens = function(assumeExpressionContext) {
|
|||
return false;
|
||||
} else if (parent.type === "ExpressionStatement") {
|
||||
return node.left.type === "ObjectPattern";
|
||||
} else if (parent.type === "AssignmentExpression") {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`assignment_expression.js 1`] = `
|
||||
"this.size = this._origin = this._capacity = 0;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
this.size = this._origin = this._capacity = 0;
|
||||
"
|
||||
`;
|
|
@ -0,0 +1 @@
|
|||
this.size = this._origin = this._capacity = 0;
|
|
@ -0,0 +1 @@
|
|||
run_spec(__dirname);
|
Loading…
Reference in New Issue