@spscommerce/eslint-config-typescript 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3846 -0
- package/lib/rules/stylisticIssues.js +1 -1
- package/lib/rules/typescript.js +83 -83
- package/package.json +4 -4
- package/tsconfig.json +1 -1
|
@@ -237,7 +237,7 @@ exports.stylisticIssues = {
|
|
|
237
237
|
* enforce a particular style for multiline comments 🔧
|
|
238
238
|
* https://eslint.org/docs/rules/multiline-comment-style
|
|
239
239
|
*/
|
|
240
|
-
"multiline-comment-style": "
|
|
240
|
+
"multiline-comment-style": "off",
|
|
241
241
|
/**
|
|
242
242
|
* require multiline ternary 🔧
|
|
243
243
|
* https://eslint.org/docs/rules/multiline-ternary
|
package/lib/rules/typescript.js
CHANGED
|
@@ -5,432 +5,432 @@ exports.typescript = void 0;
|
|
|
5
5
|
exports.typescript = {
|
|
6
6
|
/**
|
|
7
7
|
* Require that member overloads be consecutive ✅
|
|
8
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
8
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md
|
|
9
9
|
*/
|
|
10
10
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
11
11
|
/**
|
|
12
12
|
* Requires using either `T[]` or `Array<T>` for arrays 🔧
|
|
13
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
13
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/array-type.md
|
|
14
14
|
*/
|
|
15
15
|
"@typescript-eslint/array-type": ["error", { default: "array-simple" }],
|
|
16
16
|
/**
|
|
17
17
|
* Disallows awaiting a value that is not a Thenable ✅ 💭
|
|
18
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
18
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/await-thenable.md
|
|
19
19
|
*/
|
|
20
20
|
"@typescript-eslint/await-thenable": "error",
|
|
21
21
|
/**
|
|
22
22
|
* Bans `@ts-<directive>` comments from being used or requires descriptions after directive ✅
|
|
23
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
23
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/ban-ts-comment.md
|
|
24
24
|
*/
|
|
25
25
|
"@typescript-eslint/ban-ts-comment": "error",
|
|
26
26
|
/**
|
|
27
27
|
* Bans // tslint:<rule-flag> comments from being used 🔧
|
|
28
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
28
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/ban-tslint-comment.md
|
|
29
29
|
*/
|
|
30
30
|
"@typescript-eslint/ban-tslint-comment": "off",
|
|
31
31
|
/**
|
|
32
32
|
* Bans specific types from being used ✅ 🔧
|
|
33
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
33
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/ban-types.md
|
|
34
34
|
* The default config you get if you enable this recommended rule without specifying your own
|
|
35
35
|
* should be reviewed.
|
|
36
36
|
*/
|
|
37
37
|
"@typescript-eslint/ban-types": "error",
|
|
38
38
|
/**
|
|
39
39
|
* Ensures that literals on classes are exposed in a consistent style 🔧
|
|
40
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
40
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/class-literal-property-style.md
|
|
41
41
|
*/
|
|
42
42
|
"@typescript-eslint/class-literal-property-style": ["error", "fields"],
|
|
43
43
|
/**
|
|
44
44
|
* Enforce or disallow the use of the record type 🔧
|
|
45
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
45
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md
|
|
46
46
|
*/
|
|
47
47
|
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
|
|
48
48
|
/**
|
|
49
49
|
* Enforces consistent usage of type assertions
|
|
50
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
50
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-type-assertions.md
|
|
51
51
|
*/
|
|
52
52
|
"@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "as" }],
|
|
53
53
|
/**
|
|
54
54
|
* Consistent with type definition either `interface` or `type` 🔧
|
|
55
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
55
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-type-definitions.md
|
|
56
56
|
*/
|
|
57
57
|
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
|
58
58
|
/**
|
|
59
59
|
* Enforces consistent usage of type imports 🔧
|
|
60
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
60
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-type-imports.md
|
|
61
61
|
*/
|
|
62
62
|
"@typescript-eslint/consistent-type-imports": ["error", { prefer: "type-imports" }],
|
|
63
63
|
/**
|
|
64
64
|
* Require explicit return types on functions and class methods
|
|
65
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
65
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/explicit-function-return-type.md
|
|
66
66
|
*/
|
|
67
67
|
"@typescript-eslint/explicit-function-return-type": "error",
|
|
68
68
|
/**
|
|
69
69
|
* Require explicit accessibility modifiers on class properties and methods 🔧
|
|
70
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
70
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md
|
|
71
71
|
*/
|
|
72
72
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
73
73
|
/**
|
|
74
74
|
* Require explicit return and argument types on exported
|
|
75
75
|
* functions' and classes' public class methods ✅
|
|
76
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
76
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md
|
|
77
77
|
*/
|
|
78
78
|
"@typescript-eslint/explicit-module-boundary-types": "error",
|
|
79
79
|
/**
|
|
80
80
|
* Require a specific member delimiter style for interfaces and type literals 🔧
|
|
81
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
81
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/member-delimiter-style.md
|
|
82
82
|
*/
|
|
83
83
|
"@typescript-eslint/member-delimiter-style": "error",
|
|
84
84
|
/**
|
|
85
85
|
* Require a consistent member declaration order
|
|
86
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
86
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/member-ordering.md
|
|
87
87
|
*/
|
|
88
88
|
"@typescript-eslint/member-ordering": "error",
|
|
89
89
|
/**
|
|
90
90
|
* Enforces using a particular method signature syntax 🔧
|
|
91
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
91
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/method-signature-style.md
|
|
92
92
|
*/
|
|
93
93
|
"@typescript-eslint/method-signature-style": "error",
|
|
94
94
|
/**
|
|
95
95
|
* Enforces naming conventions for everything across a codebase 💭
|
|
96
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
96
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/naming-convention.md
|
|
97
97
|
*/
|
|
98
98
|
"@typescript-eslint/naming-convention": "off",
|
|
99
99
|
/**
|
|
100
100
|
* Requires that `.toString()` is only called on objects
|
|
101
101
|
* which provide useful information when stringified 💭
|
|
102
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
102
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-base-to-string.md
|
|
103
103
|
*/
|
|
104
104
|
"@typescript-eslint/no-base-to-string": "error",
|
|
105
105
|
/**
|
|
106
106
|
* Disallow non-null assertion in locations that may be confusing 🔧
|
|
107
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
107
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md
|
|
108
108
|
*/
|
|
109
109
|
"@typescript-eslint/no-confusing-non-null-assertion": "error",
|
|
110
110
|
/**
|
|
111
111
|
* Requires expressions of type void to appear in statement position 🔧 💭
|
|
112
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
112
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md
|
|
113
113
|
*/
|
|
114
114
|
"@typescript-eslint/no-confusing-void-expression": ["error", { ignoreArrowShorthand: true }],
|
|
115
115
|
/**
|
|
116
116
|
* Disallow the delete operator with computed key expressions 🔧
|
|
117
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
117
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-dynamic-delete.md
|
|
118
118
|
*/
|
|
119
119
|
"@typescript-eslint/no-dynamic-delete": "error",
|
|
120
120
|
/**
|
|
121
121
|
* Disallow the declaration of empty interfaces ✅ 🔧
|
|
122
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
122
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-empty-interface.md
|
|
123
123
|
*/
|
|
124
124
|
"@typescript-eslint/no-empty-interface": "error",
|
|
125
125
|
/**
|
|
126
126
|
* Disallow usage of the `any` type ✅ 🔧
|
|
127
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
127
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-explicit-any.md
|
|
128
128
|
*/
|
|
129
129
|
"@typescript-eslint/no-explicit-any": "error",
|
|
130
130
|
/**
|
|
131
131
|
* Disallow extra non-null assertion ✅ 🔧
|
|
132
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
132
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md
|
|
133
133
|
*/
|
|
134
134
|
"@typescript-eslint/no-extra-non-null-assertion": "error",
|
|
135
135
|
/**
|
|
136
136
|
* Forbids the use of classes as namespaces
|
|
137
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
137
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-extraneous-class.md
|
|
138
138
|
*/
|
|
139
139
|
"@typescript-eslint/no-extraneous-class": "error",
|
|
140
140
|
/**
|
|
141
141
|
* Requires Promise-like values to be handled appropriately ✅ 💭
|
|
142
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
142
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-floating-promises.md
|
|
143
143
|
*/
|
|
144
144
|
"@typescript-eslint/no-floating-promises": "error",
|
|
145
145
|
/**
|
|
146
146
|
* Disallow iterating over an array with a for-in loop ✅ 💭
|
|
147
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
147
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-for-in-array.md
|
|
148
148
|
*/
|
|
149
149
|
"@typescript-eslint/no-for-in-array": "error",
|
|
150
150
|
/**
|
|
151
151
|
* Disallow usage of the implicit `any` type in catch clauses 🔧
|
|
152
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
152
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md
|
|
153
153
|
*/
|
|
154
154
|
"@typescript-eslint/no-implicit-any-catch": "warn",
|
|
155
155
|
/**
|
|
156
156
|
* Disallows explicit type declarations for variables or
|
|
157
157
|
* parameters initialized to a number, string, or boolean ✅ 🔧
|
|
158
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
158
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-inferrable-types.md
|
|
159
159
|
*/
|
|
160
160
|
"@typescript-eslint/no-inferrable-types": "error",
|
|
161
161
|
/**
|
|
162
162
|
* Disallows usage of `void` type outside of generic or return types
|
|
163
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
163
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-invalid-void-type.md
|
|
164
164
|
*/
|
|
165
165
|
"@typescript-eslint/no-invalid-void-type": "warn",
|
|
166
166
|
/**
|
|
167
167
|
* Disallow the `void` operator except when used to discard a value 🔧 💭
|
|
168
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
168
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md
|
|
169
169
|
*/
|
|
170
170
|
"@typescript-eslint/no-meaningless-void-operator": "error",
|
|
171
171
|
/**
|
|
172
172
|
* Enforce valid definition of `new` and `constructor` ✅
|
|
173
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
173
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-misused-new.md
|
|
174
174
|
*/
|
|
175
175
|
"@typescript-eslint/no-misused-new": "error",
|
|
176
176
|
/**
|
|
177
177
|
* Avoid using promises in places not designed to handle them ✅ 💭
|
|
178
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
178
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-misused-promises.md
|
|
179
179
|
*/
|
|
180
180
|
"@typescript-eslint/no-misused-promises": "error",
|
|
181
181
|
/**
|
|
182
182
|
* Disallow the use of custom TypeScript modules and namespaces ✅
|
|
183
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
183
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-namespace.md
|
|
184
184
|
*/
|
|
185
185
|
"@typescript-eslint/no-namespace": "error",
|
|
186
186
|
/**
|
|
187
187
|
* Disallows using a non-null assertion in the left operand of the nullish coalescing operator
|
|
188
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
188
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md
|
|
189
189
|
*/
|
|
190
190
|
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
|
191
191
|
/**
|
|
192
192
|
* Disallows using a non-null assertion after an optional chain expression ✅
|
|
193
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
193
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md
|
|
194
194
|
*/
|
|
195
195
|
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
|
196
196
|
/**
|
|
197
197
|
* Disallows non-null assertions using the `!` postfix operator ✅
|
|
198
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
198
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-non-null-assertion.md
|
|
199
199
|
*/
|
|
200
200
|
"@typescript-eslint/no-non-null-assertion": "error",
|
|
201
201
|
/**
|
|
202
202
|
* Disallow the use of parameter properties in class constructors
|
|
203
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
203
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-parameter-properties.md
|
|
204
204
|
*/
|
|
205
205
|
"@typescript-eslint/no-parameter-properties": "off",
|
|
206
206
|
/**
|
|
207
207
|
* Disallows invocation of `require()`
|
|
208
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
208
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-require-imports.md
|
|
209
209
|
*/
|
|
210
210
|
"@typescript-eslint/no-require-imports": "error",
|
|
211
211
|
/**
|
|
212
212
|
* Disallow aliasing `this` ✅
|
|
213
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
213
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-this-alias.md
|
|
214
214
|
*/
|
|
215
215
|
"@typescript-eslint/no-this-alias": "error",
|
|
216
216
|
/**
|
|
217
217
|
* Disallow the use of type aliases
|
|
218
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
218
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-type-alias.md
|
|
219
219
|
*/
|
|
220
220
|
"@typescript-eslint/no-type-alias": "off",
|
|
221
221
|
/**
|
|
222
222
|
* Flags unnecessary equality comparisons against boolean literals 🔧 💭
|
|
223
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
223
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md
|
|
224
224
|
*/
|
|
225
225
|
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
|
|
226
226
|
/**
|
|
227
227
|
* Prevents conditionals where the type is always truthy or always falsy 🔧 💭
|
|
228
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
228
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md
|
|
229
229
|
*/
|
|
230
230
|
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
231
231
|
/**
|
|
232
232
|
* Warns when a namespace qualifier is unnecessary 🔧 💭
|
|
233
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
233
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md
|
|
234
234
|
*/
|
|
235
235
|
"@typescript-eslint/no-unnecessary-qualifier": "warn",
|
|
236
236
|
/**
|
|
237
237
|
* Enforces that type arguments will not be used if not required 🔧 💭
|
|
238
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
238
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md
|
|
239
239
|
*/
|
|
240
240
|
"@typescript-eslint/no-unnecessary-type-arguments": "error",
|
|
241
241
|
/**
|
|
242
242
|
* Warns if a type assertion does not change the type of an expression ✅ 🔧 💭
|
|
243
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
243
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md
|
|
244
244
|
*/
|
|
245
245
|
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
246
246
|
/**
|
|
247
247
|
* Disallows unnecessary constraints on generic types 🔧
|
|
248
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
248
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md
|
|
249
249
|
*/
|
|
250
250
|
"@typescript-eslint/no-unnecessary-type-constraint": "error",
|
|
251
251
|
/**
|
|
252
252
|
* Disallows calling an function with an `any` type value 💭
|
|
253
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
253
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-argument.md
|
|
254
254
|
*/
|
|
255
255
|
"@typescript-eslint/no-unsafe-argument": "error",
|
|
256
256
|
/**
|
|
257
257
|
* Disallows assigning `any` to variables and properties ✅ 💭
|
|
258
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
258
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md
|
|
259
259
|
*/
|
|
260
260
|
"@typescript-eslint/no-unsafe-assignment": "error",
|
|
261
261
|
/**
|
|
262
262
|
* Disallows calling an `any` type value ✅ 💭
|
|
263
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
263
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-call.md
|
|
264
264
|
*/
|
|
265
265
|
"@typescript-eslint/no-unsafe-call": "error",
|
|
266
266
|
/**
|
|
267
267
|
* Disallows member access on `any` typed variables ✅ 💭
|
|
268
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
268
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md
|
|
269
269
|
*/
|
|
270
270
|
"@typescript-eslint/no-unsafe-member-access": "error",
|
|
271
271
|
/**
|
|
272
272
|
* Disallows returning any from a function ✅ 💭
|
|
273
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
273
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-return.md
|
|
274
274
|
*/
|
|
275
275
|
"@typescript-eslint/no-unsafe-return": "error",
|
|
276
276
|
/**
|
|
277
277
|
* Disallows the use of require statements except in import statements ✅
|
|
278
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
278
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-var-requires.md
|
|
279
279
|
*/
|
|
280
280
|
"@typescript-eslint/no-var-requires": "error",
|
|
281
281
|
/**
|
|
282
282
|
* Prefers a non-null assertion over explicit type cast when possible 🔧 💭
|
|
283
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
283
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md
|
|
284
284
|
* Disabled because it enforces use of postfix ! operator, which is banned by
|
|
285
285
|
* @typescript-eslint/no-non-null-assertion (a recommended rule)
|
|
286
286
|
*/
|
|
287
287
|
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
288
288
|
/**
|
|
289
289
|
* Prefer usage of as const over literal type ✅ 🔧
|
|
290
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
290
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-as-const.md
|
|
291
291
|
*/
|
|
292
292
|
"@typescript-eslint/prefer-as-const": "error",
|
|
293
293
|
/**
|
|
294
294
|
* Prefer initializing each enums member value
|
|
295
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
295
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md
|
|
296
296
|
*/
|
|
297
297
|
"@typescript-eslint/prefer-enum-initializers": "error",
|
|
298
298
|
/**
|
|
299
299
|
* Prefer a ‘for-of’ loop over a standard ‘for’ loop if the
|
|
300
300
|
* index is only used to access the array being iterated
|
|
301
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
301
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-for-of.md
|
|
302
302
|
*/
|
|
303
303
|
"@typescript-eslint/prefer-for-of": "error",
|
|
304
304
|
/**
|
|
305
305
|
* Use function types instead of interfaces with call signatures 🔧
|
|
306
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
306
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-function-type.md
|
|
307
307
|
*/
|
|
308
308
|
"@typescript-eslint/prefer-function-type": "error",
|
|
309
309
|
/**
|
|
310
310
|
* Enforce includes method over indexOf method 🔧 💭
|
|
311
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
311
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-includes.md
|
|
312
312
|
*/
|
|
313
313
|
"@typescript-eslint/prefer-includes": "error",
|
|
314
314
|
/**
|
|
315
315
|
* Require that all enum members be literal values to
|
|
316
316
|
* prevent unintended enum member name shadow issues
|
|
317
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
317
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md
|
|
318
318
|
*/
|
|
319
319
|
"@typescript-eslint/prefer-literal-enum-member": "error",
|
|
320
320
|
/**
|
|
321
321
|
* Require the use of the `namespace` keyword instead of the
|
|
322
322
|
* `module` keyword to declare custom TypeScript modules ✅ 🔧
|
|
323
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
323
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md
|
|
324
324
|
*/
|
|
325
325
|
"@typescript-eslint/prefer-namespace-keyword": "error",
|
|
326
326
|
/**
|
|
327
327
|
* Enforce the usage of the nullish coalescing operator instead of logical chaining 💭
|
|
328
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
328
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md
|
|
329
329
|
*/
|
|
330
330
|
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
|
331
331
|
/**
|
|
332
332
|
* Prefer using concise optional chain expressions instead of chained logical ands
|
|
333
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
333
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-optional-chain.md
|
|
334
334
|
*/
|
|
335
335
|
"@typescript-eslint/prefer-optional-chain": "error",
|
|
336
336
|
/**
|
|
337
337
|
* Requires that private members are marked as `readonly` if
|
|
338
338
|
* they're never modified outside of the constructor 🔧 💭
|
|
339
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
339
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-readonly.md
|
|
340
340
|
*/
|
|
341
341
|
"@typescript-eslint/prefer-readonly": "error",
|
|
342
342
|
/**
|
|
343
343
|
* Requires that function parameters are typed as `readonly`
|
|
344
344
|
* to prevent accidental mutation of inputs 💭
|
|
345
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
345
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md
|
|
346
346
|
*/
|
|
347
347
|
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
348
348
|
/**
|
|
349
349
|
* Prefer using type parameter when calling `Array#reduce` instead of casting 🔧 💭
|
|
350
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
350
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md
|
|
351
351
|
*/
|
|
352
352
|
"@typescript-eslint/prefer-reduce-type-parameter": "error",
|
|
353
353
|
/**
|
|
354
354
|
* Enforce that `RegExp#exec` is used instead of `String#match`
|
|
355
355
|
* if no global flag is provided ✅ 🔧 💭
|
|
356
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
356
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md
|
|
357
357
|
*/
|
|
358
358
|
"@typescript-eslint/prefer-regexp-exec": "error",
|
|
359
359
|
/**
|
|
360
360
|
* Enforce that `this` is used when only `this` type is returned 🔧 💭
|
|
361
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
361
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-return-this-type.md
|
|
362
362
|
*/
|
|
363
363
|
"@typescript-eslint/prefer-return-this-type": "error",
|
|
364
364
|
/**
|
|
365
365
|
* Enforce the use of `String#startsWith` and `String#endsWith` instead
|
|
366
366
|
* of other equivalent methods of checking substrings 🔧 💭
|
|
367
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
367
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md
|
|
368
368
|
*/
|
|
369
369
|
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
370
370
|
/**
|
|
371
371
|
* Recommends using `@ts-expect-error` over `@ts-ignore` 🔧
|
|
372
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
372
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md
|
|
373
373
|
*/
|
|
374
374
|
"@typescript-eslint/prefer-ts-expect-error": "error",
|
|
375
375
|
/**
|
|
376
376
|
* Requires any function or method that returns a Promise to be marked async 🔧 💭
|
|
377
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
377
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/promise-function-async.md
|
|
378
378
|
*/
|
|
379
379
|
"@typescript-eslint/promise-function-async": "off",
|
|
380
380
|
/**
|
|
381
381
|
* Requires `Array#sort` calls to always provide a `compareFunction` 💭
|
|
382
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
382
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/require-array-sort-compare.md
|
|
383
383
|
*/
|
|
384
384
|
"@typescript-eslint/require-array-sort-compare": "error",
|
|
385
385
|
/**
|
|
386
386
|
* When adding two variables, operands must both be of type number or of type string ✅ 💭
|
|
387
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
387
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/restrict-plus-operands.md
|
|
388
388
|
*/
|
|
389
389
|
"@typescript-eslint/restrict-plus-operands": "error",
|
|
390
390
|
/**
|
|
391
391
|
* Enforce template literal expressions to be of string type ✅ 💭
|
|
392
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
392
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/restrict-template-expressions.md
|
|
393
393
|
*/
|
|
394
394
|
"@typescript-eslint/restrict-template-expressions": "error",
|
|
395
395
|
/**
|
|
396
396
|
* Enforces that members of a type union/intersection are sorted alphabetically 🔧
|
|
397
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
397
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md
|
|
398
398
|
*/
|
|
399
399
|
"@typescript-eslint/sort-type-union-intersection-members": "error",
|
|
400
400
|
/**
|
|
401
401
|
* Restricts the types allowed in boolean expressions 🔧 💭
|
|
402
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
402
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md
|
|
403
403
|
*/
|
|
404
404
|
"@typescript-eslint/strict-boolean-expressions": "error",
|
|
405
405
|
/**
|
|
406
406
|
* Exhaustiveness checking in switch with union type 💭
|
|
407
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
407
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md
|
|
408
408
|
*/
|
|
409
409
|
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
410
410
|
/**
|
|
411
411
|
* Sets preference level for triple slash directives versus ES6-style import declarations ✅
|
|
412
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
412
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/triple-slash-reference.md
|
|
413
413
|
*/
|
|
414
414
|
"@typescript-eslint/triple-slash-reference": "error",
|
|
415
415
|
/**
|
|
416
416
|
* Require consistent spacing around type annotations 🔧
|
|
417
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
417
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/type-annotation-spacing.md
|
|
418
418
|
*/
|
|
419
419
|
"@typescript-eslint/type-annotation-spacing": "error",
|
|
420
420
|
/**
|
|
421
421
|
* Requires type annotations to exist
|
|
422
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
422
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/typedef.md
|
|
423
423
|
*/
|
|
424
424
|
"@typescript-eslint/typedef": "off",
|
|
425
425
|
/**
|
|
426
426
|
* Enforces unbound methods are called with their expected scope ✅ 💭
|
|
427
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
427
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/unbound-method.md
|
|
428
428
|
*/
|
|
429
429
|
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
|
|
430
430
|
/**
|
|
431
431
|
* Warns for any two overloads that could be unified into
|
|
432
432
|
* one by using a union or an optional/rest parameter
|
|
433
|
-
* https://github.com/typescript-eslint/typescript-eslint/blob/
|
|
433
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/unified-signatures.md
|
|
434
434
|
*/
|
|
435
435
|
"@typescript-eslint/unified-signatures": "warn",
|
|
436
436
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spscommerce/eslint-config-typescript",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "SPS official linter configuration for TypeScript.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/SPSCommerce/
|
|
11
|
+
"url": "https://github.com/SPSCommerce/typescript.git"
|
|
12
12
|
},
|
|
13
13
|
"keywords": [
|
|
14
14
|
"style guide",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"author": "SPS Commerce",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"bugs": {
|
|
30
|
-
"url": "https://github.com/SPSCommerce/
|
|
30
|
+
"url": "https://github.com/SPSCommerce/typescript/issues"
|
|
31
31
|
},
|
|
32
|
-
"homepage": "https://github.com/SPSCommerce/
|
|
32
|
+
"homepage": "https://github.com/SPSCommerce/typescript/tree/main/typescript#readme",
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@typescript-eslint/eslint-plugin": "^4.31.2",
|
|
35
35
|
"@typescript-eslint/parser": "^4.31.2",
|
package/tsconfig.json
CHANGED