Skip to content

Commit b1279ee

Browse files
kittenJoviDeCroock
authored andcommitted
Apply lints
1 parent 08f43d4 commit b1279ee

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/printer.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@ let LF = '\n';
5050
function Arguments(length: number, node: readonly ArgumentNode[]): string {
5151
const args = mapJoin(node, ', ', nodes.Argument);
5252
if (length + args.length + 2 > MAX_LINE_LENGTH) {
53-
return '(' +
54-
(LF += ' ') +
55-
mapJoin(node, LF, nodes.Argument) +
56-
(LF = LF.slice(0, -2)) +
57-
')';
53+
return '(' + (LF += ' ') + mapJoin(node, LF, nodes.Argument) + (LF = LF.slice(0, -2)) + ')';
5854
} else {
5955
return '(' + args + ')';
6056
}
@@ -90,8 +86,7 @@ const nodes = {
9086
},
9187
Field(node: FieldNode): string {
9288
let out = node.alias ? node.alias.value + ': ' + node.name.value : node.name.value;
93-
if (node.arguments && node.arguments.length)
94-
out += Arguments(out.length, node.arguments);
89+
if (node.arguments && node.arguments.length) out += Arguments(out.length, node.arguments);
9590
if (node.directives && node.directives.length)
9691
out += ' ' + mapJoin(node.directives, ' ', nodes.Directive);
9792
if (node.selectionSet && node.selectionSet.selections.length) {
@@ -148,8 +143,7 @@ const nodes = {
148143
},
149144
FragmentSpread(node: FragmentSpreadNode): string {
150145
let out = '...' + node.name.value;
151-
if (node.arguments && node.arguments.length)
152-
out += Arguments(out.length, node.arguments);
146+
if (node.arguments && node.arguments.length) out += Arguments(out.length, node.arguments);
153147
if (node.directives && node.directives.length)
154148
out += ' ' + mapJoin(node.directives, ' ', nodes.Directive);
155149
return out;

0 commit comments

Comments
 (0)