Support trailing commas for function calls (#2257)
parent
cc85769231
commit
6663bab8a3
|
@ -41,6 +41,7 @@ function genericPrint(path, options, print) {
|
||||||
)
|
)
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
|
options.trailingComma === "none" ? "" : ifBreak(","),
|
||||||
softline,
|
softline,
|
||||||
")"
|
")"
|
||||||
])
|
])
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`trailing.graphql 1`] = `
|
exports[`trailing.graphql 1`] = `
|
||||||
fragment Visit on HighlightedVisit
|
query CityGuidesSocialUnitRendererQuery(
|
||||||
@argumentDefinitions(
|
$pageID: ID!
|
||||||
|
$scale: Float
|
||||||
|
$SOCIAL_UNIT_PROFILE_PICTURE_SIZE: Int
|
||||||
|
$SOCIAL_UNIT_CARD_SIZE: Int
|
||||||
|
) @argumentDefinitions(
|
||||||
count: {type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}
|
count: {type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}
|
||||||
test: [{type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}]
|
test: [{type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}]
|
||||||
) {
|
) {
|
||||||
|
@ -18,7 +22,12 @@ fragment Visit on HighlightedVisit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
fragment Visit on HighlightedVisit
|
query CityGuidesSocialUnitRendererQuery(
|
||||||
|
$pageID: ID!,
|
||||||
|
$scale: Float,
|
||||||
|
$SOCIAL_UNIT_PROFILE_PICTURE_SIZE: Int,
|
||||||
|
$SOCIAL_UNIT_CARD_SIZE: Int
|
||||||
|
)
|
||||||
@argumentDefinitions(
|
@argumentDefinitions(
|
||||||
count: {
|
count: {
|
||||||
type: "Int",
|
type: "Int",
|
||||||
|
@ -43,8 +52,12 @@ fragment Visit on HighlightedVisit
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`trailing.graphql 2`] = `
|
exports[`trailing.graphql 2`] = `
|
||||||
fragment Visit on HighlightedVisit
|
query CityGuidesSocialUnitRendererQuery(
|
||||||
@argumentDefinitions(
|
$pageID: ID!
|
||||||
|
$scale: Float
|
||||||
|
$SOCIAL_UNIT_PROFILE_PICTURE_SIZE: Int
|
||||||
|
$SOCIAL_UNIT_CARD_SIZE: Int
|
||||||
|
) @argumentDefinitions(
|
||||||
count: {type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}
|
count: {type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}
|
||||||
test: [{type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}]
|
test: [{type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}]
|
||||||
) {
|
) {
|
||||||
|
@ -60,7 +73,12 @@ fragment Visit on HighlightedVisit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
fragment Visit on HighlightedVisit
|
query CityGuidesSocialUnitRendererQuery(
|
||||||
|
$pageID: ID!,
|
||||||
|
$scale: Float,
|
||||||
|
$SOCIAL_UNIT_PROFILE_PICTURE_SIZE: Int,
|
||||||
|
$SOCIAL_UNIT_CARD_SIZE: Int,
|
||||||
|
)
|
||||||
@argumentDefinitions(
|
@argumentDefinitions(
|
||||||
count: {
|
count: {
|
||||||
type: "Int",
|
type: "Int",
|
||||||
|
@ -85,8 +103,12 @@ fragment Visit on HighlightedVisit
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`trailing.graphql 3`] = `
|
exports[`trailing.graphql 3`] = `
|
||||||
fragment Visit on HighlightedVisit
|
query CityGuidesSocialUnitRendererQuery(
|
||||||
@argumentDefinitions(
|
$pageID: ID!
|
||||||
|
$scale: Float
|
||||||
|
$SOCIAL_UNIT_PROFILE_PICTURE_SIZE: Int
|
||||||
|
$SOCIAL_UNIT_CARD_SIZE: Int
|
||||||
|
) @argumentDefinitions(
|
||||||
count: {type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}
|
count: {type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}
|
||||||
test: [{type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}]
|
test: [{type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}]
|
||||||
) {
|
) {
|
||||||
|
@ -102,7 +124,12 @@ fragment Visit on HighlightedVisit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
fragment Visit on HighlightedVisit
|
query CityGuidesSocialUnitRendererQuery(
|
||||||
|
$pageID: ID!,
|
||||||
|
$scale: Float,
|
||||||
|
$SOCIAL_UNIT_PROFILE_PICTURE_SIZE: Int,
|
||||||
|
$SOCIAL_UNIT_CARD_SIZE: Int,
|
||||||
|
)
|
||||||
@argumentDefinitions(
|
@argumentDefinitions(
|
||||||
count: {
|
count: {
|
||||||
type: "Int",
|
type: "Int",
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
fragment Visit on HighlightedVisit
|
query CityGuidesSocialUnitRendererQuery(
|
||||||
@argumentDefinitions(
|
$pageID: ID!
|
||||||
|
$scale: Float
|
||||||
|
$SOCIAL_UNIT_PROFILE_PICTURE_SIZE: Int
|
||||||
|
$SOCIAL_UNIT_CARD_SIZE: Int
|
||||||
|
) @argumentDefinitions(
|
||||||
count: {type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}
|
count: {type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}
|
||||||
test: [{type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}]
|
test: [{type: "Int", defaultValue: 20, someSuperSuperSuperSuperLongType: 301}]
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in New Issue