-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtslint.json
193 lines (193 loc) · 6.74 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
{
"defaultSeverity": "error",
"jsRules": {},
"rules": {
"adjacent-overload-signatures": true,
"align": true,
"array-type": false, //too cumbersome, no correctness gain
"arrow-parens": true,
"arrow-return-shorthand": false, //too terse
"await-promise": [
true,
"Thenable",
"Bluebird",
"IExposedPromise"
],
"ban-comma-operator": true,
"ban": [
true,
{
"name": [
"Function",
"length"
],
"message": "no way, jose"
}
],
"ban-types": false,
"binary-expression-operand-order": false,
"callable-types": true,
"class-name": false,
"comment-format": true,
"completed-docs": false,
"curly": true,
"cyclomatic-complexity": [
true,
100
],
"deprecation": true,
"encoding": true,
"eofline": true,
"file-header": false,
"forin": true,
"import-blacklist": false,
"import-spacing": true,
"indent": [
false, //no autofix
"tabs"
],
"interface-name": false,
"interface-over-type-literal": false,
"jsdoc-format": false,
"label-position": true,
"linebreak-style": false,
//////////////////////////// above this line, few spam
"match-default-export-name": false, //hard to know exactly the default name v15
"max-classes-per-file": [
true,
20
],
"max-file-line-count": [
false,
1200
],
"max-line-length": [
true,
1000
],
"member-access": false,
"member-ordering": false,
"new-parens": true,
"newline-before-return": false, //autofix doesn't seem to work
"newline-per-chained-call": false,
"no-angle-bracket-type-assertion": false,
"no-any": false,
"no-arg": true,
"no-bitwise": true,
"no-boolean-literal-compare": false, //! change in v15, autofix, make sure non-bools can't be compared first
"no-conditional-assignment": true,
"no-consecutive-blank-lines": [
false,
2
], ////autofix
"no-console": true,
"no-construct": true,
"no-debugger": true,
"no-default-export": true, ////default export discovery is hard.
"no-duplicate-imports": false, //// doesn't work great with es6 modules that have no default export
"no-duplicate-super": true,
"no-duplicate-switch-case": true,
"no-duplicate-variable": true,
"no-dynamic-delete": true,
"no-empty": {
"options": "allow-empty-catch"
},
"no-empty-interface": true,
"no-eval": true,
"no-floating-promises": true,
"no-for-in-array": true,
"no-implicit-dependencies": true,
"no-import-side-effect": true,
"no-inferrable-types": {
"options": [
"ignore-params"
]
},
"no-inferred-empty-object-type": true,
"no-internal-module": true,
"no-invalid-template-strings": true,
"no-invalid-this": true,
"no-irregular-whitespace": true,
"no-magic-numbers": false, ////too verbose and annoying
"no-mergeable-namespace": true,
"no-misused-new": true,
"no-namespace": false, ////flexibility is nice for small modules
"no-non-null-assertion": true,
"no-null-keyword": false,
"no-object-literal-type-assertion": true,
"no-parameter-properties": false,
"no-parameter-reassignment": false, //painful
"no-redundant-jsdoc": false, //removes useful jsdoc stuff like @default
"no-reference": true,
"no-reference-import": true,
"no-require-imports": false,
"no-return-await": true,
"no-shadowed-variable": true,
"no-sparse-arrays": true,
"no-string-literal": false, ////disallows index signatures. no thanks.
"no-string-throw": true,
"no-submodule-imports": true,
"no-switch-case-fall-through": true,
"no-this-assignment": true,
"no-trailing-whitespace": false, //! change when project autofix is available. right now too annoying for no real benifit.
"no-unbound-method": true,
"no-unnecessary-callback-wrapper": false, // overly brief code
"no-unnecessary-class": true,
"no-unnecessary-initializer": true,
"no-unnecessary-qualifier": true,
"no-unnecessary-type-assertion": true,
"no-unsafe-any": false, //painful to change.
"no-unsafe-finally": true,
"no-unused-expression": true,
"no-unused-variable": false, ////broken with tslint plugin, use --noUnusedLocals instead
"no-use-before-declare": true,
"no-var-keyword": true, ////v15
"no-var-requires": false, ////need for creating ad-hoc type definitions for untyped packages
"no-void-expression": true,
"number-literal-format": false,
"object-literal-key-quotes": false, //! ignore for this project
"object-literal-shorthand": false, //no. allow flexibility
"object-literal-sort-keys": false, //no, allow flexibility
"one-line": false,
"one-variable-per-declaration": true,
"only-arrow-functions": false, //flexibility and named functions
"ordered-imports": false, //no, allow flexibility
"strict-boolean-expressions": [
true,
"allow-null-union",
"allow-undefined-union"
],
///////////////////////////////////////
//!maybe? section remaining properties not entered when starting v15 linting
"prefer-function-over-method": false,
"prefer-object-spread": true,
"prefer-for-of": false,
"restrict-plus-operands": true,
"return-undefined": true,
"semicolon": true,
"strict-type-predicates": false, //requires strict-null-checks
"triple-equals": {
"options": [
"allow-null-check"
]
},
"type-literal-delimiter": {
"options": {
"singleLine": "always"
}
},
"typeof-compare": false, //included in ts2.2, so not needed.
"use-default-type-parameter": false, ////overly terse
"unified-signatures": true,
"use-isnan": true,
"quotemark": false
},
"rulesDirectory": [],
"linterOptions": {
"exclude": [
"**/node_modules/**/*",
"**/_graveyard/**/*",
"**/built/**/*"
]
}
}