You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// CONFIGURATION: By default, these are banned: String, Boolean, Number, Object, Symbol
33
-
'@typescript-eslint/ban-types': [
34
-
1,
35
-
{
36
-
'extendDefaults': false,
37
-
'types': {
38
-
'String': {
39
-
'message': 'Use \'string\' instead',
40
-
'fixWith': 'string'
41
-
},
42
-
'Boolean': {
43
-
'message': 'Use \'boolean\' instead',
44
-
'fixWith': 'boolean'
45
-
},
46
-
'Number': {
47
-
'message': 'Use \'number\' instead',
48
-
'fixWith': 'number'
49
-
},
50
-
'Object': {
51
-
'message': 'Use \'object\' instead, or else define a proper TypeScript type:'
52
-
},
53
-
'Symbol': {
54
-
'message': 'Use \'symbol\' instead',
55
-
'fixWith': 'symbol'
56
-
},
57
-
'Function': {
58
-
'message': 'The \'Function\' type accepts any function-like value.\nIt provides no type safety when calling the function, which can be a common source of bugs.\nIt also accepts things like class declarations, which will throw at runtime as they will not be called with \'new\'.\nIf you are expecting the function to accept certain arguments, you should explicitly define the function shape.'
59
-
}
60
-
}
61
-
}
62
-
],
63
30
// RATIONALE: Code is more readable when the type of every variable is immediately obvious.
64
31
// Even if the compiler may be able to infer a type, this inference will be unavailable
65
32
// to a person who is reviewing a GitHub diff. This rule makes writing code harder,
0 commit comments