We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb9b82e commit 4949f15Copy full SHA for 4949f15
packages/shared/babel-ast-utils/src/generator.js
@@ -274,7 +274,7 @@ for (let key in generator) {
274
// These are printed by astring itself
275
if (node.trailingComments) {
276
for (let c of node.trailingComments) {
277
- if (c.type === 'CommentLine') {
+ if (c.type === 'CommentLine' || c.type === 'LineComment') {
278
c.type = 'LineComment';
279
} else {
280
c.type = 'BlockComment';
packages/shared/babel-ast-utils/test/fixtures/class.js
@@ -7,6 +7,7 @@ class C extends A {
7
get property() {
8
return this._property;
9
}
10
+ // /* foo */
11
set property(value) {
12
this._property = value;
13
0 commit comments