This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathtslint.json
119 lines (119 loc) · 3.02 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
{
"extends": [
"tslint-config-airbnb"
],
"rules": {
/* modifications to base config */
// adds statements, members, and elements to the base config
"align": [
true,
"parameters",
"arguments",
"statements",
"members",
"elements"
],
// adds number of spaces so auto-fixing will work
"indent": [
true,
"spaces",
2
],
// increase value from 100 in base config to 120
"max-line-length": [
true,
120
],
// adds avoid-escape and avoid-template
"quotemark": [
true,
"single",
"avoid-escape",
"avoid-template"
],
// adds ban-keywords and allow-leading-underscores
// once this gets implemented, we should incorporate it: https://github.com/palantir/tslint/issues/3442
"variable-name": [
true,
"ban-keywords",
"check-format",
"allow-leading-underscore",
"allow-snake-case"
],
// adds check-module, check-type, check-rest-spread, check-typecast, check-type-operator
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-preblock",
"check-type",
"check-module",
"check-separator",
"check-rest-spread",
"check-typecast",
"check-type-operator"
],
/* not used in base config */
"await-promise": true,
"ban-comma-operator": true,
// Disabling the following rule because of https://github.com/palantir/tslint/issues/4493
// "completed-docs": true,
"interface-over-type-literal": true,
"jsdoc-format": [
true,
"check-multiline-start"
],
"member-access": [
true,
"check-accessor"
],
"no-duplicate-imports": true,
"no-duplicate-switch-case": true,
"no-duplicate-variable": true,
"no-dynamic-delete": true,
"no-empty": true,
"no-floating-promises": true,
"no-for-in-array": true,
"no-implicit-dependencies": [true, "dev"],
"no-object-literal-type-assertion": true,
"no-redundant-jsdoc": true,
"no-require-imports": true,
"no-return-await": true,
"no-submodule-imports": true,
"no-this-assignment": true,
"no-unused-expression": true,
"no-var-requires": true,
"one-line": [
true,
"check-else",
"check-whitespace",
"check-open-brace",
"check-catch",
"check-finally"
],
"strict-boolean-expressions": [
true,
"allow-boolean-or-undefined"
],
"typedef": [
true,
"call-signature"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
]
// TODO: find a rule similar to https://palantir.github.io/tslint/rules/no-construct/, except it bans those types
// from interfaces (e.g. a function that returns Boolean is an error, it should return boolean)
},
"linterOptions": {
"format": "verbose"
}
}