parent
36bec87d17
commit
9a5b447c7f
|
@ -2827,7 +2827,13 @@ function printMemberChain(path, options, print) {
|
|||
return group(expanded);
|
||||
}
|
||||
|
||||
return conditionalGroup([oneLine, expanded]);
|
||||
return concat([
|
||||
// We only need to check `oneLine` because if `expanded` is chosen
|
||||
// that means that the parent group has already been broken
|
||||
// naturally
|
||||
willBreak(oneLine) ? breakParent : "",
|
||||
conditionalGroup([oneLine, expanded])
|
||||
])
|
||||
}
|
||||
|
||||
function isEmptyJSXElement(node) {
|
||||
|
|
|
@ -2,9 +2,51 @@
|
|||
|
||||
exports[`expand.js 1`] = `
|
||||
"const veryVeryVeryVeryVeryVeryVeryLong = doc.expandedStates[doc.expandedStates.length - 1];
|
||||
const small = doc.expandedStates[doc.expandedStates.length - 1];~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const small = doc.expandedStates[doc.expandedStates.length - 1];
|
||||
|
||||
const promises = [
|
||||
promise.resolve().then(console.log).catch(err => {
|
||||
console.log(err)
|
||||
return null
|
||||
}),
|
||||
redis.fetch(),
|
||||
other.fetch(),
|
||||
];
|
||||
|
||||
const promises = [
|
||||
promise.resolve().veryLongFunctionCall().veryLongFunctionCall().then(console.log).catch(err => {
|
||||
console.log(err)
|
||||
return null
|
||||
}),
|
||||
redis.fetch(),
|
||||
other.fetch(),
|
||||
];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const veryVeryVeryVeryVeryVeryVeryLong =
|
||||
doc.expandedStates[doc.expandedStates.length - 1];
|
||||
const small = doc.expandedStates[doc.expandedStates.length - 1];
|
||||
|
||||
const promises = [
|
||||
promise.resolve().then(console.log).catch(err => {
|
||||
console.log(err);
|
||||
return null;
|
||||
}),
|
||||
redis.fetch(),
|
||||
other.fetch()
|
||||
];
|
||||
|
||||
const promises = [
|
||||
promise
|
||||
.resolve()
|
||||
.veryLongFunctionCall()
|
||||
.veryLongFunctionCall()
|
||||
.then(console.log)
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
return null;
|
||||
}),
|
||||
redis.fetch(),
|
||||
other.fetch()
|
||||
];
|
||||
"
|
||||
`;
|
||||
|
|
|
@ -1,2 +1,20 @@
|
|||
const veryVeryVeryVeryVeryVeryVeryLong = doc.expandedStates[doc.expandedStates.length - 1];
|
||||
const small = doc.expandedStates[doc.expandedStates.length - 1];
|
||||
const small = doc.expandedStates[doc.expandedStates.length - 1];
|
||||
|
||||
const promises = [
|
||||
promise.resolve().then(console.log).catch(err => {
|
||||
console.log(err)
|
||||
return null
|
||||
}),
|
||||
redis.fetch(),
|
||||
other.fetch(),
|
||||
];
|
||||
|
||||
const promises = [
|
||||
promise.resolve().veryLongFunctionCall().veryLongFunctionCall().then(console.log).catch(err => {
|
||||
console.log(err)
|
||||
return null
|
||||
}),
|
||||
redis.fetch(),
|
||||
other.fetch(),
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue