@putout/printer 18.8.4 → 18.8.5
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
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
} from './has.js';
|
|
9
9
|
|
|
10
10
|
const getMaxPropertiesInOneLine = (a, {maxPropertiesInOneLine}) => maxPropertiesInOneLine;
|
|
11
|
+
const getValue = (a) => a.value;
|
|
11
12
|
|
|
12
13
|
const isMoreCountLessLength = createTypeChecker([
|
|
13
14
|
['-: node.properties.length', '>', getMaxPropertiesInOneLine],
|
|
@@ -67,21 +68,14 @@ function isCoupleAssigns(path) {
|
|
|
67
68
|
if (isFunctionParam(path))
|
|
68
69
|
return false;
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
continue;
|
|
75
|
-
|
|
76
|
-
if (isAssignmentPattern(property.value))
|
|
77
|
-
++assignsCount;
|
|
78
|
-
}
|
|
71
|
+
const properties = path.node.properties
|
|
72
|
+
.filter(isObjectProperty)
|
|
73
|
+
.map(getValue)
|
|
74
|
+
.filter(isAssignmentPattern);
|
|
79
75
|
|
|
80
|
-
return
|
|
76
|
+
return properties.length > 1;
|
|
81
77
|
}
|
|
82
78
|
|
|
83
|
-
const getValue = (a) => a.value;
|
|
84
|
-
|
|
85
79
|
function checkLength(path) {
|
|
86
80
|
const identifiers = path
|
|
87
81
|
.node
|
|
@@ -105,4 +99,3 @@ function hasComputed(path) {
|
|
|
105
99
|
|
|
106
100
|
return false;
|
|
107
101
|
}
|
|
108
|
-
|
package/package.json
CHANGED