Fix duplicate comments in classes (#1349)
Turns out, you can't blindly print this node. We need a deeper fix but let's revert this fix for now. Fixes #1348master
parent
bc53920734
commit
007cfd9179
|
@ -2119,11 +2119,7 @@ function printMethod(path, options, print) {
|
||||||
group(
|
group(
|
||||||
concat([
|
concat([
|
||||||
path.call(function(valuePath) {
|
path.call(function(valuePath) {
|
||||||
return comments.printComments(
|
return printFunctionParams(valuePath, print, options);
|
||||||
path,
|
|
||||||
p => printFunctionParams(valuePath, print, options),
|
|
||||||
options
|
|
||||||
)
|
|
||||||
}, "value"),
|
}, "value"),
|
||||||
path.call(p => printReturnType(p, print), "value")
|
path.call(p => printReturnType(p, print), "value")
|
||||||
])
|
])
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`class.js 1`] = `
|
||||||
|
class x {
|
||||||
|
/**
|
||||||
|
* Set of default settings to be applied to model fetch calls in DAO layer.
|
||||||
|
*/
|
||||||
|
static get defaultSettings() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
class x {
|
||||||
|
/**
|
||||||
|
* Set of default settings to be applied to model fetch calls in DAO layer.
|
||||||
|
*/
|
||||||
|
static get defaultSettings() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`empty_paren_comment.js 1`] = `
|
exports[`empty_paren_comment.js 1`] = `
|
||||||
let f = (/* ... */) => {}
|
let f = (/* ... */) => {}
|
||||||
(function (/* ... */) {})(/* ... */)
|
(function (/* ... */) {})(/* ... */)
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
class x {
|
||||||
|
/**
|
||||||
|
* Set of default settings to be applied to model fetch calls in DAO layer.
|
||||||
|
*/
|
||||||
|
static get defaultSettings() {
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue