@@ -10,10 +10,19 @@ module.exports = {
10
10
"plugin:@typescript-eslint/recommended" ,
11
11
] ,
12
12
rules : {
13
+ // Using `object` has not caused us any confusion so far.
14
+ "@typescript-eslint/ban-types" : "off" ,
15
+
16
+ // Sometimes `any` is the right answer.
17
+ "@typescript-eslint/explicit-module-boundary-types" : [ "error" , {
18
+ allowArgumentsExplicitlyTypedAsAny : true
19
+ } ] ,
20
+
13
21
"@typescript-eslint/explicit-function-return-type" : [ "error" , {
14
22
allowExpressions : true ,
15
23
allowTypedFunctionExpressions : true
16
24
} ] ,
25
+
17
26
"@typescript-eslint/member-delimiter-style" : [ "error" , {
18
27
multiline : {
19
28
delimiter : "semi" ,
@@ -24,22 +33,50 @@ module.exports = {
24
33
requireLast : false
25
34
}
26
35
} ] ,
27
- "@typescript-eslint/no-empty-function" : "off" , // That's just stupid.
36
+
37
+ // That's just stupid.
38
+ "@typescript-eslint/no-empty-function" : "off" ,
39
+
40
+ // Sometimes `any` is the right answer.
28
41
"@typescript-eslint/no-explicit-any" : "off" ,
42
+
29
43
"@typescript-eslint/no-inferrable-types" : [ "error" , {
30
44
ignoreParameters : true
31
45
} ] ,
32
- "@typescript-eslint/no-namespace" : "off" , // Namespaces that overlap interfaces are useful.
46
+
47
+ // Namespaces that overlap interfaces are useful.
48
+ "@typescript-eslint/no-namespace" : "off" ,
49
+
33
50
"@typescript-eslint/no-use-before-define" : [ "error" , {
51
+ // Functions are hoisted. This is not a logic error.
34
52
functions : false
35
53
} ] ,
36
- "@typescript-eslint/no-var-requires" : "off" , // It's occasionally useful to inline a require; especially json.
54
+
37
55
"@typescript-eslint/no-unused-vars" : [ "error" , {
38
- args : "none" // Often useful to document functions.
56
+ // Often useful to document functions.
57
+ args : "none"
39
58
} ] ,
40
- "no-inner-declarations" : "off" , // Needed to allow functions exported from namespaces.
59
+
60
+ // Needed to allow functions exported from namespaces.
61
+ "no-inner-declarations" : "off" ,
62
+
41
63
"no-constant-condition" : [ "error" , {
64
+ // Allow the while(true) pattern.
42
65
checkLoops : false
43
- } ]
66
+ } ] ,
67
+
68
+ "no-restricted-properties" : [ 2 , {
69
+ object : "describe" ,
70
+ property : "only" ,
71
+ message : "This is ok for development but should not be checked in."
72
+ } , {
73
+ object : "it" ,
74
+ property : "only" ,
75
+ message : "This is ok for development but should not be checked in."
76
+ } ] ,
77
+
78
+ // Not everybody understands the regex spec in that level of detail to recognize
79
+ // unnecessary escapes. Sometimes the extra escape adds clarity.
80
+ "no-useless-escape" : "off"
44
81
}
45
82
} ;
0 commit comments