-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: preserve comments for class members (#117)
- Loading branch information
Showing
4 changed files
with
86 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/plugin/__test__/fixtures/comments/preserve-for-class-members.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import SAPClass from "sap/SAPClass"; | ||
|
||
const Formatter = Formatter; | ||
const mdata = {}; | ||
|
||
/** | ||
* @name test.fixtures.classes.MyClass | ||
*/ | ||
export default class MyClass extends SAPClass { | ||
// some comment | ||
myNumber = 1; | ||
|
||
/** | ||
* block comment | ||
*/ | ||
static myOtherNumber = 42; | ||
|
||
// this is MY method | ||
myMethod() { } | ||
|
||
/** | ||
* this is also my method | ||
*/ | ||
myOtherMethod() { } | ||
|
||
// this property is not moved into the constructor | ||
overrides = {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters