@josundt/eslint-config 5.7.3 → 5.8.1
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/package.json +14 -14
- package/rules/typescript-eslint/rules.js +30 -15
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@josundt/eslint-config",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.8.1",
|
4
4
|
"description": "ESLint ruleset with required plugins for josundt TypeScript projects",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -38,25 +38,25 @@
|
|
38
38
|
"utils/**/*.js"
|
39
39
|
],
|
40
40
|
"peerDependencies": {
|
41
|
-
"typescript": ">=5.
|
41
|
+
"typescript": ">=5.8.2"
|
42
42
|
},
|
43
43
|
"dependencies": {
|
44
|
-
"@josundt/prettier-config": "^3.
|
45
|
-
"@eslint/js": "9.
|
46
|
-
"@typescript-eslint/eslint-plugin": "8.
|
47
|
-
"@typescript-eslint/parser": "8.
|
48
|
-
"eslint": "9.
|
44
|
+
"@josundt/prettier-config": "^3.6.2",
|
45
|
+
"@eslint/js": "9.31.0",
|
46
|
+
"@typescript-eslint/eslint-plugin": "8.38.0",
|
47
|
+
"@typescript-eslint/parser": "8.38.0",
|
48
|
+
"eslint": "9.31.0",
|
49
49
|
"eslint-formatter-visualstudio": "8.40.0",
|
50
|
-
"eslint-import-resolver-typescript": "
|
50
|
+
"eslint-import-resolver-typescript": "4.4.4",
|
51
51
|
"eslint-plugin-eslint-comments": "3.2.0",
|
52
|
-
"eslint-plugin-import": "2.
|
52
|
+
"eslint-plugin-import": "2.32.0",
|
53
53
|
"eslint-plugin-jasmine": "4.2.2",
|
54
|
-
"eslint-plugin-jest": "
|
55
|
-
"eslint-plugin-jsdoc": "
|
56
|
-
"eslint-plugin-prettier": "5.
|
57
|
-
"eslint-plugin-unicorn": "
|
54
|
+
"eslint-plugin-jest": "29.0.1",
|
55
|
+
"eslint-plugin-jsdoc": "51.4.1",
|
56
|
+
"eslint-plugin-prettier": "5.5.3",
|
57
|
+
"eslint-plugin-unicorn": "60.0.0"
|
58
58
|
},
|
59
59
|
"devDependencies": {
|
60
|
-
"@types/eslint__js": "
|
60
|
+
"@types/eslint__js": "9.14.0"
|
61
61
|
}
|
62
62
|
}
|
@@ -27,6 +27,7 @@ const rules = {
|
|
27
27
|
"consistent-type-assertions": [
|
28
28
|
"error",
|
29
29
|
{
|
30
|
+
arrayLiteralTypeAssertions: "allow",
|
30
31
|
assertionStyle: "as",
|
31
32
|
objectLiteralTypeAssertions: "allow"
|
32
33
|
}
|
@@ -70,9 +71,10 @@ const rules = {
|
|
70
71
|
{
|
71
72
|
allowArgumentsExplicitlyTypedAsAny: false,
|
72
73
|
allowDirectConstAssertionInArrowFunctions: true,
|
74
|
+
allowedNames: [],
|
73
75
|
allowHigherOrderFunctions: true,
|
74
|
-
|
75
|
-
|
76
|
+
allowOverloadFunctions: false,
|
77
|
+
allowTypedFunctionExpressions: true
|
76
78
|
}
|
77
79
|
],
|
78
80
|
"member-ordering": "off",
|
@@ -141,13 +143,15 @@ const rules = {
|
|
141
143
|
}
|
142
144
|
],
|
143
145
|
"no-extra-non-null-assertion": "error",
|
144
|
-
"no-extraneous-class": [
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
146
|
+
"no-extraneous-class": [
|
147
|
+
"error",
|
148
|
+
{
|
149
|
+
allowConstructorOnly: false, // Whether to allow extraneous classes that contain only a constructor.
|
150
|
+
allowEmpty: false, // Whether to allow extraeous classes that have no body (i.e. are empty).
|
151
|
+
allowStaticOnly: true, // Whether to allow extraneous classes that only contain static members.
|
152
|
+
allowWithDecorator: false // Whether to allow extraneous classes that include a decorator.
|
153
|
+
}
|
154
|
+
],
|
151
155
|
"no-floating-promises": "error", // Must be switched on to prevent promises not awaited
|
152
156
|
"no-for-in-array": "error",
|
153
157
|
"no-import-type-side-effects": "error",
|
@@ -175,6 +179,7 @@ const rules = {
|
|
175
179
|
// }
|
176
180
|
}
|
177
181
|
],
|
182
|
+
"no-misused-spread": "error",
|
178
183
|
"no-mixed-enums": "error",
|
179
184
|
"no-namespace": "off",
|
180
185
|
"no-non-null-asserted-nullish-coalescing": "error",
|
@@ -202,7 +207,13 @@ const rules = {
|
|
202
207
|
"no-unsafe-enum-comparison": "error",
|
203
208
|
"no-unsafe-unary-minus": "error",
|
204
209
|
"no-this-alias": "error",
|
205
|
-
"no-unnecessary-boolean-literal-compare":
|
210
|
+
"no-unnecessary-boolean-literal-compare": [
|
211
|
+
"error",
|
212
|
+
{
|
213
|
+
allowComparingNullableBooleansToFalse: true,
|
214
|
+
allowComparingNullableBooleansToTrue: true
|
215
|
+
}
|
216
|
+
],
|
206
217
|
"no-unnecessary-condition": "off", // allow runtime null checks etc even if reported not necessary by type system
|
207
218
|
"no-unnecessary-parameter-property-assignment": "error",
|
208
219
|
"no-unnecessary-qualifier": "error",
|
@@ -218,6 +229,7 @@ const rules = {
|
|
218
229
|
"no-unsafe-type-assertion": "off", // This rule will be difficult to enable because we sometimes need to force a type assertion
|
219
230
|
"no-useless-empty-export": "error",
|
220
231
|
"no-unnecessary-template-expression": "error",
|
232
|
+
"no-unnecessary-type-conversion": "error",
|
221
233
|
"no-var-requires": "error",
|
222
234
|
"non-nullable-type-assertion-style": "error",
|
223
235
|
"only-throw-error": [
|
@@ -251,6 +263,7 @@ const rules = {
|
|
251
263
|
ignoreTernaryTests: false,
|
252
264
|
ignoreMixedLogicalExpressions: false,
|
253
265
|
ignoreBooleanCoercion: false,
|
266
|
+
ignoreIfStatements: false,
|
254
267
|
ignorePrimitives: {
|
255
268
|
string: false,
|
256
269
|
number: false,
|
@@ -302,13 +315,15 @@ const rules = {
|
|
302
315
|
"strict-boolean-expressions": [
|
303
316
|
"off",
|
304
317
|
{
|
305
|
-
|
306
|
-
|
318
|
+
allowAny: false,
|
319
|
+
allowNullableBoolean: true,
|
320
|
+
allowNullableEnum: true,
|
321
|
+
allowNullableNumber: true,
|
307
322
|
allowNullableObject: true,
|
308
323
|
allowNullableString: true,
|
309
|
-
|
310
|
-
|
311
|
-
|
324
|
+
allowNumber: true,
|
325
|
+
allowString: true
|
326
|
+
//allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
312
327
|
}
|
313
328
|
],
|
314
329
|
"switch-exhaustiveness-check": [
|