Don't indent + in object value (#2227)

This is a "regression" from when we started using the same heuristic for `=` and `:`

Fixes #2129
master
Christopher Chedeau 2017-06-21 15:58:12 -07:00 committed by GitHub
parent c36dd48339
commit ec1b672bbf
2 changed files with 5 additions and 3 deletions

View File

@ -304,7 +304,9 @@ function genericPrintNoParens(path, options, print, args) {
(parent.type === "JSXExpressionContainer" &&
parentParent.type === "JSXAttribute") ||
(n === parent.body && parent.type === "ArrowFunctionExpression") ||
(n !== parent.body && parent.type === "ForStatement")
(n !== parent.body && parent.type === "ForStatement") ||
parent.type === "ObjectProperty" ||
parent.type === "Property"
) {
return group(concat(parts));
}

View File

@ -106,8 +106,8 @@ const blablah =
const k = {
blablah:
"aldkfkladfskladklsfkladklfkaldfadfkdaf" +
"adlfasdklfkldsklfakldsfkladsfkadsfladsfa" +
"dflkadfkladsfklkadlfkladlfkadklfjadlfdfdaf"
"adlfasdklfkldsklfakldsfkladsfkadsfladsfa" +
"dflkadfkladsfklkadlfkladlfkadklfjadlfdfdaf"
};
somethingThatsAReallyLongPropName =