-
Notifications
You must be signed in to change notification settings - Fork 0
/
tslint.json
116 lines (94 loc) · 3.21 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
{
"defaultSeverity": "error",
"extends": "tslint:all",
"rules": {
// I prefer T[] over Array<T>
"array-type": [true, "array"],
// looks better than a single "wrapped" arg
"arrow-parens": [true, "ban-single-arg-parens"],
// no code docs yet
"completed-docs": false,
// Default doesn't specify 2
"indent": [true, "spaces", 2],
// no need for file headers
"file-header": false,
// no code docs yet
"jsdoc-format": false,
// I just like this is better than the default
"interface-name": false,
// I prefer type literals over unions for data structures
"interface-over-type-literal": false,
// Sometimes I prefer more than one
"max-classes-per-file": false,
// Unecessary to enforce
"max-line-length": false,
// I just like this is better than the default
"member-ordering": [
true,
{
"order": [
"public-static-field",
"protected-static-field",
"private-static-field",
"public-static-method",
"protected-static-method",
"private-static-method",
"public-instance-field",
"protected-instance-field",
"private-instance-field",
"public-constructor",
"protected-constructor",
"private-constructor",
"public-instance-method",
"protected-instance-method",
"private-instance-method"
],
"alphabetize": false
}
],
// a little too verbose
"newline-before-return": false,
// a little too verbose
"newline-per-chained-call": false,
// Default is true, but any is valid sometimes
"no-any": false,
// noop is a valid use case
"no-empty": false,
// Default is true, but...
// 1. also *need* ignore-properties so that we also satisfy typedef rule
// 2. also *prefer* to have a typedef on parameters even if a default value allows them to be inferred
"no-inferrable-types": [true, "ignore-params", "ignore-properties"],
// Use of null is semantically appropriate
"no-null-keyword": false,
// Default is true, but a little too strict for my taste
"object-literal-sort-keys": false,
// The same as the default but also enables grouped-imports
"ordered-imports": [
true,
{
"grouped-imports": true,
"import-sources-order": "case-insensitive",
"module-source-path": "full",
"named-imports-order": "case-insensitive"
}
],
// BaseMatcher#describe
"prefer-function-over-method": [true, "allow-public"],
// Default is just true
// Allow undefined or null to be used as an `if` condition
"strict-boolean-expressions": [true, "allow-null-union", "allow-undefined-union"],
// Default includes all options; we don't care about having typedefs on _everything_
"typedef": [
true,
"call-signature",
// "arrow-call-signature",
"parameter",
// "arrow-parameter",
"property-declaration",
// "variable-declaration",
"member-variable-declaration"
],
// The same as the default but also enables allow-leading-underscore
"variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore"]
}
}