@putout/printer 18.1.3 → 18.1.4
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
|
@@ -160,9 +160,17 @@ const isMoreThenMaxIdentifierLength = (path, {maxElementLengthInOneLine}) => {
|
|
|
160
160
|
return first.name.length > maxElementLengthInOneLine;
|
|
161
161
|
};
|
|
162
162
|
|
|
163
|
+
const hasObjects = (path) => {
|
|
164
|
+
const {elements} = path.node;
|
|
165
|
+
const literals = elements.filter(isObjectExpression);
|
|
166
|
+
|
|
167
|
+
return literals.length;
|
|
168
|
+
};
|
|
169
|
+
|
|
163
170
|
const isMoreThenMaxElementLengthInOneLine = createTypeChecker([
|
|
164
171
|
['-', isEmptyArray],
|
|
165
172
|
['-: -> !', isInsideCall],
|
|
173
|
+
['-', hasObjects],
|
|
166
174
|
['+', isMoreThenMaxLiteralLength],
|
|
167
175
|
['+', isMoreThenMaxIdentifierLength],
|
|
168
176
|
]);
|
package/package.json
CHANGED