-
Notifications
You must be signed in to change notification settings - Fork 0
/
tslint.json
214 lines (190 loc) · 5.13 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
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
{
"extends": "tslint:recommended",
"rulesDirectory": [
"codelyzer",
"rxjs-tslint"
],
"defaultSeverity": "warning",
"rules": {
/* --------- BEGIN CUSTOM RULES --------- */
// ----- FUNCTIONALITY
// Enforces braces for if/for/do/while statements.
"curly": [
true,
"ignore-same-line"
],
// Requires a for ... in statement to be filtered with an if statement.
"forin": true,
// Requires === and !== in place of === and !=.
"triple-equals": true,
// Disallows unused expression statements.
"no-unused-expression": [
true,
"allow-fast-null-checks"
],
// Disallows debugger statements.
"no-debugger": true,
// Disallows eval function invocations.
"no-eval": true,
// ----- STYLE
// Requires the specified tokens to be on the same line as the expression preceding them.
"one-line": [
true,
"check-open-brace",
"check-catch",
"check-finally",
"check-else",
"check-whitespace"
],
// Checks variable names for various errors.
"variable-name": [
true,
"allow-leading-underscore"
],
// Enforces PascalCased class and interface names. (MUST)
"class-name": true,
// Requires interface names to begin with a capital ‘I’ (SHOULD)
"interface-name": true,
// Enforces whitespace style conventions.
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
// Disallow irregular whitespace within a file, including strings and comments.
"no-irregular-whitespace": true,
// Disallows trailing whitespace at the end of a line.
"no-trailing-whitespace": true,
// Require or disallow a space before function parenthesis.
"space-before-function-paren": false,
// Requires single or double quotes for string literals.
"quotemark": [
true,
"single",
"avoid-escape"
],
// Requires that import statements be alphabetized and grouped.
"ordered-imports": [
true,
{
"import-sources-order": "lowercase-last",
"named-imports-order": "lowercase-last"
}
],
// ----- MAINTENABILITY
// Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.
"trailing-comma": true,
// Enforces indentation with tabs or spaces
"indent": {
"options": ["spaces", 2]
},
// Ensures the file ends with a newline.
"eofline": true,
// Requires lines to be under a certain max length.
"max-line-length": [
true,
{
"limit": 140,
"ignore-pattern": "^import"
}
],
// Requires files to remain under a certain number of lines
"max-file-line-count": [
true,
300
],
// A file may not contain more than the specified number of classes
"max-classes-per-file": [
true,
12
],
// Enforces a threshold of cyclomatic complexity.
"cyclomatic-complexity": [
true,
9
],
/* --------- END CUSTOM RULES ---------- */
"no-string-throw": false,
"arrow-return-shorthand": true,
"callable-types": true,
"comment-format": [true, "check-space"],
"deprecation": true,
"import-blacklist": [
true,
"rxjs/Rx",
"ramda/es"
],
"import-spacing": true,
"interface-over-type-literal": true,
"label-position": true,
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-arg": true,
"no-bitwise": true,
"no-console": [
true,
"log",
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-construct": true,
"no-duplicate-super": true,
"no-empty": false,
"no-empty-interface": true,
"no-misused-new": true,
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-shadowed-variable": true,
"no-string-literal": false,
"no-string-throw": true,
"no-switch-case-fall-through": true,
"no-unnecessary-initializer": true,
"no-use-before-declare": false,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"prefer-const": true,
"radix": true,
"semicolon": [
true,
"always"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"unified-signatures": true,
"no-output-on-prefix": false,
"no-inputs-metadata-property": true,
"no-outputs-metadata-property": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-output-rename": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": false,
"directive-class-suffix": true,
"object-literal-key-quotes": [false, "as-needed"]
}
}