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

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

Fixes #2129
This commit is contained in:
Christopher Chedeau authored and GitHub committed 2017-06-21 15:58:12 -07:00
1 parent c36dd48339
commit ec1b672bbf
2 files changed
+5 -3

No files matched your search

+3 -1
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));
}
@@ -106,8 +106,8 @@ const blablah =
const k = {
blablah:
"aldkfkladfskladklsfkladklfkaldfadfkdaf" +
"adlfasdklfkldsklfakldsfkladsfkadsfladsfa" +
"dflkadfkladsfklkadlfkladlfkadklfjadlfdfdaf"
"adlfasdklfkldsklfakldsfkladsfkadsfladsfa" +
"dflkadfkladsfklkadlfkladlfkadklfjadlfdfdaf"
};
somethingThatsAReallyLongPropName =