File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,9 @@ module.exports = {
104104 // instead of any. This is especially important for methods that expose a public API, as users
105105 // should know exactly what they have to provide to use those methods. Turned off in tests.
106106 '@typescript-eslint/no-unsafe-member-access' : 'error' ,
107+
108+ // Be explicit about class member accessibility (public, private, protected)
109+ '@typescript-eslint/explicit-member-accessibility' : [ 'error' ] ,
107110 } ,
108111 } ,
109112 {
Original file line number Diff line number Diff line change @@ -18,15 +18,15 @@ export class Session implements SessionInterface {
1818 public ipAddress ?: string ;
1919 public init : boolean = true ;
2020
21- constructor ( context ?: Omit < SessionContext , 'started' | 'status' > ) {
21+ public constructor ( context ?: Omit < SessionContext , 'started' | 'status' > ) {
2222 if ( context ) {
2323 this . update ( context ) ;
2424 }
2525 }
2626
2727 /** JSDoc */
2828 // eslint-disable-next-line complexity
29- update ( context : SessionContext = { } ) : void {
29+ public update ( context : SessionContext = { } ) : void {
3030 if ( context . user ) {
3131 if ( context . user . ip_address ) {
3232 this . ipAddress = context . user . ip_address ;
@@ -78,7 +78,7 @@ export class Session implements SessionInterface {
7878 }
7979
8080 /** JSDoc */
81- close ( status ?: Exclude < SessionStatus , SessionStatus . Ok > ) : void {
81+ public close ( status ?: Exclude < SessionStatus , SessionStatus . Ok > ) : void {
8282 if ( status ) {
8383 this . update ( { status } ) ;
8484 } else if ( this . status === SessionStatus . Ok ) {
@@ -89,7 +89,7 @@ export class Session implements SessionInterface {
8989 }
9090
9191 /** JSDoc */
92- toJSON ( ) : {
92+ public toJSON ( ) : {
9393 init : boolean ;
9494 sid : string ;
9595 did ?: string ;
You can’t perform that action at this time.
0 commit comments