-
Notifications
You must be signed in to change notification settings - Fork 11
/
tslint.json
113 lines (113 loc) · 2.84 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
{
"extends": ["tslint:recommended"],
"rules": {
// Namespaces
"no-namespace": false,
// Alphabetized imports
"ordered-imports": [
true,
{
"import-sources-order": "case-insensitive",
"named-imports-order": "case-insensitive"
}
],
// when the complexity of a function gets to be crazy
"cyclomatic-complexity": [
true,
15
],
// Enforces indentation with 4 spaces. Although 4 spaces is not enforced, as there may be special cases where
// it cannot be avoided, it is highly recommended to use 4 spaces everywhere for indents
"indent": [
true,
"spaces",
4
],
"file-name-casing": [
false,
{
".ts": "camel-case"
}
],
"import-spacing": false,
"interface-name": false,
// Sorry Windows users, you'll have to convert line endings to remove /r as this causes issues later.
"linebreak-style": [
true,
"LF"
],
// Number of classes per file. Currently not enforced, but recommend having separate classes in separate files.
"max-classes-per-file": [
false,
1
],
// Maximum line length will be 150 chars, which is better than 80!
"max-line-length": [
true,
150
],
"no-angle-bracket-type-assertion": false,
// Don't use console commands like console.log(), use other loggers instead with log levels
"no-console": [
true,
"debug",
"info",
"log",
"time",
"timeEnd",
"trace"
],
"no-string-literal": false,
"no-magic-numbers": true,
// Enforces consistent object literal property quote style.
"object-literal-key-quotes": [
true,
"consistent-as-needed"
],
"object-literal-sort-keys": false,
// Don't declare multiple variables with one 'let' followed by commas
"one-variable-per-declaration": [
true,
"ignore-for-loop"
],
"only-arrow-functions": false,
"prefer-object-spread": true,
"promise-function-async": true,
// Use single quotes for string literals for consistency
"quotemark": [
true,
"single",
"avoid-escape"
],
// Always. Do it.
"semicolon": [
true,
"always"
],
// Require a default case in all switch statements. Log something if you can't think of anything.
"switch-default": true,
// disallows multiline/singleline trailing commas
"trailing-comma": [
true,
{
"multiline": "never",
"singleline": "never",
"esSpecCompliant": true
}
],
// Use === instead of ==.
"triple-equals": true,
// whitespace rules
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-preblock",
"check-separator",
"check-type",
"check-typecast",
"check-type-operator"
]
}
}