@josundt/eslint-config 5.7.2 → 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 -9
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,7 +143,15 @@ const rules = {
|
|
141
143
|
}
|
142
144
|
],
|
143
145
|
"no-extra-non-null-assertion": "error",
|
144
|
-
"no-extraneous-class":
|
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
|
+
],
|
145
155
|
"no-floating-promises": "error", // Must be switched on to prevent promises not awaited
|
146
156
|
"no-for-in-array": "error",
|
147
157
|
"no-import-type-side-effects": "error",
|
@@ -169,6 +179,7 @@ const rules = {
|
|
169
179
|
// }
|
170
180
|
}
|
171
181
|
],
|
182
|
+
"no-misused-spread": "error",
|
172
183
|
"no-mixed-enums": "error",
|
173
184
|
"no-namespace": "off",
|
174
185
|
"no-non-null-asserted-nullish-coalescing": "error",
|
@@ -196,7 +207,13 @@ const rules = {
|
|
196
207
|
"no-unsafe-enum-comparison": "error",
|
197
208
|
"no-unsafe-unary-minus": "error",
|
198
209
|
"no-this-alias": "error",
|
199
|
-
"no-unnecessary-boolean-literal-compare":
|
210
|
+
"no-unnecessary-boolean-literal-compare": [
|
211
|
+
"error",
|
212
|
+
{
|
213
|
+
allowComparingNullableBooleansToFalse: true,
|
214
|
+
allowComparingNullableBooleansToTrue: true
|
215
|
+
}
|
216
|
+
],
|
200
217
|
"no-unnecessary-condition": "off", // allow runtime null checks etc even if reported not necessary by type system
|
201
218
|
"no-unnecessary-parameter-property-assignment": "error",
|
202
219
|
"no-unnecessary-qualifier": "error",
|
@@ -296,13 +313,15 @@ const rules = {
|
|
296
313
|
"strict-boolean-expressions": [
|
297
314
|
"off",
|
298
315
|
{
|
299
|
-
|
300
|
-
|
316
|
+
allowAny: false,
|
317
|
+
allowNullableBoolean: true,
|
318
|
+
allowNullableEnum: true,
|
319
|
+
allowNullableNumber: true,
|
301
320
|
allowNullableObject: true,
|
302
321
|
allowNullableString: true,
|
303
|
-
|
304
|
-
|
305
|
-
|
322
|
+
allowNumber: true,
|
323
|
+
allowString: true
|
324
|
+
//allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
306
325
|
}
|
307
326
|
],
|
308
327
|
"switch-exhaustiveness-check": [
|