@putout/printer 18.47.2 → 18.47.3
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
|
@@ -70,6 +70,12 @@ const isBreaklineAfterArg = createTypeChecker([
|
|
|
70
70
|
['+: parentPath.node.arguments.length', '>', 1],
|
|
71
71
|
]);
|
|
72
72
|
|
|
73
|
+
const isCommaAfterArg = createTypeChecker([
|
|
74
|
+
['+', isMaxArgs],
|
|
75
|
+
['-: node.arguments.length', '<=', 1],
|
|
76
|
+
['+', isMultiline],
|
|
77
|
+
]);
|
|
78
|
+
|
|
73
79
|
function printArgs(path, printer, semantics) {
|
|
74
80
|
const args = parseArgs(path);
|
|
75
81
|
const maxArgs = isMaxArgs(path, semantics);
|
|
@@ -94,7 +100,7 @@ function printArgs(path, printer, semantics) {
|
|
|
94
100
|
|
|
95
101
|
print(arg);
|
|
96
102
|
|
|
97
|
-
if (
|
|
103
|
+
if (isCommaAfterArg(path, semantics)) {
|
|
98
104
|
print(',');
|
|
99
105
|
continue;
|
|
100
106
|
}
|
|
@@ -122,3 +128,4 @@ function tooLong(path) {
|
|
|
122
128
|
|
|
123
129
|
return false;
|
|
124
130
|
}
|
|
131
|
+
|
package/package.json
CHANGED