forked from aws/aws-toolkit-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tslint.yaml
209 lines (205 loc) · 4.84 KB
/
tslint.yaml
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
---
extends:
- tslint-eslint-rules
- tslint-no-circular-imports
rules:
# TypeScript-specific
# These rules find errors related to TypeScript features:
adjacent-overload-signatures: true
member-access:
options:
- check-constructor
member-ordering:
options:
-
order: instance-sandwich
no-reference: true
no-var-requires: true
prefer-for-of: true
promise-function-async: true
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
# Functionality
# These rules catch common errors in JS programming or otherwise confusing constructs that are prone to producing bugs:
await-promise:
options:
- Thenable
ban-comma-operator: true
curly: true
forin: true
label-position: true
no-arg: true
no-bitwise: true
no-conditional-assignment: true
# TODO: Enable no-console once we have a logging framework in place.
# no-console: true
no-construct: true
no-debugger: true
no-duplicate-super: true
no-duplicate-switch-case: true
no-duplicate-variable: true
no-dynamic-delete: true
no-eval: true
no-floating-promises: true
no-for-in-array: true
no-implicit-dependencies:
options:
-
- vscode
- semver-regex
- del
no-inferred-empty-object-type: true
no-invalid-template-strings: true
no-invalid-this:
options:
- check-function-in-method
no-misused-new: true
no-null-keyword: true
no-object-literal-type-assertion: true
no-shadowed-variable: true
no-sparse-arrays: true
no-string-literal: true
no-string-throw: true
no-switch-case-fall-through: true
no-this-assignment:
options:
- allow-destructuring
no-unbound-method:
options:
- ignore-static
no-unsafe-any: true
no-unsafe-finally: true
no-unused-expression: true
no-var-keyword: true
no-void-expression:
options:
- ignore-arrow-function-shorthand
prefer-object-spread: true
radix: true
restrict-plus-operands: true
triple-equals: true
use-isnan: true
# Maintainability
# These rules make code maintenance easier:
cyclomatic-complexity: true
deprecation: true
eofline: true
indent:
options:
- spaces
- 4
max-line-length:
options:
- 120
no-duplicate-imports: true
prefer-const: true
prefer-readonly: true
trailing-comma: true
# Style
# These rules enforce consistent style across your codebase:
align:
options:
- parameters
- arguments
- statements
- members
- elements
array-type:
options:
- array
arrow-return-shorthand: true
class-name: true
comment-format:
options:
- check-space
encoding: true
file-header:
options:
- "Copyright \\d{4} Amazon.com, Inc. or its affiliates. All Rights Reserved.\\r?\\n \\* SPDX-License-Identifier: Apache-2.0"
- "Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: Apache-2.0"
file-name-casing:
options:
- camel-case
interface-name:
options:
- never-prefix
interface-over-type-literal: true
jsdoc-format: true
newline-before-return: true
new-parens: true
no-boolean-literal-compare: true
no-consecutive-blank-lines: true
no-trailing-whitespace: true
no-unnecessary-callback-wrapper: true
no-unnecessary-initializer: true
no-unnecessary-qualifier: true
number-literal-format: true
object-literal-key-quotes:
options:
- as-needed
one-line:
options:
- check-catch
- check-finally
- check-else
- check-open-brace
- check-whitespace
one-variable-per-declaration: true
ordered-imports: true
prefer-method-signature: true
prefer-switch: true
prefer-template:
options:
- allow-single-concat
prefer-while: true
quotemark:
options:
- single
- avoid-template
- avoid-escape
semicolon:
options:
- never
space-before-function-paren:
options:
-
anonymous: never
named: never
method: never
contructor: never
switch-final-break:
options:
- always
variable-name:
options:
- check-format
- allow-leading-underscore
- ban-keywords
whitespace:
options:
- check-branch
- check-decl
- check-operator
- check-module
- check-separator
- check-rest-spread
- check-type
- check-typecast
- check-type-operator
- check-preblock
# ESLint
# The following rules are provided by ESLint via the tslint-eslint-rules package.
no-unexpected-multiline: true
defaultSeverity: error