/
tslint.json
173 lines (165 loc) · 5.9 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
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"jsRules": {},
"rules": {
// TYPESCRIPT SPECIFIC
"adjacent-overload-signatures": true,
"ban-comma-operator": true,
"ban-types": [false, ["Object", "Use {} instead."], ["String"]],
"member-access": false,
"member-ordering": [
false,
{
"order": [
"public-static-field",
"public-instance-field",
"public-constructor",
"private-static-field",
"private-instance-field",
"private-constructor",
"public-instance-method",
"protected-instance-method",
"private-instance-method"
]
}
],
"no-any": false,
"no-empty-interface": true,
"no-import-side-effect": true,
"no-inferrable-types": false,
"no-internal-module": true,
"no-magic-numbers": [false, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 200, 201, 204, 300, 301, 302, 400, 401, 403, 404, 422, 500, 501, 1000, 2000, 3000],
"no-namespace": true,
"no-non-null-assertion": true,
"no-parameter-reassignment": true,
"no-reference": true,
"no-unnecessary-type-assertion": true,
"no-var-requires": true,
"only-arrow-functions": false,
"prefer-for-of": true,
"promise-function-async": false,
"typedef": [false, "call-signature", "parameter", "member-variable-declaration"],
"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"
}
],
"unified-signatures": true,
// STYLES
"align": true,
"comment-format": true,
"import-spacing": true,
"interface-name": true,
"newline-before-return": true,
"new-parens": true,
"no-boolean-literal-compare": true,
"no-consecutive-blank-lines": [true],
"no-trailing-whitespace": true,
"one-variable-per-declaration": true,
"semicolon": true,
"whitespace": true,
"object-literal-shorthand": false,
"max-line-length": [false],
// Allows you to use the “other” quotemark in cases where escaping would normally be required.
"quotemark": [true, "single", "avoid-escape"],
// import-sources-order - "lowercase-first": Correct order is "baz", "Bar", "Foo"
// import-sources-order - "named-imports-order": Correct order is {b, A, C}
"ordered-imports": false, // [true, {"import-sources-order": "lowercase-last", "named-imports-order": "lowercase-first"}],
// Property names should always be quoted
"object-literal-key-quotes": false,
// MAINTAINABILITY
"cyclomatic-complexity": true,
"eofline": true,
"indent": [true, "spaces"],
"object-literal-sort-keys": false,
"prefer-const": true,
"trailing-comma": [false, {"multiline": "always", "singleline": "never"}],
// FUNCTIONALITY
"await-promise": false,
// "ban":,
"curly": true,
"forin": true,
"import-blacklist": false,
"label-position": true,
"no-arg": true,
"no-bitwise": true,
"no-conditional-assignment": true,
"no-console": true,
"no-construct": true,
"no-debugger": true,
"no-duplicate-super": true,
"no-duplicate-switch-case": true,
"no-duplicate-variable": true,
"no-empty": true,
"no-eval": true,
"no-floating-promises": true,
"no-for-in-array": true,
"no-implicit-dependencies": false,
"no-inferred-empty-object-type": false,
"no-invalid-template-strings": true,
"no-invalid-this": true,
"no-misused-new": true,
"no-null-keyword": false,
"no-object-literal-type-assertion": true,
"no-return-await": true,
"no-shadowed-variable": true,
"no-sparse-arrays": true,
"no-string-literal": true,
"no-string-throw": true,
"no-submodule-imports": false,
"no-switch-case-fall-through": true,
"no-this-assignment": false,
"no-unbound-method": false,
"no-unnecessary-class": false,
"no-unsafe-any": false,
"no-unsafe-finally": true,
"no-unused-expression": true,
"no-unused-variable": true, // Compiler checks this
"no-use-before-declare": false,
"no-var-keyword": true,
"no-void-expression": false,
"prefer-conditional-expression": true,
"prefer-object-spread": true,
"radix": true,
"restrict-plus-operands": true,
"strict-boolean-expressions": false,
"strict-type-predicates": true,
"switch-default": true,
"triple-equals": true,
"typeof-compare": true,
"use-default-type-parameter": true,
"use-isnan": true,
// MOCHA
"import-name": true,
"mocha-avoid-only": true,
"jquery-deferred-must-complete": true,
"mocha-unneeded-done": true,
"no-banned-terms": true,
"no-constant-condition": true,
"no-control-regex": true,
"no-duplicate-case": true,
"no-duplicate-parameter-names": true,
"no-typeof-undefined": true,
"no-unnecessary-bind": true,
"possible-timing-attack": true,
"prefer-array-literal": true,
"valid-typeof": true,
"use-named-parameter": true,
},
"rulesDirectory": []
}