@@ -52,7 +52,9 @@ module.exports = {
5252 // in SDKs, we should make sure that we are correctly preserving class scope.
5353 '@typescript-eslint/unbound-method' : 'error' ,
5454
55- // Private and protected members of a class should be prefixed with a leading underscore
55+ // Private and protected members of a class should be prefixed with a leading underscore.
56+ // typeLike declarations (class, interface, typeAlias, enum, typeParameter) should be
57+ // PascalCase.
5658 '@typescript-eslint/naming-convention' : [
5759 'error' ,
5860 {
@@ -67,6 +69,10 @@ module.exports = {
6769 format : [ 'camelCase' ] ,
6870 leadingUnderscore : 'require' ,
6971 } ,
72+ {
73+ selector : 'typeLike' ,
74+ format : [ 'PascalCase' ] ,
75+ } ,
7076 ] ,
7177
7278 // Prefer for-of loop over for loop if index is only used to access array
@@ -98,6 +104,10 @@ module.exports = {
98104 // instead of any. This is especially important for methods that expose a public API, as users
99105 // should know exactly what they have to provide to use those methods. Turned off in tests.
100106 '@typescript-eslint/no-unsafe-member-access' : 'error' ,
107+
108+ // Be explicit about class member accessibility (public, private, protected). Turned off
109+ // on tests for ease of use.
110+ '@typescript-eslint/explicit-member-accessibility' : [ 'error' ] ,
101111 } ,
102112 } ,
103113 {
@@ -134,6 +144,7 @@ module.exports = {
134144 'no-unused-expressions' : 'off' ,
135145 '@typescript-eslint/no-unused-expressions' : 'off' ,
136146 '@typescript-eslint/no-unsafe-member-access' : 'off' ,
147+ '@typescript-eslint/explicit-member-accessibility' : 'off' ,
137148 } ,
138149 } ,
139150 {
0 commit comments