-
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: copyright comment must be appended as leading comment to file (#108
- Loading branch information
1 parent
744a183
commit 8194671
Showing
13 changed files
with
400 additions
and
10 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
6 changes: 6 additions & 0 deletions
6
packages/plugin/__test__/fixtures/classic/sap-ui-define-copyright-file.ts
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,6 @@ | ||
/*! | ||
* ${copyright} | ||
*/ | ||
|
||
// define class | ||
sap.ui.define("", ["foo/bar/MyResource"]); |
13 changes: 13 additions & 0 deletions
13
packages/plugin/__test__/fixtures/comments/copyright-file.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,13 @@ | ||
/*! | ||
* ${copyright} | ||
*/ | ||
|
||
// some imports | ||
import SAPClass, { Levels } from "sap/SAPClass"; | ||
|
||
/** | ||
* @name test.fixtures.libs.MyClass | ||
*/ | ||
export default class MyClass extends SAPClass { | ||
static Levels = Levels; | ||
} |
20 changes: 20 additions & 0 deletions
20
packages/plugin/__test__/fixtures/typescript-preset-env/ts-class-anonymous-copyright-file.ts
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,20 @@ | ||
/*! | ||
* ${copyright} | ||
*/ | ||
|
||
// some imports | ||
import SAPClass from "sap/Class"; | ||
import IClipboardContent from "sap/IClipboardContent"; | ||
|
||
/** | ||
* @name MyClass | ||
*/ | ||
export default class MyClass extends SAPClass { | ||
createAnonymousClass() { | ||
return new (class implements IClipboardContent { | ||
getClipboardContentType() { | ||
/* ... */ | ||
} | ||
})(); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
packages/plugin/__test__/fixtures/typescript-preset-env/ts-class-anonymous-copyright.ts
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,18 @@ | ||
/*! | ||
* ${copyright} | ||
*/ | ||
import SAPClass from "sap/Class"; | ||
import IClipboardContent from "sap/IClipboardContent"; | ||
|
||
/** | ||
* @name MyClass | ||
*/ | ||
export default class MyClass extends SAPClass { | ||
createAnonymousClass() { | ||
return new (class implements IClipboardContent { | ||
getClipboardContentType() { | ||
/* ... */ | ||
} | ||
})(); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/plugin/__test__/fixtures/typescript-preset-env/ts-class-anonymous.ts
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,15 @@ | ||
import SAPClass from "sap/Class"; | ||
import IClipboardContent from "sap/IClipboardContent"; | ||
|
||
/** | ||
* @name MyClass | ||
*/ | ||
export default class MyClass extends SAPClass { | ||
createAnonymousClass() { | ||
return new (class implements IClipboardContent { | ||
getClipboardContentType() { | ||
/* ... */ | ||
} | ||
})(); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...ges/plugin/__test__/fixtures/typescript-preset-env/ts-class-param-props-copyright-file.ts
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,20 @@ | ||
/*! | ||
* ${copyright} | ||
*/ | ||
|
||
// some imports | ||
import SAPClass from "sap/Class"; | ||
import SAPBar from "sap/Bar"; | ||
import SAPFoo from "sap/Foo"; | ||
|
||
/** | ||
* @name MyClass | ||
*/ | ||
export default class MyClass extends SAPClass { | ||
foo: SAPFoo; | ||
|
||
constructor(public bar: SAPBar, private x: string, readonly y: string) { | ||
super(); | ||
this.foo = bar.getFoo(); | ||
} | ||
} |
Oops, something went wrong.