forked from tonysamperi/ngx-mat-timepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tslint.json
278 lines (278 loc) · 6.83 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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
{
"extends": [
"tslint:recommended",
"tslint-consistent-codestyle"
],
"rulesDirectory": [
"codelyzer"
],
"linterOptions": {
"exclude": ["*.test"]
},
"rules": {
"align": {
"options": [
"parameters",
"statements"
]
},
"array-type": false,
"arrow-return-shorthand": true,
"curly": true,
"deprecation": {
"severity": "warning"
},
"component-class-suffix": [
true,
"Page",
"Component"
],
"contextual-lifecycle": true,
"directive-class-suffix": true,
"directive-selector": [
true,
"attribute",
"ngxMatTimepicker",
"camelCase"
],
"component-selector": [
true,
"element",
"ngx-mat-timepicker",
"kebab-case"
],
"eofline": true,
"import-blacklist": [
true,
"rxjs/Rx"
],
"import-spacing": true,
"indent": {
"options": [
"spaces"
]
},
"max-classes-per-file": false,
"max-line-length": [
true,
150
],
"no-debugger": true,
"no-console": [
false,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-empty": false,
"no-inferrable-types": [
false,
"ignore-params"
],
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-switch-case-fall-through": true,
"no-var-requires": false,
"object-literal-key-quotes": [
true,
"as-needed"
],
"quotemark": [
true,
"double"
],
"semicolon": {
"options": [
"always"
]
},
"space-before-function-paren": {
"options": {
"anonymous": "never",
"asyncArrow": "always",
"constructor": "never",
"method": "never",
"named": "never"
}
},
"typedef-whitespace": {
"options": [
{
"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"
}
]
},
"variable-name": false,
"whitespace": {
"options": [
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type",
"check-typecast"
]
},
"no-conflicting-lifecycle": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-inputs-metadata-property": true,
"no-output-native": true,
"no-output-on-prefix": true,
"no-output-rename": true,
"no-outputs-metadata-property": true,
"template-banana-in-box": true,
"template-no-negated-async": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true,
"object-literal-sort-keys": false,
"no-bitwise": true,
"interface-over-type-literal": true,
"trailing-comma": false,
"no-unused-expression": false,
"newline-before-return": true,
"member-ordering": [
true,
{
"alphabetize": true,
"order": [
"public-static-field",
"protected-static-field",
"private-static-field",
"public-instance-field",
"protected-instance-field",
"private-instance-field",
"constructor",
"public-static-method",
"protected-static-method",
"private-static-method",
"public-instance-method",
"protected-instance-method",
"private-instance-method"
]
}
],
"naming-convention": [
true,
// forbid leading and trailing underscores and enforce camelCase on EVERY name. will be overridden by subtypes if needed
{
"type": "default",
"format": "camelCase",
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
// require all global constants to be camelCase or UPPER_CASE
// all other variables and functions still need to be camelCase
{
"type": "variable",
"modifiers": [
"global",
"const"
],
"format": [
"camelCase",
"PascalCase",
"UPPER_CASE"
]
},
// override the above format option for exported constants to allow only UPPER_CASE
{
"type": "variable",
"modifiers": [
"export",
"const"
],
"format": "UPPER_CASE",
"prefix": "NGX_MAT_TIMEPICKER_"
},
// require exported constant variables that are initialized with functions to be camelCase
{
"type": "functionVariable",
"modifiers": [
"export",
"const"
],
"format": "camelCase"
},
// require leading and trailing underscores for unused parameters, to promote code tidiness
// all other rules (trailingUnderscore: forbid, format: camelCase) still apply
{
"type": "parameter",
"modifiers": "unused",
"leadingUnderscore": "require",
"trailingUnderscore": "require"
},
// require leading underscores for private properties and methods, all other rules still apply
{
"type": "member",
"modifiers": "private",
"leadingUnderscore": "require"
},
// same for protected
{
"type": "member",
"modifiers": "protected",
"leadingUnderscore": "require"
},
// exclicitly disable the format check only for method toJSON
{
"type": "method",
"filter": "^toJSON$",
"format": null
},
// enforce camelCase for all public static readonly(!) properties
{
"type": "property",
"modifiers": [
"public",
"static",
"const"
],
"format": [
"camelCase",
"UPPER_CASE"
]
},
// enforce PascalCase for classes, interfaces, enums, etc. Remember, there are still no underscores allowed.
{
"type": "type",
"format": "PascalCase",
"prefix": "NgxMatTimepicker"
},
// abstract classes must have the prefix "Abstract". The following part of the name must be valid PascalCase
{
"type": "class",
"modifiers": "export",
"prefix": "NgxMatTimepicker"
},
// enum members must be in camelCase. Without this config, enumMember would inherit UPPER_CASE from public static const property
{
"type": "enumMember",
"format": [
"camelCase",
"UPPER_CASE"
]
},
{
"type": "genericTypeParameter",
"format": [
"UPPER_CASE"
],
"prefix": ""
}
]
}
}