-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a9b0ff
commit 78b5eba
Showing
3 changed files
with
30 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class Example { | ||
constructor() { | ||
console.log(); | ||
} | ||
// there should be a line between class members | ||
method() { | ||
console.log(); | ||
} | ||
} | ||
|
||
console.log((new Example()).theAnswer); |
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,16 @@ | ||
class Example { | ||
constructor() { | ||
console.log(); | ||
} | ||
|
||
// no line between one-line class members is OK | ||
get theAnswer() { return 42; } | ||
get message() { return 'hi'; } | ||
|
||
// method() is unused but sadly the linter doesn't catch it yet | ||
method() { | ||
console.log(); | ||
} | ||
} | ||
|
||
console.log((new Example()).theAnswer); |