-
Notifications
You must be signed in to change notification settings - Fork 1
/
tslint.json
200 lines (187 loc) · 6.58 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
{
"extends": [
"codelyzer",
"tslint-eslint-rules",
"tslint-consistent-codestyle",
"tslint-config-airbnb",
"rxjs-tslint-rules",
"tslint-config-prettier"
],
"rulesDirectory": [
"node_modules/codelyzer"
],
"rules": {
//--------------------------------------------------------------------//
// Codelyzer core rules (version 4.3.0)
// http://codelyzer.com/rules
//
// ng2 styleguide recommendations
// https://github.com/mgechev/codelyzer#recommended-configuration
//--------------------------------------------------------------------//
"banana-in-box": true,
"templates-no-negated-async": true,
"directive-selector": [true, "attribute", [], "camelCase"], // no prefix for directives
"component-selector": [true, "element", ["soul"], "kebab-case"],
"max-inline-declarations": true,
"no-conflicting-life-cycle-hooks": true,
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
"use-view-encapsulation": true,
"no-attribute-parameter-decorator": true,
"no-input-rename": true,
"no-output-rename": true,
"no-output-on-prefix": true,
"no-forward-ref": true,
"use-life-cycle-interface": true,
"contextual-life-cycle": true,
"use-pipe-transform-interface": true,
"component-class-suffix": [true, "Component"],
"directive-class-suffix": [true, "Directive"],
//--------------------------------------------------------------------//
// tslint rxjs rules (version 4.0.2)
// https://github.com/cartant/rxjs-tslint-rules
//--------------------------------------------------------------------//
//--------------------------------------------------------------------//
// tslint core rules (version 5.9.1)
// https://palantir.github.io/tslint/rules
//--------------------------------------------------------------------//
//---------------------
// Typescript specific
//---------------------
"adjacent-overload-signatures": true,
"ban-comma-operator": true,
"ban-types": [
true,
["Object", "Use {} instead."],
["String", "Use string instead"],
["Number", "Use number instead"],
["Boolean", "Use boolean instead"]
],
"member-access": false,
"member-ordering": [
true,
{
"order": "fields-first"
}
],
"no-empty-interface": true,
"no-inferrable-types": false,
"no-internal-module": true,
"no-namespace": true,
"no-non-null-assertion": true,
"no-parameter-reassignment": true,
"no-reference": true,
"no-var-requires": true,
"only-arrow-functions": [true, "allow-named-functions"],
"prefer-for-of": true,
"unified-signatures": true,
//--------------------
// Functionality
//--------------------
"await-promise": true,
"ban": [true, "alert", "fit", "fdescribe", "only"],
"forin": true,
"import-blacklist": [true],
"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": false,
"no-eval": true,
"no-for-in-array": true,
"no-invalid-template-strings": true,
"no-misused-new": true,
"no-return-await": true,
"no-shadowed-variable": true,
"no-sparse-arrays": true,
"no-string-literal": false,
"no-string-throw": true,
"no-switch-case-fall-through": true,
"no-unsafe-finally": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"prefer-object-spread": true,
"radix": true,
"strict-boolean-expressions": false, // AIRBNB OVERWRITES version 5.4.2
"triple-equals": true,
"use-isnan": true,
//--------------------
// Maintainability
//--------------------
"object-literal-sort-keys": false,
//--------------------
// Style
//--------------------
"callable-types": true,
"class-name": true,
"interface-over-type-literal": true,
"one-variable-per-declaration": true,
"ordered-imports": [
true,
{
"grouped-imports": true,
"import-sources-order": "case-insensitive",
"module-source-path": "basename",
"named-imports-order": "case-insensitive"
}
],
"prefer-template": true,
"space-before-function-paren": [true, "never"], // AIRBNB OVERWRITES version 5.4.2
"variable-name": [
true,
"ban-keywords", // AIRBNB OVERWRITES version 5.4.2
"check-format",
"allow-pascal-case" // AIRBNB OVERWRITES version 5.4.2
],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-preblock",
"check-separator", // AIRBNB OVERWRITES version 5.4.2
"check-type" // AIRBNB OVERWRITES version 5.4.2
],
//--------------------------------------------------------------------//
// tslint-eslint-rules rules (version 5.1.0)
// https://palantir.github.io/tslint/rules
//--------------------------------------------------------------------//
//---------------------
// Possible Errors
//---------------------
"no-constant-condition": true,
"no-control-regex": true,
"no-duplicate-case": true,
"no-empty-character-class": true,
"no-ex-assign": true,
"no-extra-boolean-cast": true,
//---------------------
// Best Practices
//---------------------
"no-multi-spaces": true,
//---------------------
// Stylistic Issues
//---------------------
"brace-style": [
true,
"1tbs",
{ "allowSingleLine": false } // AIRBNB OVERWRITES version 5.4.2
],
"ter-func-call-spacing": [true, "never"],
//--------------------------------------------------------------------//
// tslint-consistent-codestyle rules (version 1.13.0)
// https://github.com/ajafff/tslint-consistent-codestyle
//--------------------------------------------------------------------//
"const-parameters": true,
"no-else-after-return": true,
"no-unnecessary-else": true
}
}