-
Notifications
You must be signed in to change notification settings - Fork 399
/
tslint.json
64 lines (64 loc) · 2.55 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
{
"extends": ["tslint-config-airbnb"],
"rules": {
// 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", "jsx-double"],
// 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"],
// 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,
// TODO: enable completed-docs after transition from TSLint to ESLint is complete
"completed-docs": false,
"interface-over-type-literal": true,
"jsdoc-format": [true, "check-multiline-start"],
"member-access": [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,
"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)
}
}