@josundt/eslint-config 5.7.3 → 5.8.0
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 +13 -13
- package/rules/typescript-eslint/rules.js +28 -15
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@josundt/eslint-config",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.8.0",
|
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.5.3",
|
45
|
+
"@eslint/js": "9.21.0",
|
46
|
+
"@typescript-eslint/eslint-plugin": "8.26.0",
|
47
|
+
"@typescript-eslint/parser": "8.26.0",
|
48
|
+
"eslint": "9.21.0",
|
49
49
|
"eslint-formatter-visualstudio": "8.40.0",
|
50
|
-
"eslint-import-resolver-typescript": "3.
|
50
|
+
"eslint-import-resolver-typescript": "3.8.3",
|
51
51
|
"eslint-plugin-eslint-comments": "3.2.0",
|
52
52
|
"eslint-plugin-import": "2.31.0",
|
53
53
|
"eslint-plugin-jasmine": "4.2.2",
|
54
|
-
"eslint-plugin-jest": "28.
|
55
|
-
"eslint-plugin-jsdoc": "50.6.
|
56
|
-
"eslint-plugin-prettier": "5.2.
|
57
|
-
"eslint-plugin-unicorn": "
|
54
|
+
"eslint-plugin-jest": "28.11.0",
|
55
|
+
"eslint-plugin-jsdoc": "50.6.3",
|
56
|
+
"eslint-plugin-prettier": "5.2.3",
|
57
|
+
"eslint-plugin-unicorn": "57.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",
|
@@ -302,13 +313,15 @@ const rules = {
|
|
302
313
|
"strict-boolean-expressions": [
|
303
314
|
"off",
|
304
315
|
{
|
305
|
-
|
306
|
-
|
316
|
+
allowAny: false,
|
317
|
+
allowNullableBoolean: true,
|
318
|
+
allowNullableEnum: true,
|
319
|
+
allowNullableNumber: true,
|
307
320
|
allowNullableObject: true,
|
308
321
|
allowNullableString: true,
|
309
|
-
|
310
|
-
|
311
|
-
|
322
|
+
allowNumber: true,
|
323
|
+
allowString: true
|
324
|
+
//allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
312
325
|
}
|
313
326
|
],
|
314
327
|
"switch-exhaustiveness-check": [
|