@@ -147,6 +147,100 @@ module.exports = {
147147 ] ,
148148 '@typescript-eslint/no-this-alias' : 'off' ,
149149
150+ // Prefer simple property access and declaration without quotes
151+ 'dot-notation' : 'off' ,
152+ '@typescript-eslint/dot-notation' : [
153+ 'error' ,
154+ {
155+ allowPrivateClassPropertyAccess : true ,
156+ allowProtectedClassPropertyAccess : true
157+ }
158+ ] ,
159+ 'quote-props' : [ 'error' , 'as-needed' ]
160+ }
161+ } ,
162+ // test-d.ts files
163+ {
164+ parser : '@typescript-eslint/parser' ,
165+ parserOptions : {
166+ ecmaVersion : 2019 ,
167+ sourceType : 'module' ,
168+ project : './tsconfig.json'
169+ } ,
170+ files : [ '**/*.test-d.ts' ] ,
171+ extends : [ 'plugin:@typescript-eslint/recommended' ] ,
172+ rules : {
173+ '@typescript-eslint/no-empty-function' : 'off' ,
174+ '@typescript-eslint/no-parameter-properties' : 'off' ,
175+ '@typescript-eslint/no-explicit-any' : 'off' ,
176+ '@typescript-eslint/no-use-before-define' : [
177+ 'error' ,
178+ {
179+ functions : false ,
180+ typedefs : false ,
181+ classes : false
182+ }
183+ ] ,
184+ '@typescript-eslint/no-unused-vars' : [
185+ 'off' ,
186+ {
187+ ignoreRestSiblings : true ,
188+ argsIgnorePattern : '^_'
189+ }
190+ ] ,
191+ '@typescript-eslint/no-object-literal-type-assertion' : 'off' ,
192+ '@typescript-eslint/interface-name-prefix' : 'off' ,
193+ '@typescript-eslint/no-non-null-assertion' : 'off' , // This is necessary for Map.has()/get()!
194+ '@typescript-eslint/no-inferrable-types' : [
195+ 'error' ,
196+ {
197+ ignoreProperties : true ,
198+ ignoreParameters : true
199+ }
200+ ] ,
201+ '@typescript-eslint/ban-ts-comment' : [
202+ 'error' ,
203+ {
204+ 'ts-expect-error' : false ,
205+ 'ts-ignore' : true ,
206+ 'ts-nocheck' : true ,
207+ 'ts-check' : false
208+ }
209+ ] ,
210+ '@typescript-eslint/restrict-template-expressions' : [
211+ 'error' ,
212+ {
213+ allowNumber : true ,
214+ allowBoolean : true ,
215+ // This is necessary to log errors
216+ // TODO: Consider switching to false when we may annotate catch clauses
217+ allowAny : true ,
218+ allowNullish : true
219+ }
220+ ] ,
221+ '@typescript-eslint/no-misused-promises' : [
222+ 'error' ,
223+ {
224+ checksVoidReturn : false
225+ }
226+ ] ,
227+ // We can turn this on from time to time but in general these rules
228+ // make our lives harder instead of easier
229+ '@typescript-eslint/no-unsafe-argument' : 'off' ,
230+ '@typescript-eslint/no-unsafe-assignment' : 'off' ,
231+ '@typescript-eslint/no-unsafe-member-access' : 'off' ,
232+ '@typescript-eslint/no-unsafe-return' : 'off' ,
233+ '@typescript-eslint/no-unsafe-call' : 'off' ,
234+
235+ // Although this rule makes sense, it takes about a second to execute (and we don't need it)
236+ '@typescript-eslint/no-implied-eval' : 'off' ,
237+
238+ '@typescript-eslint/explicit-module-boundary-types' : [
239+ 'warn' ,
240+ { allowArgumentsExplicitlyTypedAsAny : true }
241+ ] ,
242+ '@typescript-eslint/no-this-alias' : 'off' ,
243+
150244 // Prefer simple property access and declaration without quotes
151245 'dot-notation' : 'off' ,
152246 '@typescript-eslint/dot-notation' : [
0 commit comments