@putout/printer 2.29.0 → 2.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ChangeLog
CHANGED
|
@@ -84,7 +84,7 @@ module.exports.isNewlineBetweenElements = (path, {elements, maxElementsInOneLine
|
|
|
84
84
|
if (isTwoStringsDifferentLength(elements))
|
|
85
85
|
return ONE_LINE;
|
|
86
86
|
|
|
87
|
-
if (
|
|
87
|
+
if (isTwoSimplesInsideObjectProperty(path))
|
|
88
88
|
return ONE_LINE;
|
|
89
89
|
|
|
90
90
|
if (isStringAndArray(elements))
|
|
@@ -131,7 +131,7 @@ const isShortTwoSimplesInsideCall = (path, short) => {
|
|
|
131
131
|
return length < short;
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
-
const
|
|
134
|
+
const isTwoSimplesInsideObjectProperty = (path) => {
|
|
135
135
|
const {node, parentPath} = path;
|
|
136
136
|
|
|
137
137
|
const {elements} = node;
|
|
@@ -147,14 +147,9 @@ const isShortTwoSimplesInsideObjectProperty = (path, short) => {
|
|
|
147
147
|
if (!isStringLiteral(a) || !isStringLiteral(b))
|
|
148
148
|
return false;
|
|
149
149
|
|
|
150
|
-
|
|
151
|
-
return false;
|
|
152
|
-
|
|
153
|
-
return length < short;
|
|
150
|
+
return !isCoupleLines(path);
|
|
154
151
|
};
|
|
155
152
|
|
|
156
|
-
const looksLikeTuple = (a, b) => b.value.length + 5 <= a.value.length * 2;
|
|
157
|
-
|
|
158
153
|
function isOneSimple(path) {
|
|
159
154
|
const elements = path.get('elements');
|
|
160
155
|
|
package/package.json
CHANGED