prettier 1.5.5 → 2.0.0.pre.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +344 -282
  3. data/CONTRIBUTING.md +8 -11
  4. data/LICENSE +1 -1
  5. data/README.md +30 -12
  6. data/dist/haml/embed.js +53 -0
  7. data/dist/haml/parser.js +31 -0
  8. data/{src → dist}/haml/parser.rb +0 -0
  9. data/dist/haml/printer.js +336 -0
  10. data/dist/parser/getInfo.js +17 -0
  11. data/{src → dist}/parser/netcat.js +1 -0
  12. data/dist/parser/parseSync.js +142 -0
  13. data/dist/parser/server.rb +140 -0
  14. data/dist/plugin.js +143 -0
  15. data/dist/prettier.js +15 -0
  16. data/dist/rbs/parser.js +34 -0
  17. data/{src → dist}/rbs/parser.rb +0 -0
  18. data/dist/rbs/printer.js +517 -0
  19. data/dist/ruby/embed.js +110 -0
  20. data/dist/ruby/nodes/alias.js +59 -0
  21. data/{src → dist}/ruby/nodes/aref.js +26 -35
  22. data/dist/ruby/nodes/args.js +165 -0
  23. data/dist/ruby/nodes/arrays.js +126 -0
  24. data/dist/ruby/nodes/assign.js +41 -0
  25. data/dist/ruby/nodes/blocks.js +68 -0
  26. data/dist/ruby/nodes/calls.js +260 -0
  27. data/dist/ruby/nodes/case.js +50 -0
  28. data/dist/ruby/nodes/class.js +54 -0
  29. data/dist/ruby/nodes/commands.js +124 -0
  30. data/dist/ruby/nodes/conditionals.js +242 -0
  31. data/dist/ruby/nodes/constants.js +38 -0
  32. data/dist/ruby/nodes/flow.js +66 -0
  33. data/dist/ruby/nodes/hashes.js +130 -0
  34. data/dist/ruby/nodes/heredocs.js +30 -0
  35. data/dist/ruby/nodes/hooks.js +35 -0
  36. data/dist/ruby/nodes/ints.js +27 -0
  37. data/dist/ruby/nodes/lambdas.js +69 -0
  38. data/dist/ruby/nodes/loops.js +73 -0
  39. data/dist/ruby/nodes/massign.js +73 -0
  40. data/dist/ruby/nodes/methods.js +70 -0
  41. data/dist/ruby/nodes/operators.js +70 -0
  42. data/dist/ruby/nodes/params.js +89 -0
  43. data/dist/ruby/nodes/patterns.js +109 -0
  44. data/dist/ruby/nodes/regexp.js +45 -0
  45. data/dist/ruby/nodes/rescue.js +82 -0
  46. data/dist/ruby/nodes/return.js +75 -0
  47. data/dist/ruby/nodes/statements.js +111 -0
  48. data/dist/ruby/nodes/strings.js +218 -0
  49. data/dist/ruby/nodes/super.js +30 -0
  50. data/dist/ruby/nodes/undef.js +26 -0
  51. data/dist/ruby/nodes.js +151 -0
  52. data/dist/ruby/parser.js +34 -0
  53. data/{src → dist}/ruby/parser.rb +1274 -288
  54. data/dist/ruby/printer.js +125 -0
  55. data/dist/ruby/toProc.js +93 -0
  56. data/dist/types/haml.js +4 -0
  57. data/dist/types/plugin.js +3 -0
  58. data/dist/types/rbs.js +4 -0
  59. data/dist/types/ruby.js +4 -0
  60. data/dist/types/utils.js +2 -0
  61. data/dist/types.js +30 -0
  62. data/dist/utils/containsAssignment.js +15 -0
  63. data/dist/utils/getTrailingComma.js +6 -0
  64. data/dist/utils/hasAncestor.js +15 -0
  65. data/{src → dist}/utils/inlineEnsureParens.js +16 -16
  66. data/dist/utils/isEmptyBodyStmt.js +10 -0
  67. data/dist/utils/isEmptyStmts.js +10 -0
  68. data/dist/utils/literal.js +8 -0
  69. data/dist/utils/literallineWithoutBreakParent.js +8 -0
  70. data/dist/utils/makeCall.js +13 -0
  71. data/dist/utils/noIndent.js +11 -0
  72. data/dist/utils/printEmptyCollection.js +44 -0
  73. data/dist/utils/skipAssignIndent.js +15 -0
  74. data/dist/utils.js +30 -0
  75. data/node_modules/prettier/bin-prettier.js +13343 -10961
  76. data/node_modules/prettier/doc.js +4829 -0
  77. data/node_modules/prettier/index.js +23988 -22229
  78. data/node_modules/prettier/package.json +23 -0
  79. data/node_modules/prettier/parser-angular.js +60 -40
  80. data/node_modules/prettier/parser-babel.js +22 -1
  81. data/node_modules/prettier/parser-espree.js +22 -1
  82. data/node_modules/prettier/parser-flow.js +22 -1
  83. data/node_modules/prettier/parser-glimmer.js +1 -1
  84. data/node_modules/prettier/parser-graphql.js +1 -1
  85. data/node_modules/prettier/parser-html.js +82 -63
  86. data/node_modules/prettier/parser-markdown.js +24 -9
  87. data/node_modules/prettier/parser-meriyah.js +22 -1
  88. data/node_modules/prettier/parser-postcss.js +22 -1
  89. data/node_modules/prettier/parser-typescript.js +22 -1
  90. data/node_modules/prettier/parser-yaml.js +2 -2
  91. data/node_modules/prettier/third-party.js +1734 -862
  92. data/package.json +27 -19
  93. data/rubocop.yml +9 -0
  94. metadata +77 -77
  95. data/src/haml/embed.js +0 -87
  96. data/src/haml/nodes/comment.js +0 -27
  97. data/src/haml/nodes/doctype.js +0 -34
  98. data/src/haml/nodes/filter.js +0 -16
  99. data/src/haml/nodes/hamlComment.js +0 -21
  100. data/src/haml/nodes/plain.js +0 -6
  101. data/src/haml/nodes/root.js +0 -8
  102. data/src/haml/nodes/script.js +0 -33
  103. data/src/haml/nodes/silentScript.js +0 -59
  104. data/src/haml/nodes/tag.js +0 -232
  105. data/src/haml/parser.js +0 -22
  106. data/src/haml/printer.js +0 -28
  107. data/src/parser/parseSync.js +0 -170
  108. data/src/parser/server.rb +0 -66
  109. data/src/plugin.js +0 -148
  110. data/src/prettier.js +0 -16
  111. data/src/rbs/parser.js +0 -39
  112. data/src/rbs/printer.js +0 -615
  113. data/src/ruby/embed.js +0 -142
  114. data/src/ruby/nodes/alias.js +0 -73
  115. data/src/ruby/nodes/args.js +0 -178
  116. data/src/ruby/nodes/arrays.js +0 -162
  117. data/src/ruby/nodes/assign.js +0 -47
  118. data/src/ruby/nodes/blocks.js +0 -90
  119. data/src/ruby/nodes/calls.js +0 -199
  120. data/src/ruby/nodes/case.js +0 -65
  121. data/src/ruby/nodes/class.js +0 -64
  122. data/src/ruby/nodes/commands.js +0 -131
  123. data/src/ruby/nodes/conditionals.js +0 -280
  124. data/src/ruby/nodes/constants.js +0 -43
  125. data/src/ruby/nodes/flow.js +0 -74
  126. data/src/ruby/nodes/hashes.js +0 -164
  127. data/src/ruby/nodes/heredocs.js +0 -36
  128. data/src/ruby/nodes/hooks.js +0 -34
  129. data/src/ruby/nodes/ints.js +0 -31
  130. data/src/ruby/nodes/lambdas.js +0 -76
  131. data/src/ruby/nodes/loops.js +0 -98
  132. data/src/ruby/nodes/massign.js +0 -98
  133. data/src/ruby/nodes/methods.js +0 -74
  134. data/src/ruby/nodes/operators.js +0 -83
  135. data/src/ruby/nodes/params.js +0 -113
  136. data/src/ruby/nodes/patterns.js +0 -157
  137. data/src/ruby/nodes/regexp.js +0 -56
  138. data/src/ruby/nodes/rescue.js +0 -101
  139. data/src/ruby/nodes/return.js +0 -94
  140. data/src/ruby/nodes/statements.js +0 -142
  141. data/src/ruby/nodes/strings.js +0 -177
  142. data/src/ruby/nodes/super.js +0 -35
  143. data/src/ruby/nodes/undef.js +0 -42
  144. data/src/ruby/nodes.js +0 -34
  145. data/src/ruby/parser.js +0 -39
  146. data/src/ruby/printer.js +0 -138
  147. data/src/ruby/toProc.js +0 -105
  148. data/src/utils/containsAssignment.js +0 -11
  149. data/src/utils/getTrailingComma.js +0 -5
  150. data/src/utils/hasAncestor.js +0 -17
  151. data/src/utils/isEmptyBodyStmt.js +0 -7
  152. data/src/utils/isEmptyStmts.js +0 -11
  153. data/src/utils/literal.js +0 -7
  154. data/src/utils/literallineWithoutBreakParent.js +0 -7
  155. data/src/utils/makeCall.js +0 -14
  156. data/src/utils/noIndent.js +0 -11
  157. data/src/utils/printEmptyCollection.js +0 -49
  158. data/src/utils/skipAssignIndent.js +0 -10
  159. data/src/utils.js +0 -13
