@spscommerce/eslint-config-typescript 0.0.7 → 0.0.10

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.
@@ -237,9 +237,12 @@ exports.bestPractices = {
237
237
  "@typescript-eslint/no-magic-numbers": [
238
238
  "error",
239
239
  {
240
- ignore: [0,
240
+ ignore: [
241
+ -1,
242
+ 0,
241
243
  1,
242
- 2],
244
+ 2,
245
+ ],
243
246
  ignoreArrayIndexes: true,
244
247
  },
245
248
  ],
@@ -93,8 +93,9 @@ exports.possibleErrors = {
93
93
  /**
94
94
  * disallow double-negation boolean casts in a boolean context ✅ 🔧
95
95
  * https://eslint.org/docs/rules/no-extra-boolean-cast
96
+ * Disabled because it conflicts with @typescript-eslint/strict-boolean-expressions
96
97
  */
97
- "no-extra-boolean-cast": "error",
98
+ "no-extra-boolean-cast": "off",
98
99
  /**
99
100
  * disallow unnecessary parentheses 🔧
100
101
  * https://eslint.org/docs/rules/no-extra-parens
@@ -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": "error",
240
+ "multiline-comment-style": "off",
241
241
  /**
242
242
  * require multiline ternary 🔧
243
243
  * https://eslint.org/docs/rules/multiline-ternary
@@ -5,433 +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/master/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md
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/master/packages/eslint-plugin/docs/rules/array-type.md
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/master/packages/eslint-plugin/docs/rules/await-thenable.md
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/master/packages/eslint-plugin/docs/rules/ban-ts-comment.md
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/master/packages/eslint-plugin/docs/rules/ban-tslint-comment.md
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/master/packages/eslint-plugin/docs/rules/ban-types.md
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/master/packages/eslint-plugin/docs/rules/class-literal-property-style.md
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/master/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md
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/master/packages/eslint-plugin/docs/rules/consistent-type-assertions.md
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/master/packages/eslint-plugin/docs/rules/consistent-type-definitions.md
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/master/packages/eslint-plugin/docs/rules/consistent-type-imports.md
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/master/packages/eslint-plugin/docs/rules/explicit-function-return-type.md
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/master/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md
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/master/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md
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/master/packages/eslint-plugin/docs/rules/member-delimiter-style.md
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/master/packages/eslint-plugin/docs/rules/member-ordering.md
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/master/packages/eslint-plugin/docs/rules/method-signature-style.md
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/master/packages/eslint-plugin/docs/rules/naming-convention.md
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/master/packages/eslint-plugin/docs/rules/no-base-to-string.md
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/master/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md
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/master/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md
112
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md
113
113
  */
114
- "@typescript-eslint/no-confusing-void-expression": [
115
- "error",
116
- { "ignoreArrowShorthand": true }
117
- ],
114
+ "@typescript-eslint/no-confusing-void-expression": ["error", { ignoreArrowShorthand: true }],
118
115
  /**
119
116
  * Disallow the delete operator with computed key expressions 🔧
120
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-dynamic-delete.md
117
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-dynamic-delete.md
121
118
  */
122
119
  "@typescript-eslint/no-dynamic-delete": "error",
123
120
  /**
124
121
  * Disallow the declaration of empty interfaces ✅ 🔧
125
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-interface.md
122
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-empty-interface.md
126
123
  */
127
124
  "@typescript-eslint/no-empty-interface": "error",
128
125
  /**
129
126
  * Disallow usage of the `any` type ✅ 🔧
130
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-explicit-any.md
127
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-explicit-any.md
131
128
  */
132
129
  "@typescript-eslint/no-explicit-any": "error",
133
130
  /**
134
131
  * Disallow extra non-null assertion ✅ 🔧
135
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md
132
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md
136
133
  */
137
134
  "@typescript-eslint/no-extra-non-null-assertion": "error",
138
135
  /**
139
136
  * Forbids the use of classes as namespaces
140
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extraneous-class.md
137
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-extraneous-class.md
141
138
  */
142
139
  "@typescript-eslint/no-extraneous-class": "error",
143
140
  /**
144
141
  * Requires Promise-like values to be handled appropriately ✅ 💭
145
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-floating-promises.md
142
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-floating-promises.md
146
143
  */
147
144
  "@typescript-eslint/no-floating-promises": "error",
148
145
  /**
149
146
  * Disallow iterating over an array with a for-in loop ✅ 💭
150
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-for-in-array.md
147
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-for-in-array.md
151
148
  */
152
149
  "@typescript-eslint/no-for-in-array": "error",
153
150
  /**
154
151
  * Disallow usage of the implicit `any` type in catch clauses 🔧
155
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md
152
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md
156
153
  */
157
154
  "@typescript-eslint/no-implicit-any-catch": "warn",
158
155
  /**
159
156
  * Disallows explicit type declarations for variables or
160
157
  * parameters initialized to a number, string, or boolean ✅ 🔧
161
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-inferrable-types.md
158
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-inferrable-types.md
162
159
  */
163
160
  "@typescript-eslint/no-inferrable-types": "error",
164
161
  /**
165
162
  * Disallows usage of `void` type outside of generic or return types
166
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-invalid-void-type.md
163
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-invalid-void-type.md
167
164
  */
168
165
  "@typescript-eslint/no-invalid-void-type": "warn",
169
166
  /**
170
167
  * Disallow the `void` operator except when used to discard a value 🔧 💭
171
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md
168
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md
172
169
  */
173
170
  "@typescript-eslint/no-meaningless-void-operator": "error",
174
171
  /**
175
172
  * Enforce valid definition of `new` and `constructor` ✅
176
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-misused-new.md
173
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-misused-new.md
177
174
  */
178
175
  "@typescript-eslint/no-misused-new": "error",
179
176
  /**
180
177
  * Avoid using promises in places not designed to handle them ✅ 💭
181
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-misused-promises.md
178
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-misused-promises.md
182
179
  */
183
180
  "@typescript-eslint/no-misused-promises": "error",
184
181
  /**
185
182
  * Disallow the use of custom TypeScript modules and namespaces ✅
186
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-namespace.md
183
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-namespace.md
187
184
  */
188
185
  "@typescript-eslint/no-namespace": "error",
189
186
  /**
190
187
  * Disallows using a non-null assertion in the left operand of the nullish coalescing operator
191
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md
188
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md
192
189
  */
193
190
  "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
194
191
  /**
195
192
  * Disallows using a non-null assertion after an optional chain expression ✅
196
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md
193
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md
197
194
  */
198
195
  "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
199
196
  /**
200
197
  * Disallows non-null assertions using the `!` postfix operator ✅
201
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-non-null-assertion.md
198
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-non-null-assertion.md
202
199
  */
203
200
  "@typescript-eslint/no-non-null-assertion": "error",
204
201
  /**
205
202
  * Disallow the use of parameter properties in class constructors
206
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-parameter-properties.md
203
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-parameter-properties.md
207
204
  */
208
205
  "@typescript-eslint/no-parameter-properties": "off",
209
206
  /**
210
207
  * Disallows invocation of `require()`
211
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-require-imports.md
208
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-require-imports.md
212
209
  */
213
210
  "@typescript-eslint/no-require-imports": "error",
214
211
  /**
215
212
  * Disallow aliasing `this` ✅
216
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-this-alias.md
213
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-this-alias.md
217
214
  */
218
215
  "@typescript-eslint/no-this-alias": "error",
219
216
  /**
220
217
  * Disallow the use of type aliases
221
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-type-alias.md
218
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-type-alias.md
222
219
  */
223
220
  "@typescript-eslint/no-type-alias": "off",
224
221
  /**
225
222
  * Flags unnecessary equality comparisons against boolean literals 🔧 💭
226
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md
223
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md
227
224
  */
228
225
  "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
229
226
  /**
230
227
  * Prevents conditionals where the type is always truthy or always falsy 🔧 💭
231
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md
228
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md
232
229
  */
233
230
  "@typescript-eslint/no-unnecessary-condition": "error",
234
231
  /**
235
232
  * Warns when a namespace qualifier is unnecessary 🔧 💭
236
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md
233
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md
237
234
  */
238
235
  "@typescript-eslint/no-unnecessary-qualifier": "warn",
239
236
  /**
240
237
  * Enforces that type arguments will not be used if not required 🔧 💭
241
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md
238
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md
242
239
  */
243
240
  "@typescript-eslint/no-unnecessary-type-arguments": "error",
244
241
  /**
245
242
  * Warns if a type assertion does not change the type of an expression ✅ 🔧 💭
246
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md
243
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md
247
244
  */
248
245
  "@typescript-eslint/no-unnecessary-type-assertion": "error",
249
246
  /**
250
247
  * Disallows unnecessary constraints on generic types 🔧
251
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md
248
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md
252
249
  */
253
250
  "@typescript-eslint/no-unnecessary-type-constraint": "error",
254
251
  /**
255
252
  * Disallows calling an function with an `any` type value 💭
256
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-argument.md
253
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-argument.md
257
254
  */
258
255
  "@typescript-eslint/no-unsafe-argument": "error",
259
256
  /**
260
257
  * Disallows assigning `any` to variables and properties ✅ 💭
261
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md
258
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md
262
259
  */
263
260
  "@typescript-eslint/no-unsafe-assignment": "error",
264
261
  /**
265
262
  * Disallows calling an `any` type value ✅ 💭
266
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-call.md
263
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-call.md
267
264
  */
268
265
  "@typescript-eslint/no-unsafe-call": "error",
269
266
  /**
270
267
  * Disallows member access on `any` typed variables ✅ 💭
271
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md
268
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md
272
269
  */
273
270
  "@typescript-eslint/no-unsafe-member-access": "error",
274
271
  /**
275
272
  * Disallows returning any from a function ✅ 💭
276
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-return.md
273
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-return.md
277
274
  */
278
275
  "@typescript-eslint/no-unsafe-return": "error",
279
276
  /**
280
277
  * Disallows the use of require statements except in import statements ✅
281
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-var-requires.md
278
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-var-requires.md
282
279
  */
283
280
  "@typescript-eslint/no-var-requires": "error",
284
281
  /**
285
282
  * Prefers a non-null assertion over explicit type cast when possible 🔧 💭
286
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md
283
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md
284
+ * Disabled because it enforces use of postfix ! operator, which is banned by
285
+ * @typescript-eslint/no-non-null-assertion (a recommended rule)
287
286
  */
288
- "@typescript-eslint/non-nullable-type-assertion-style": "error",
287
+ "@typescript-eslint/non-nullable-type-assertion-style": "off",
289
288
  /**
290
289
  * Prefer usage of as const over literal type ✅ 🔧
291
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-as-const.md
290
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-as-const.md
292
291
  */
293
292
  "@typescript-eslint/prefer-as-const": "error",
294
293
  /**
295
294
  * Prefer initializing each enums member value
296
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md
295
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md
297
296
  */
298
297
  "@typescript-eslint/prefer-enum-initializers": "error",
299
298
  /**
300
299
  * Prefer a ‘for-of’ loop over a standard ‘for’ loop if the
301
300
  * index is only used to access the array being iterated
302
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-for-of.md
301
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-for-of.md
303
302
  */
304
303
  "@typescript-eslint/prefer-for-of": "error",
305
304
  /**
306
305
  * Use function types instead of interfaces with call signatures 🔧
307
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-function-type.md
306
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-function-type.md
308
307
  */
309
308
  "@typescript-eslint/prefer-function-type": "error",
310
309
  /**
311
310
  * Enforce includes method over indexOf method 🔧 💭
312
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-includes.md
311
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-includes.md
313
312
  */
314
313
  "@typescript-eslint/prefer-includes": "error",
315
314
  /**
316
315
  * Require that all enum members be literal values to
317
316
  * prevent unintended enum member name shadow issues
318
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md
317
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md
319
318
  */
320
319
  "@typescript-eslint/prefer-literal-enum-member": "error",
321
320
  /**
322
321
  * Require the use of the `namespace` keyword instead of the
323
322
  * `module` keyword to declare custom TypeScript modules ✅ 🔧
324
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md
323
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md
325
324
  */
326
325
  "@typescript-eslint/prefer-namespace-keyword": "error",
327
326
  /**
328
327
  * Enforce the usage of the nullish coalescing operator instead of logical chaining 💭
329
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md
328
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md
330
329
  */
331
330
  "@typescript-eslint/prefer-nullish-coalescing": "error",
332
331
  /**
333
332
  * Prefer using concise optional chain expressions instead of chained logical ands
334
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-optional-chain.md
333
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-optional-chain.md
335
334
  */
336
335
  "@typescript-eslint/prefer-optional-chain": "error",
337
336
  /**
338
337
  * Requires that private members are marked as `readonly` if
339
338
  * they're never modified outside of the constructor 🔧 💭
340
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-readonly.md
339
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-readonly.md
341
340
  */
342
341
  "@typescript-eslint/prefer-readonly": "error",
343
342
  /**
344
343
  * Requires that function parameters are typed as `readonly`
345
344
  * to prevent accidental mutation of inputs 💭
346
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md
345
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md
347
346
  */
348
347
  "@typescript-eslint/prefer-readonly-parameter-types": "off",
349
348
  /**
350
349
  * Prefer using type parameter when calling `Array#reduce` instead of casting 🔧 💭
351
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md
350
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md
352
351
  */
353
352
  "@typescript-eslint/prefer-reduce-type-parameter": "error",
354
353
  /**
355
354
  * Enforce that `RegExp#exec` is used instead of `String#match`
356
355
  * if no global flag is provided ✅ 🔧 💭
357
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md
356
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md
358
357
  */
359
358
  "@typescript-eslint/prefer-regexp-exec": "error",
360
359
  /**
361
360
  * Enforce that `this` is used when only `this` type is returned 🔧 💭
362
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-return-this-type.md
361
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-return-this-type.md
363
362
  */
364
363
  "@typescript-eslint/prefer-return-this-type": "error",
365
364
  /**
366
365
  * Enforce the use of `String#startsWith` and `String#endsWith` instead
367
366
  * of other equivalent methods of checking substrings 🔧 💭
368
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md
367
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md
369
368
  */
370
369
  "@typescript-eslint/prefer-string-starts-ends-with": "error",
371
370
  /**
372
371
  * Recommends using `@ts-expect-error` over `@ts-ignore` 🔧
373
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md
372
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md
374
373
  */
375
374
  "@typescript-eslint/prefer-ts-expect-error": "error",
376
375
  /**
377
376
  * Requires any function or method that returns a Promise to be marked async 🔧 💭
378
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/promise-function-async.md
377
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/promise-function-async.md
379
378
  */
380
379
  "@typescript-eslint/promise-function-async": "off",
381
380
  /**
382
381
  * Requires `Array#sort` calls to always provide a `compareFunction` 💭
383
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-array-sort-compare.md
382
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/require-array-sort-compare.md
384
383
  */
385
384
  "@typescript-eslint/require-array-sort-compare": "error",
386
385
  /**
387
386
  * When adding two variables, operands must both be of type number or of type string ✅ 💭
388
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/restrict-plus-operands.md
387
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/restrict-plus-operands.md
389
388
  */
390
389
  "@typescript-eslint/restrict-plus-operands": "error",
391
390
  /**
392
391
  * Enforce template literal expressions to be of string type ✅ 💭
393
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/restrict-template-expressions.md
392
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/restrict-template-expressions.md
394
393
  */
395
394
  "@typescript-eslint/restrict-template-expressions": "error",
396
395
  /**
397
396
  * Enforces that members of a type union/intersection are sorted alphabetically 🔧
398
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md
397
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md
399
398
  */
400
399
  "@typescript-eslint/sort-type-union-intersection-members": "error",
401
400
  /**
402
401
  * Restricts the types allowed in boolean expressions 🔧 💭
403
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md
402
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md
404
403
  */
405
404
  "@typescript-eslint/strict-boolean-expressions": "error",
406
405
  /**
407
406
  * Exhaustiveness checking in switch with union type 💭
408
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md
407
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md
409
408
  */
410
409
  "@typescript-eslint/switch-exhaustiveness-check": "error",
411
410
  /**
412
411
  * Sets preference level for triple slash directives versus ES6-style import declarations ✅
413
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/triple-slash-reference.md
412
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/triple-slash-reference.md
414
413
  */
415
414
  "@typescript-eslint/triple-slash-reference": "error",
416
415
  /**
417
416
  * Require consistent spacing around type annotations 🔧
418
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/type-annotation-spacing.md
417
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/type-annotation-spacing.md
419
418
  */
420
419
  "@typescript-eslint/type-annotation-spacing": "error",
421
420
  /**
422
421
  * Requires type annotations to exist
423
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/typedef.md
422
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/typedef.md
424
423
  */
425
424
  "@typescript-eslint/typedef": "off",
426
425
  /**
427
426
  * Enforces unbound methods are called with their expected scope ✅ 💭
428
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/unbound-method.md
427
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/unbound-method.md
429
428
  */
430
429
  "@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
431
430
  /**
432
431
  * Warns for any two overloads that could be unified into
433
432
  * one by using a union or an optional/rest parameter
434
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/unified-signatures.md
433
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/unified-signatures.md
435
434
  */
436
- "@typescript-eslint/unified-signatures": "error",
435
+ "@typescript-eslint/unified-signatures": "warn",
437
436
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spscommerce/eslint-config-typescript",
3
- "version": "0.0.7",
3
+ "version": "0.0.10",
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/javascript.git"
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/javascript/issues"
30
+ "url": "https://github.com/SPSCommerce/typescript/issues"
31
31
  },
32
- "homepage": "https://github.com/SPSCommerce/javascript",
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
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "../../../tsconfig.json",
2
+ "extends": "../tsconfig.json",
3
3
  "compilerOptions": {
4
4
  "module": "commonjs",
5
5
  "outDir": "lib"