3
3
" ./tools/tslint-rules/"
4
4
],
5
5
"rules" : {
6
- "max-line-length" : [true , 100 ],
6
+ "max-line-length" : [
7
+ true ,
8
+ 100
9
+ ],
7
10
// Disable this flag because of SHA tslint#48b0c597f9257712c7d1f04b55ed0aa60e333f6a
8
11
// TSLint now shows warnings if types for properties are inferred. This rule needs to be
9
12
// disabled because all properties need to have explicit types set to work for Dgeni.
10
13
"no-inferrable-types" : false ,
14
+ "arrow-return-shorthand" : true ,
15
+ "no-duplicate-imports" : true ,
16
+ "no-angle-bracket-type-assertion" : true ,
17
+ "no-conditional-assignment" : true ,
18
+ "no-non-null-assertion" : true ,
19
+ "no-unnecessary-qualifier" : true ,
20
+ "no-string-throw" : true ,
21
+ "encoding" : true ,
22
+ "no-floating-promises" : true ,
23
+ "no-import-side-effect" : [
24
+ true ,
25
+ {
26
+ "ignore-module" : " ^(?!rxjs\/ )"
27
+ }
28
+ ],
29
+ "align" : [
30
+ true ,
31
+ " elements" ,
32
+ " members" ,
33
+ " parameters" ,
34
+ " statements"
35
+ ],
11
36
"class-name" : true ,
12
37
"comment-format" : [
13
38
true ,
14
39
" check-space"
15
40
],
16
41
"indent" : [
17
42
true ,
18
- " spaces"
43
+ " spaces" ,
44
+ 2
19
45
],
46
+ "array-type" : [
47
+ true ,
48
+ " array-simple"
49
+ ],
50
+ "deprecation" : {
51
+ "severity" : " warning"
52
+ },
20
53
"eofline" : true ,
54
+ "import-spacing" : false ,
55
+ "match-default-export-name" : true ,
56
+ "newline-before-return" : true ,
57
+ "no-consecutive-blank-lines" : [
58
+ true ,
59
+ 2
60
+ ],
21
61
"no-duplicate-variable" : true ,
22
62
"no-eval" : true ,
23
63
"no-arg" : true ,
24
- "no-internal-module" : true ,
25
- "no-trailing-whitespace" : true ,
26
64
"no-bitwise" : true ,
27
65
"no-shadowed-variable" : true ,
66
+ "no-debugger" : true ,
67
+ "no-console" : true ,
68
+ "no-internal-module" : true ,
69
+ "no-trailing-whitespace" : true ,
28
70
"no-unused-expression" : true ,
29
71
"no-var-keyword" : true ,
30
- "no-debugger" : true ,
31
72
"one-line" : [
32
73
true ,
33
74
" check-catch" ,
34
75
" check-else" ,
76
+ " check-finally" ,
35
77
" check-open-brace" ,
36
78
" check-whitespace"
37
79
],
80
+ "ordered-imports" : [
81
+ true ,
82
+ {
83
+ "import-sources-order" : " lowercase-last" ,
84
+ "named-imports-order" : " lowercase-last"
85
+ }
86
+ ],
87
+ "prefer-const" : true ,
38
88
"quotemark" : [
39
89
true ,
40
90
" single" ,
41
91
" avoid-escape"
42
92
],
43
- "semicolon" : true ,
93
+ "semicolon" : [
94
+ true ,
95
+ " always"
96
+ ],
44
97
"typedef-whitespace" : [
45
98
true ,
46
99
{
56
109
true ,
57
110
" ban-keywords" ,
58
111
" check-format" ,
59
- " allow-leading-underscore"
112
+ " allow-leading-underscore" ,
113
+ " allow-pascal-case"
60
114
],
61
115
"whitespace" : [
62
116
true ,
63
117
" check-branch" ,
64
118
" check-decl" ,
119
+ " check-module" ,
120
+ " check-preblock" ,
65
121
" check-operator" ,
66
122
" check-separator" ,
67
123
" check-type" ,
68
- " check-preblock "
124
+ " check-typecast "
69
125
],
70
126
// Bans jasmine helper functions that will prevent the CI from properly running tests.
71
127
"ban" : [
72
128
true ,
73
- [" fit" ],
74
- [" fdescribe" ],
75
- [" xit" ],
76
- [" xdescribe" ],
77
- {"name" : " Object.assign" , "message" : " Use the spread operator instead." }
129
+ [
130
+ " fit"
131
+ ],
132
+ [
133
+ " fdescribe"
134
+ ],
135
+ [
136
+ " xit"
137
+ ],
138
+ [
139
+ " xdescribe"
140
+ ],
141
+ {
142
+ "name" : " Object.assign" ,
143
+ "message" : " Use the spread operator instead."
144
+ }
78
145
],
79
146
// Disallows importing the whole RxJS library. Submodules can be still imported.
80
147
// Avoids inconsistent linebreak styles in source files. Forces developers to use LF linebreaks.
81
- "linebreak-style" : [true , " LF" ],
148
+ "linebreak-style" : [
149
+ true ,
150
+ " LF"
151
+ ],
82
152
// Namespaces are no allowed, because of Closure compiler.
83
153
"no-namespace" : true ,
84
- "jsdoc-format" : [true , " check-multiline-start" ],
85
-
154
+ "jsdoc-format" : [
155
+ true ,
156
+ " check-multiline-start"
157
+ ],
86
158
// Custom Rules
87
159
"ts-loader" : true ,
88
160
"no-exposed-todo" : true ,
97
169
"deletion-target" : true
98
170
},
99
171
"linterOptions" : {
172
+ "format" : " codeFrame" ,
100
173
"exclude" : [
101
174
// Exclude schematic template files that can't be linted.
102
- " **/schematics/**/files/**/*"
175
+ " **/schematics/**/files/**/*" ,
176
+ " **/node_modules/**/*" ,
177
+ " **/hello-world-app/**/*"
103
178
]
104
179
}
105
- }
180
+ }
0 commit comments