@@ -46,8 +46,19 @@ rules:
46
46
},
47
47
]
48
48
49
+ # https://github.com/benmosher/eslint-plugin-import/pull/334
50
+ ' import/no-duplicates ' : 2
49
51
' import/first ' : 2
50
52
' import/newline-after-import ' : 2
53
+ ' import/order ' :
54
+ [
55
+ 2,
56
+ {
57
+ ' newlines-between ' : ' always' ,
58
+ ' alphabetize ' : { 'order': 'asc' },
59
+ ' groups ' : ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
60
+ },
61
+ ]
51
62
52
63
' sonarjs/cognitive-complexity ' : 0
53
64
' sonarjs/no-duplicate-string ' : 0
@@ -68,12 +79,81 @@ overrides:
68
79
parserOptions :
69
80
project : ./tsconfig.json
70
81
rules :
71
- # eslint will treat TS type as undefined stuff
72
82
' no-undef ' : 0
73
-
74
- # conflict function override
83
+ # TypeScript declare merge
84
+ ' no-redeclare ' : 0
85
+ ' no-useless-constructor ' : 0
86
+ ' no-unused-vars ' : 0
75
87
' no-dupe-class-members ' : 0
88
+ ' no-case-declarations ' : 0
89
+ ' no-duplicate-imports ' : 0
90
+ # TypeScript Interface and Type
91
+ ' no-use-before-define ' : 0
76
92
93
+ ' @typescript-eslint/adjacent-overload-signatures ' : 2
94
+ ' @typescript-eslint/await-thenable ' : 2
95
+ ' @typescript-eslint/consistent-type-assertions ' : 2
96
+ ' @typescript-eslint/ban-types ' :
97
+ [
98
+ ' error' ,
99
+ {
100
+ ' types ' :
101
+ {
102
+ ' String ' : { 'message': 'Use string instead', 'fixWith': 'string' },
103
+ ' Number ' : { 'message': 'Use number instead', 'fixWith': 'number' },
104
+ ' Boolean ' : { 'message': 'Use boolean instead', 'fixWith': 'boolean' },
105
+ ' Function ' : { 'message': 'Use explicit type instead' },
106
+ },
107
+ },
108
+ ]
109
+ ' @typescript-eslint/explicit-member-accessibility ' :
110
+ [
111
+ ' error' ,
112
+ {
113
+ accessibility : ' explicit' ,
114
+ overrides :
115
+ {
116
+ accessors : ' no-public' ,
117
+ constructors : ' no-public' ,
118
+ methods : ' no-public' ,
119
+ properties : ' no-public' ,
120
+ parameterProperties : ' explicit' ,
121
+ },
122
+ },
123
+ ]
124
+ ' @typescript-eslint/method-signature-style ' : 2
125
+ ' @typescript-eslint/no-floating-promises ' : 2
126
+ ' @typescript-eslint/no-implied-eval ' : 2
127
+ ' @typescript-eslint/no-for-in-array ' : 2
128
+ ' @typescript-eslint/no-inferrable-types ' : 2
129
+ ' @typescript-eslint/no-invalid-void-type ' : 2
130
+ ' @typescript-eslint/no-misused-new ' : 2
131
+ ' @typescript-eslint/no-misused-promises ' : 2
132
+ ' @typescript-eslint/no-namespace ' : 2
133
+ ' @typescript-eslint/no-non-null-asserted-optional-chain ' : 2
134
+ ' @typescript-eslint/no-throw-literal ' : 2
135
+ ' @typescript-eslint/no-unnecessary-boolean-literal-compare ' : 2
136
+ ' @typescript-eslint/prefer-for-of ' : 2
137
+ ' @typescript-eslint/prefer-nullish-coalescing ' : 2
138
+ ' @typescript-eslint/switch-exhaustiveness-check ' : 2
139
+ ' @typescript-eslint/prefer-optional-chain ' : 2
140
+ ' @typescript-eslint/prefer-readonly ' : 2
141
+ ' @typescript-eslint/prefer-string-starts-ends-with ' : 0
142
+ ' @typescript-eslint/no-array-constructor ' : 2
143
+ ' @typescript-eslint/require-await ' : 2
144
+ ' @typescript-eslint/return-await ' : 2
145
+ ' @typescript-eslint/ban-ts-comment ' :
146
+ [2, { 'ts-expect-error' : false, 'ts-ignore': true, 'ts-nocheck': true, 'ts-check': false }]
147
+ ' @typescript-eslint/naming-convention ' :
148
+ [
149
+ 2,
150
+ {
151
+ selector : ' memberLike' ,
152
+ format : ['camelCase', 'PascalCase'],
153
+ modifiers : ['private'],
154
+ leadingUnderscore : ' forbid' ,
155
+ },
156
+ ]
77
157
' @typescript-eslint/no-unused-vars ' :
78
158
[2, { varsIgnorePattern : ' ^_' , argsIgnorePattern: '^_', ignoreRestSiblings: true }]
79
159
' @typescript-eslint/member-ordering ' :
0 commit comments