@@ -1,199 +0,0 @@
1
- const {
2
- concat,
3
- group,
4
- hardline,
5
- ifBreak,
6
- indent,
7
- softline
8
- } = require("../../prettier");
9
- const { makeCall, noIndent } = require("../../utils");
10
-
11
- const toProc = require("../toProc");
12
-
13
- const chained = ["call", "method_add_arg", "method_add_block"];
14
-
15
- function printCall(path, opts, print) {
16
- const node = path.getValue();
17
- const [receiverNode, _operatorNode, messageNode] = node.body;
18
-
19
- const receiverDoc = path.call(print, "body", 0);
20
- const operatorDoc = makeCall(path, opts, print);
21
-
22
- // You can call lambdas with a special syntax that looks like func.(*args).
23
- // In this case, "call" is returned for the 3rd child node. We don't alter
24
- // call syntax so if `call` is implicit, we don't print it out.
25
- const messageDoc = messageNode === "call" ? "" : path.call(print, "body", 2);
26
-
27
- // For certain left sides of the call nodes, we want to attach directly to
28
- // the } or end.
29
- if (noIndent.includes(receiverNode.type)) {
30
- return concat([receiverDoc, operatorDoc, messageDoc]);
31
- }
32
-
33
- // The right side of the call node, as in everything including the operator
34
- // and beyond.
35
- const rightSideDoc = concat([
36
- receiverNode.comments ? hardline : softline,
37
- operatorDoc,
38
- messageDoc
39
- ]);
40
-
41
- // Get a reference to the parent node so we can check if we're inside a chain
42
- const parentNode = path.getParentNode();
43
-
44
- // If our parent node is a chained node then we're not going to group the
45
- // right side of the expression, as we want to have a nice multi-line layout.
46
- if (chained.includes(parentNode.type) && !node.comments) {
47
- parentNode.chain = (node.chain || 0) + 1;
48
- parentNode.callChain = (node.callChain || 0) + 1;
49
- parentNode.breakDoc = (node.breakDoc || [receiverDoc]).concat(rightSideDoc);
50
- parentNode.firstReceiverType = node.firstReceiverType || receiverNode.type;
51
- }
52
-
53
- // If we're at the top of a chain, then we're going to print out a nice
54
- // multi-line layout if this doesn't break into multiple lines.
55
- if (!chained.includes(parentNode.type) && (node.chain || 0) >= 3) {
56
- return ifBreak(
57
- group(indent(concat(node.breakDoc.concat(rightSideDoc)))),
58
- concat([receiverDoc, group(rightSideDoc)])
59
- );
60
- }
61
-
62
- return group(concat([receiverDoc, group(indent(rightSideDoc))]));
63
- }
64
-
65
- function printMethodAddArg(path, opts, print) {
66
- const node = path.getValue();
67
-
68
- const [methodNode, argNode] = node.body;
69
- const [methodDoc, argsDoc] = path.map(print, "body");
70
-
71
- // You can end up here if you have a method with a ? ending, presumably
72
- // because the parser knows that it cannot be a local variable. You can also
73
- // end up here if you are explicitly using an empty set of parentheses.
74
- if (argsDoc.length === 0) {
75
- // If you're using an explicit set of parentheses on something that looks
76
- // like a constant, then we need to match that in order to maintain valid
77
- // Ruby. For example, you could do something like Foo(), on which we would
78
- // need to keep the parentheses to make it look like a method call.
79
- if (methodNode.type === "fcall" && methodNode.body[0].type === "@const") {
80
- return concat([methodDoc, "()"]);
81
- }
82
-
83
- // If you're using an explicit set parentheses with the special call syntax,
84
- // then we need to explicitly print out an extra set of parentheses. For
85
- // example, if you call something like Foo.new.() (implicitly calling the
86
- // #call method on a new instance of the Foo class), then we have to print
87
- // out those parentheses, otherwise we'll end up with Foo.new.
88
- if (methodNode.type === "call" && methodNode.body[2] === "call") {
89
- return concat([methodDoc, "()"]);
90
- }
91
-
92
- return methodDoc;
93
- }
94
-
95
- // This case will ONLY be hit if we can successfully turn the block into a
96
- // to_proc call. In that case, we just explicitly add the parens around it.
97
- if (argNode.type === "args" && argsDoc.length > 0) {
98
- return concat([methodDoc, "("].concat(argsDoc).concat(")"));
99
- }
100
-
101
- // Get a reference to the parent node so we can check if we're inside a chain
102
- const parentNode = path.getParentNode();
103
-
104
- // If our parent node is a chained node then we're not going to group the
105
- // right side of the expression, as we want to have a nice multi-line layout.
106
- if (chained.includes(parentNode.type) && !node.comments) {
107
- parentNode.chain = (node.chain || 0) + 1;
108
- parentNode.breakDoc = (node.breakDoc || [methodDoc]).concat(argsDoc);
109
- parentNode.firstReceiverType = node.firstReceiverType;
110
- }
111
-
112
- // If we're at the top of a chain, then we're going to print out a nice
113
- // multi-line layout if this doesn't break into multiple lines.
114
- if (!chained.includes(parentNode.type) && (node.chain || 0) >= 3) {
115
- // This is pretty specialized behavior. Basically if we're at the top of a
116
- // chain but we've only had method calls without arguments and now we have
117
- // arguments, then we're effectively trying to call a method with arguments
118
- // that is nested under a bunch of stuff. So we group together to first part
119
- // to make it so just the arguments break. This looks like, for example:
120
- //
121
- // config.action_dispatch.rescue_responses.merge!(
122
- // 'ActiveRecord::ConnectionTimeoutError' => :service_unavailable,
123
- // 'ActiveRecord::QueryCanceled' => :service_unavailable
124
- // )
125
- //
126
- if (node.callChain === node.chain) {
127
- return concat([group(indent(concat(node.breakDoc))), group(argsDoc)]);
128
- }
129
-
130
- return ifBreak(
131
- group(indent(concat(node.breakDoc.concat(argsDoc)))),
132
- concat([methodDoc, argsDoc])
133
- );
134
- }
135
-
136
- return concat([methodDoc, argsDoc]);
137
- }
138
-
139
- function printMethodAddBlock(path, opts, print) {
140
- const node = path.getValue();
141
-
142
- const [callNode, blockNode] = node.body;
143
- const [callDoc, blockDoc] = path.map(print, "body");
144
-
145
- // Don't bother trying to do any kind of fancy toProc transform if the option
146
- // is disabled.
147
- if (opts.rubyToProc) {
148
- const proc = toProc(path, blockNode);
149
-
150
- if (proc && callNode.type === "call") {
151
- return group(
152
- concat([
153
- path.call(print, "body", 0),
154
- "(",
155
- indent(concat([softline, proc])),
156
- concat([softline, ")"])
157
- ])
158
- );
159
- }
160
-
161
- if (proc) {
162
- return path.call(print, "body", 0);
163
- }
164
- }
165
-
166
- // Get a reference to the parent node so we can check if we're inside a chain
167
- const parentNode = path.getParentNode();
168
-
169
- // If our parent node is a chained node then we're not going to group the
170
- // right side of the expression, as we want to have a nice multi-line layout.
171
- if (chained.includes(parentNode.type)) {
172
- parentNode.chain = (node.chain || 0) + 1;
173
- parentNode.breakDoc = (node.breakDoc || [callDoc]).concat(blockDoc);
174
- parentNode.firstReceiverType = node.firstReceiverType;
175
- }
176
-
177
- // If we're at the top of a chain, then we're going to print out a nice
178
- // multi-line layout if this doesn't break into multiple lines.
179
- if (!chained.includes(parentNode.type) && (node.chain || 0) >= 3) {
180
- return ifBreak(
181
- group(indent(concat(node.breakDoc.concat(blockDoc)))),
182
- concat([callDoc, blockDoc])
183
- );
184
- }
185
-
186
- return concat([callDoc, blockDoc]);
187
- }
188
-
189
- function printCallContainer(path, opts, print) {
190
- return path.call(print, "body", 0);
191
- }
192
-
193
- module.exports = {
194
- call: printCall,
195
- fcall: printCallContainer,
196
- method_add_arg: printMethodAddArg,
197
- method_add_block: printMethodAddBlock,
198
- vcall: printCallContainer
199
- };
@@ -1,65 +0,0 @@
1
- const {
2
- align,
3
- concat,
4
- fill,
5
- group,
6
- hardline,
7
- indent,
8
- line
9
- } = require("../../prettier");
10
-
11
- function printCase(path, opts, print) {
12
- const statement = ["case"];
13
-
14
- // You don't need to explicitly have something to test against in a case
15
- // statement (without it it effectively becomes an if/elsif chain).
16
- if (path.getValue().body[0]) {
17
- statement.push(" ", path.call(print, "body", 0));
18
- }
19
-
20
- return concat(
21
- statement.concat([hardline, path.call(print, "body", 1), hardline, "end"])
22
- );
23
- }
24
-
25
- function printWhen(path, opts, print) {
26
- const [_preds, _stmts, addition] = path.getValue().body;
27
-
28
- // The `fill` builder command expects an array of docs alternating with
29
- // line breaks. This is so it can loop through and determine where to break.
30
- const preds = fill(
31
- path.call(print, "body", 0).reduce((accum, pred, index) => {
32
- if (index === 0) {
33
- return [pred];
34
- }
35
-
36
- // Pull off the last element and make it concat with a comma so that
37
- // we can maintain alternating lines and docs.
38
- return accum
39
- .slice(0, -1)
40
- .concat([concat([accum[accum.length - 1], ","]), line, pred]);
41
- }, null)
42
- );
43
-
44
- const stmts = path.call(print, "body", 1);
45
- const parts = [concat(["when ", align("when ".length, preds)])];
46
-
47
- // It's possible in a when to just have empty void statements, in which case
48
- // we would skip adding the body.
49
- if (!stmts.parts.every((part) => !part)) {
50
- parts.push(indent(concat([hardline, stmts])));
51
- }
52
-
53
- // This is the next clause on the case statement, either another `when` or
54
- // an `else` clause.
55
- if (addition) {
56
- parts.push(hardline, path.call(print, "body", 2));
57
- }
58
-
59
- return group(concat(parts));
60
- }
61
-
62
- module.exports = {
63
- case: printCase,
64
- when: printWhen
65
- };
@@ -1,64 +0,0 @@
1
- const { concat, group, hardline, indent } = require("../../prettier");
2
- const { isEmptyBodyStmt } = require("../../utils");
3
-
4
- function printClass(path, opts, print) {
5
- const [_constant, superclass, bodystmt] = path.getValue().body;
6
-
7
- const parts = ["class ", path.call(print, "body", 0)];
8
- if (superclass) {
9
- parts.push(" < ", path.call(print, "body", 1));
10
- }
11
-
12
- const declaration = group(concat(parts));
13
- if (isEmptyBodyStmt(bodystmt)) {
14
- return group(concat([declaration, hardline, "end"]));
15
- }
16
-
17
- return group(
18
- concat([
19
- declaration,
20
- indent(concat([hardline, path.call(print, "body", 2)])),
21
- concat([hardline, "end"])
22
- ])
23
- );
24
- }
25
-
26
- function printModule(path, opts, print) {
27
- const node = path.getValue();
28
- const declaration = group(concat(["module ", path.call(print, "body", 0)]));
29
-
30
- if (isEmptyBodyStmt(node.body[1])) {
31
- return group(concat([declaration, hardline, "end"]));
32
- }
33
-
34
- return group(
35
- concat([
36
- declaration,
37
- indent(concat([hardline, path.call(print, "body", 1)])),
38
- concat([hardline, "end"])
39
- ])
40
- );
41
- }
42
-
43
- function printSClass(path, opts, print) {
44
- const bodystmt = path.getValue().body[1];
45
- const declaration = concat(["class << ", path.call(print, "body", 0)]);
46
-
47
- if (isEmptyBodyStmt(bodystmt)) {
48
- return group(concat([declaration, hardline, "end"]));
49
- }
50
-
51
- return group(
52
- concat([
53
- declaration,
54
- indent(concat([hardline, path.call(print, "body", 1)])),
55
- concat([hardline, "end"])
56
- ])
57
- );
58
- }
59
-
60
- module.exports = {
61
- class: printClass,
62
- module: printModule,
63
- sclass: printSClass
64
- };
@@ -1,131 +0,0 @@
1
- const {
2
- align,
3
- concat,
4
- group,
5
- ifBreak,
6
- indent,
7
- join,
8
- line,
9
- softline
10
- } = require("../../prettier");
11
- const { makeCall } = require("../../utils");
12
-
13
- function docLength(doc) {
14
- if (doc.length) {
15
- return doc.length;
16
- }
17
-
18
- if (doc.parts) {
19
- return doc.parts.reduce((sum, child) => sum + docLength(child), 0);
20
- }
21
-
22
- if (doc.contents) {
23
- return docLength(doc.contents);
24
- }
25
-
26
- return 0;
27
- }
28
-
29
- function hasDef(node) {
30
- return (
31
- node.body[1].type === "args_add_block" &&
32
- node.body[1].body[0].type === "args" &&
33
- node.body[1].body[0].body[0] &&
34
- ["def", "defs"].includes(node.body[1].body[0].body[0].type)
35
- );
36
- }
37
-
38
- // Very special handling case for rspec matchers. In general with rspec matchers
39
- // you expect to see something like:
40
- //
41
- // expect(foo).to receive(:bar).with(
42
- // 'one',
43
- // 'two',
44
- // 'three',
45
- // 'four',
46
- // 'five'
47
- // )
48
- //
49
- // In this case the arguments are aligned to the left side as opposed to being
50
- // aligned with the `receive` call.
51
- function skipArgsAlign(path) {
52
- return ["to", "not_to"].includes(path.getValue().body[2].body);
53
- }
54
-
55
- // If there is a ternary argument to a command and it's going to get broken
56
- // into multiple lines, then we're going to have to use parentheses around the
57
- // command in order to make sure operator precedence doesn't get messed up.
58
- function hasTernaryArg(node) {
59
- return node.body[0].body.some((child) => child.type === "ifop");
60
- }
61
-
62
- function printCommand(path, opts, print) {
63
- const node = path.getValue();
64
-
65
- const command = path.call(print, "body", 0);
66
- const joinedArgs = join(concat([",", line]), path.call(print, "body", 1));
67
-
68
- const hasTernary = hasTernaryArg(node.body[1]);
69
- let breakArgs;
70
-
71
- if (hasTernary) {
72
- breakArgs = indent(concat([softline, joinedArgs]));
73
- } else if (hasDef(path.getValue())) {
74
- breakArgs = joinedArgs;
75
- } else {
76
- breakArgs = align(docLength(command) + 1, joinedArgs);
77
- }
78
-
79
- return group(
80
- ifBreak(
81
- concat([
82
- command,
83
- hasTernary ? "(" : " ",
84
- breakArgs,
85
- hasTernary ? concat([softline, ")"]) : ""
86
- ]),
87
- concat([command, " ", joinedArgs])
88
- )
89
- );
90
- }
91
-
92
- function printCommandCall(path, opts, print) {
93
- const node = path.getValue();
94
- const parts = [
95
- path.call(print, "body", 0),
96
- makeCall(path, opts, print),
97
- path.call(print, "body", 2)
98
- ];
99
-
100
- if (!node.body[3]) {
101
- return concat(parts);
102
- }
103
-
104
- const argDocs = join(concat([",", line]), path.call(print, "body", 3));
105
- let breakDoc;
106
-
107
- if (hasTernaryArg(node.body[3])) {
108
- breakDoc = parts.concat(
109
- "(",
110
- indent(concat([softline, argDocs])),
111
- softline,
112
- ")"
113
- );
114
- parts.push(" ");
115
- } else if (skipArgsAlign(path)) {
116
- parts.push(" ");
117
- breakDoc = parts.concat(argDocs);
118
- } else {
119
- parts.push(" ");
120
- breakDoc = parts.concat(align(docLength(concat(parts)), argDocs));
121
- }
122
-
123
- const joinedDoc = parts.concat(argDocs);
124
-
125
- return group(ifBreak(concat(breakDoc), concat(joinedDoc)));
126
- }
127
-
128
- module.exports = {
129
- command: printCommand,
130
- command_call: printCommandCall
131
- };