-
Notifications
You must be signed in to change notification settings - Fork 0
/
tslint.yml
302 lines (281 loc) · 5.36 KB
/
tslint.yml
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
---
extends:
- tslint:recommended
- tslint-eslint-rules
- tslint-clean-code
- tslint-no-unused-expression-chai
rules:
# Class and Member design
no-unnecessary-class:
- true
- allow-constructor-only
- allow-static-only
- allow-empty-class
member-access:
- true
- no-public
member-ordering:
- true
- order:
- private-static-field
- public-static-field
- public-instance-field
- private-instance-field
- private-constructor
- public-constructor
- public-instance-method
- protected-instance-method
- private-instance-method
adjacent-overload-signatures: true
unified-signatures: true
prefer-function-over-method:
- true
- allow-public
- allow-protected
no-invalid-this:
- true
- check-function-in-method
no-duplicate-super: true
new-parens: true
no-misused-new: true
no-construct: true
# Interface design
no-empty-interface: true
prefer-method-signature: true
interface-over-type-literal: false
interface-name:
- true
- never-prefix
# Function design
no-arg: true
only-arrow-functions:
- true
- allow-declarations
- allow-named-functions
arrow-parens:
- true
- ban-single-arg-parens
arrow-return-shorthand: true
no-return-await: true
# Variable design
prefer-const: true
no-shadowed-variable:
- true
- temporalDeadZone
one-variable-per-declaration:
- true
- ignore-for-loop
no-duplicate-variable:
- true
- check-parameters
no-unnecessary-initializer: true
# Requires and Imports
no-implicit-dependencies:
- true
- dev
ordered-imports:
- true
- import-sources-order: lowercase-last
named-imports-order: case-insensitive
grouped-imports: true
no-duplicate-imports: true
no-require-imports: true
no-default-export: true
no-reference: true
# Types
typedef:
- true
- call-signature
- property-declaration
no-inferrable-types:
- true
- ignore-params
no-angle-bracket-type-assertion: true
callable-types: true
no-null-keyword: true
no-non-null-assertion: true
array-type:
- true
- generic
# Objects
prefer-object-spread: true
object-literal-shorthand: true
object-literal-key-quotes:
- true
- as-needed
no-string-literal: false
# Strings
quotemark:
- true
- single
- avoid-template
- avoid-escape
prefer-template: true
no-invalid-template-strings: true
# Operators
triple-equals:
- true
- allow-null-check
binary-expression-operand-order: true
no-dynamic-delete: true
no-bitwise: true
use-isnan: true
no-conditional-assignment: true
# Conditional statements
prefer-conditional-expression:
- true
- check-else-if
# For statement
prefer-for-of: true
forin: true
# Switch statement
switch-default: true
no-switch-case-fall-through: true
no-duplicate-switch-case: true
# Try statement
no-unsafe-finally: true
# Maintainability
encoding: true
cyclomatic-complexity:
- true
- 20
max-file-line-count:
- true
- 1500
max-line-length:
- true
- 140
indent:
- true
- spaces
- 2
eofline: true
no-unused-variable:
- true
- check-parameters
- ignore-pattern: "^_"
# Layout
curly:
- false
whitespace:
- true
- check-branch
- check-decl
- check-operator
- check-module
- check-separator
- check-rest-spread
- check-type
- check-typecast
- check-type-operator
- check-preblock
typedef-whitespace:
- true
- call-signature: nospace
index-signature: nospace
parameter: nospace
property-declaration: nospace
variable-declaration: nospace
- call-signature: onespace
index-signature: onespace
parameter: onespace
property-declaration: onespace
variable-declaration: onespace
space-before-function-paren:
- true
- anonymous: never
named: never
asyncArrow: always
method: never
constructor: never
space-within-parens: 0
import-spacing: true
no-trailing-whitespace: true
# Empty lines
newline-before-return: true
newline-per-chained-call: true
one-line:
- true
- check-open-brace
- check-catch
- check-else
- check-whitespace
no-consecutive-blank-lines:
- true
- 1
# Alignment
semicolon:
- true
- never
align:
- true
- parameters
- statements
trailing-comma:
- true
- multiline: never
singleline: never
# Naming
class-name: true
variable-name:
- true
- check-format
- allow-leading-underscore
- ban-keywords
# Documentation
comment-format:
- true
- check-space
jsdoc-format:
- true
- check-multiline-start
no-redundant-jsdoc: true
# Misc
no-console:
- true
- debug
- info
- time
- timeEnd
- trace
no-debugger: true
no-eval: true
no-string-throw: true
no-namespace: true
no-internal-module: true
radix: true
no-unused-expression-chai:
- true
- allow-fast-null-checks
no-empty: true
no-sparse-arrays: true
label-position: true
no-use-before-declare: true
no-var-keyword: true
object-literal-sort-keys: false
# tslint-eslint-rules
ter-padded-blocks:
- true
- never
ter-no-irregular-whitespace: true
ter-no-sparse-arrays: true
ter-indent:
- true
- 2
- SwitchCase: 1
# tslint-clean-code
id-length:
- true
- - _
- x
- y
- i
- j
- T
try-catch-first: true
no-map-without-usage: true
no-complex-conditionals: true
prefer-dry-conditionals: true
no-flag-args: true
max-func-args: true
no-for-each-push: true