forked from signalstickers/signalstickers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tslint.json
149 lines (129 loc) · 3.61 KB
/
tslint.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{
"extends": "tslint-xo/space",
"rules": {
// Do not enforce alignment of parameters in function calls.
"align": {
"severity": "off"
},
// Requires using "Array<T>" style for arrays.
"array-type": {
"severity": "error",
"options": ["generic"]
},
"await-promise": {
"severity": "error",
"options": ["PromiseLike"]
},
// This effectively allows the use of `Function` as a type, which would
// normally be banned.
"ban-types": {
"severity": "error",
"options": [
["String", "Use `string` instead."],
["Number", "Use `number` instead."],
["Boolean", "Use `boolean` instead."],
["Symbol", "Use `symbol` instead."],
["Object", "Use `object` instead."]
]
},
// Require a space after "//" on single-line comments.
"comment-format": {
"severity": "error",
"options": ["check-space"]
},
// Do not enforce the "early exit" pattern.
"early-exit": {
"severity": "off"
},
"file-name-casing": {
"severity": "off"
},
// Enforce ordering of member and field definitions in classes.
"member-ordering": {
"severity": "error",
"options": {
"order": [
// Field order.
"private-static-field",
"public-static-field",
"private-instance-field",
"public-instance-field",
// Method order.
"constructor",
"private-instance-method",
"public-instance-method",
"static-method"
]
}
},
// Allow up to 2 consecutive blank lines.
"no-consecutive-blank-lines": {
"severity": "error",
"options": 2
},
// Allow importing modules that are not listed as a dependency in the
// project’s package.json. This is disabled because it doesn"t work with
// custom module resolution rules.
"no-implicit-dependencies": {
"severity": "off"
},
// Disallow imports with side effects with the exception of .html and .css
// files.
"no-import-side-effect": {
"severity": "error",
"options": {
"ignore-module": "(\\.html|\\.css)$"
}
},
"no-null-keyword": {
"severity": "off"
},
// Allow statements like "{} as Foo".
"no-object-literal-type-assertion": {
"severity": "off"
},
// Allows "unsafe" use of the "any" type. (This rule tends to be a bit
// over-zealous.)
"no-unsafe-any": {
"severity": "off"
},
// Disallows unused imports, variables, functions, classes, type parameters,
// and more.
"no-unused": {
"severity": "off"
},
// Suppress deprecation warnings about this rule until tslint-xo removes it.
"no-use-before-declare": {
"severity": "off"
},
// Require consistent object key quoting. If any key in an object literal
// requires quotes, all keys should be quoted.
"object-literal-key-quotes": {
"severity": "error",
"options": "consistent-as-needed"
},
// Enforce single quotes in JS/TS and double quotes in JSX.
"quotemark": {
"severity": "error",
"options": ["single", "jsx-double"]
},
// Don"t require explicit type definitions on everything. In many cases,
// TypeScript can "trivially infer" types and a type definition would be
// redundant.
"typedef": {
"severity": "off"
},
// Allow variable names in lowerCamelCase, PascalCase, UPPER_CASE, and
// _leadingUnderscore. Additionally, ban the use of reserved TypeScript
// keywords.
"variable-name": {
"severity": "error",
"options": [
"ban-keywords",
"check-format",
"allow-pascal-case",
"allow-leading-underscore"
]
}
}
}