eslint-config-typed 4.0.5 → 4.0.7

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.
Files changed (58) hide show
  1. package/dist/plugins/react-coding-style/rules/display-name.d.mts +2 -2
  2. package/dist/plugins/react-coding-style/rules/display-name.d.mts.map +1 -1
  3. package/dist/plugins/react-coding-style/rules/display-name.mjs +110 -30
  4. package/dist/plugins/react-coding-style/rules/display-name.mjs.map +1 -1
  5. package/dist/plugins/react-coding-style/rules/rules.d.mts +2 -2
  6. package/dist/rules/eslint-react-coding-style-rules.d.mts +1 -3
  7. package/dist/rules/eslint-react-coding-style-rules.d.mts.map +1 -1
  8. package/dist/rules/eslint-react-coding-style-rules.mjs +1 -1
  9. package/dist/rules/eslint-react-coding-style-rules.mjs.map +1 -1
  10. package/dist/rules/eslint-react-rules.d.mts +1 -1
  11. package/dist/rules/eslint-react-rules.mjs +1 -1
  12. package/dist/rules/eslint-react-rules.mjs.map +1 -1
  13. package/dist/types/rules/eslint-cypress-rules.d.mts +2 -2
  14. package/dist/types/rules/eslint-import-rules.d.mts +214 -168
  15. package/dist/types/rules/eslint-import-rules.d.mts.map +1 -1
  16. package/dist/types/rules/eslint-jest-rules.d.mts +47 -45
  17. package/dist/types/rules/eslint-jest-rules.d.mts.map +1 -1
  18. package/dist/types/rules/eslint-playwright-rules.d.mts +41 -34
  19. package/dist/types/rules/eslint-playwright-rules.d.mts.map +1 -1
  20. package/dist/types/rules/eslint-prefer-arrow-functions-rules.d.mts +6 -2
  21. package/dist/types/rules/eslint-prefer-arrow-functions-rules.d.mts.map +1 -1
  22. package/dist/types/rules/eslint-react-coding-style-rules.d.mts +21 -6
  23. package/dist/types/rules/eslint-react-coding-style-rules.d.mts.map +1 -1
  24. package/dist/types/rules/eslint-react-rules.d.mts +208 -185
  25. package/dist/types/rules/eslint-react-rules.d.mts.map +1 -1
  26. package/dist/types/rules/eslint-rules.d.mts +1244 -1073
  27. package/dist/types/rules/eslint-rules.d.mts.map +1 -1
  28. package/dist/types/rules/eslint-stylistic-rules.d.mts +707 -619
  29. package/dist/types/rules/eslint-stylistic-rules.d.mts.map +1 -1
  30. package/dist/types/rules/eslint-ts-restrictions-rules.d.mts +94 -76
  31. package/dist/types/rules/eslint-ts-restrictions-rules.d.mts.map +1 -1
  32. package/dist/types/rules/eslint-unicorn-rules.d.mts +145 -121
  33. package/dist/types/rules/eslint-unicorn-rules.d.mts.map +1 -1
  34. package/dist/types/rules/eslint-vitest-rules.d.mts +43 -42
  35. package/dist/types/rules/eslint-vitest-rules.d.mts.map +1 -1
  36. package/dist/types/rules/typescript-eslint-rules.d.mts +1973 -1763
  37. package/dist/types/rules/typescript-eslint-rules.d.mts.map +1 -1
  38. package/package.json +58 -57
  39. package/src/plugins/react-coding-style/README.md +4 -3
  40. package/src/plugins/react-coding-style/rules/display-name.mts +160 -38
  41. package/src/plugins/react-coding-style/rules/display-name.test.mts +70 -6
  42. package/src/plugins/react-coding-style/rules/shared.test.mts +148 -0
  43. package/src/plugins/vitest-coding-style/rules/original-assert-api-type.test.mts +147 -143
  44. package/src/rules/eslint-react-coding-style-rules.mts +1 -1
  45. package/src/rules/eslint-react-rules.mts +1 -1
  46. package/src/types/rules/eslint-cypress-rules.mts +2 -2
  47. package/src/types/rules/eslint-import-rules.mts +214 -168
  48. package/src/types/rules/eslint-jest-rules.mts +47 -45
  49. package/src/types/rules/eslint-playwright-rules.mts +41 -34
  50. package/src/types/rules/eslint-prefer-arrow-functions-rules.mts +6 -2
  51. package/src/types/rules/eslint-react-coding-style-rules.mts +21 -6
  52. package/src/types/rules/eslint-react-rules.mts +208 -185
  53. package/src/types/rules/eslint-rules.mts +1229 -1058
  54. package/src/types/rules/eslint-stylistic-rules.mts +707 -619
  55. package/src/types/rules/eslint-ts-restrictions-rules.mts +94 -76
  56. package/src/types/rules/eslint-unicorn-rules.mts +145 -121
  57. package/src/types/rules/eslint-vitest-rules.mts +43 -42
  58. package/src/types/rules/typescript-eslint-rules.mts +1973 -1763
@@ -184,7 +184,8 @@ namespace BanUseImperativeHandleHook {
184
184
  }
185
185
 
186
186
  /**
187
- * Require displayName property for React components created with React.memo
187
+ * Require React.memo components to define displayName matching the component
188
+ * name
188
189
  *
189
190
  * ```md
190
191
  * | key | value |
@@ -202,9 +203,20 @@ namespace DisplayName {
202
203
  * {
203
204
  * "type": "object",
204
205
  * "properties": {
205
- * "ignoreTranspilerName": {
206
- * "type": "boolean",
207
- * "description": "When true, ignores components that get displayName from variable name"
206
+ * "ignoreName": {
207
+ * "description": "Component names allowed to have displayName different from the variable name.",
208
+ * "oneOf": [
209
+ * {
210
+ * "type": "string"
211
+ * },
212
+ * {
213
+ * "type": "array",
214
+ * "items": {
215
+ * "type": "string"
216
+ * },
217
+ * "minItems": 0
218
+ * }
219
+ * ]
208
220
  * }
209
221
  * },
210
222
  * "additionalProperties": false
@@ -213,8 +225,11 @@ namespace DisplayName {
213
225
  * ```
214
226
  */
215
227
  export type Options = Readonly<{
216
- /** When true, ignores components that get displayName from variable name */
217
- ignoreTranspilerName?: boolean;
228
+ /**
229
+ * Component names allowed to have displayName different from the variable
230
+ * name.
231
+ */
232
+ ignoreName?: string | readonly string[];
218
233
  }>;
219
234
 
220
235
  export type RuleEntry =
@@ -930,71 +930,77 @@ namespace JsxBooleanValue {
930
930
  * ### schema
931
931
  *
932
932
  * ```json
933
- * {
934
- * "anyOf": [
935
- * {
936
- * "type": "array",
937
- * "items": [
938
- * {
939
- * "enum": ["always", "never"]
940
- * }
941
- * ],
942
- * "additionalItems": false
943
- * },
944
- * {
945
- * "type": "array",
946
- * "items": [
947
- * {
948
- * "enum": ["always"]
949
- * },
950
- * {
951
- * "type": "object",
952
- * "additionalProperties": false,
953
- * "properties": {
954
- * "never": {
955
- * "type": "array",
956
- * "items": {
957
- * "type": "string",
958
- * "minLength": 1
933
+ * [
934
+ * {
935
+ * "anyOf": [
936
+ * {
937
+ * "type": "array",
938
+ * "items": [],
939
+ * "additionalItems": false,
940
+ * "minItems": 0,
941
+ * "maxItems": 0
942
+ * },
943
+ * {
944
+ * "type": "array",
945
+ * "items": [
946
+ * {
947
+ * "enum": [
948
+ * "always"
949
+ * ]
950
+ * },
951
+ * {
952
+ * "type": "object",
953
+ * "additionalProperties": false,
954
+ * "properties": {
955
+ * "never": {
956
+ * "type": "array",
957
+ * "items": {
958
+ * "type": "string",
959
+ * "minLength": 1
960
+ * },
961
+ * "uniqueItems": true
959
962
  * },
960
- * "uniqueItems": true
961
- * },
962
- * "assumeUndefinedIsFalse": {
963
- * "type": "boolean"
963
+ * "assumeUndefinedIsFalse": {
964
+ * "type": "boolean"
965
+ * }
964
966
  * }
965
967
  * }
966
- * }
967
- * ],
968
- * "additionalItems": false
969
- * },
970
- * {
971
- * "type": "array",
972
- * "items": [
973
- * {
974
- * "enum": ["never"]
975
- * },
976
- * {
977
- * "type": "object",
978
- * "additionalProperties": false,
979
- * "properties": {
980
- * "always": {
981
- * "type": "array",
982
- * "items": {
983
- * "type": "string",
984
- * "minLength": 1
968
+ * ],
969
+ * "additionalItems": false,
970
+ * "minItems": 1
971
+ * },
972
+ * {
973
+ * "type": "array",
974
+ * "items": [
975
+ * {
976
+ * "enum": [
977
+ * "never"
978
+ * ]
979
+ * },
980
+ * {
981
+ * "type": "object",
982
+ * "additionalProperties": false,
983
+ * "properties": {
984
+ * "always": {
985
+ * "type": "array",
986
+ * "items": {
987
+ * "type": "string",
988
+ * "minLength": 1
989
+ * },
990
+ * "uniqueItems": true
985
991
  * },
986
- * "uniqueItems": true
987
- * },
988
- * "assumeUndefinedIsFalse": {
989
- * "type": "boolean"
992
+ * "assumeUndefinedIsFalse": {
993
+ * "type": "boolean"
994
+ * }
990
995
  * }
991
996
  * }
992
- * }
993
- * ],
994
- * "additionalItems": false
995
- * }
996
- * ]
997
- * }
997
+ * ],
998
+ * "additionalItems": false,
999
+ * "minItems": 1
1000
+ * }
1001
+ * ]
1002
+ * }
1003
+ * ]
998
1004
  * ```
999
1005
  */
1000
1006
  export type Options =
@@ -1218,84 +1224,98 @@ namespace JsxCurlySpacing {
1218
1224
  * ### schema
1219
1225
  *
1220
1226
  * ```json
1221
- * {
1222
- * "definitions": {
1223
- * "basicConfig": {
1224
- * "type": "object",
1225
- * "properties": {
1226
- * "when": {
1227
- * "enum": ["always", "never"]
1228
- * },
1229
- * "allowMultiline": {
1230
- * "type": "boolean"
1231
- * },
1232
- * "spacing": {
1233
- * "type": "object",
1234
- * "properties": {
1235
- * "objectLiterals": {
1236
- * "enum": ["always", "never"]
1227
+ * [
1228
+ * {
1229
+ * "definitions": {
1230
+ * "basicConfig": {
1231
+ * "type": "object",
1232
+ * "properties": {
1233
+ * "when": {
1234
+ * "enum": [
1235
+ * "always",
1236
+ * "never"
1237
+ * ]
1238
+ * },
1239
+ * "allowMultiline": {
1240
+ * "type": "boolean"
1241
+ * },
1242
+ * "spacing": {
1243
+ * "type": "object",
1244
+ * "properties": {
1245
+ * "objectLiterals": {
1246
+ * "enum": [
1247
+ * "always",
1248
+ * "never"
1249
+ * ]
1250
+ * }
1237
1251
  * }
1238
1252
  * }
1239
1253
  * }
1254
+ * },
1255
+ * "basicConfigOrBoolean": {
1256
+ * "anyOf": [
1257
+ * {
1258
+ * "$ref": "#/definitions/basicConfig"
1259
+ * },
1260
+ * {
1261
+ * "type": "boolean"
1262
+ * }
1263
+ * ]
1240
1264
  * }
1241
1265
  * },
1242
- * "basicConfigOrBoolean": {
1243
- * "anyOf": [
1244
- * {
1245
- * "$ref": "#/definitions/basicConfig"
1246
- * },
1247
- * {
1248
- * "type": "boolean"
1249
- * }
1250
- * ]
1251
- * }
1252
- * },
1253
- * "type": "array",
1254
- * "items": [
1255
- * {
1256
- * "anyOf": [
1257
- * {
1258
- * "allOf": [
1259
- * {
1260
- * "$ref": "#/definitions/basicConfig"
1261
- * },
1262
- * {
1263
- * "type": "object",
1264
- * "properties": {
1265
- * "attributes": {
1266
- * "$ref": "#/definitions/basicConfigOrBoolean"
1267
- * },
1268
- * "children": {
1269
- * "$ref": "#/definitions/basicConfigOrBoolean"
1266
+ * "type": "array",
1267
+ * "items": [
1268
+ * {
1269
+ * "anyOf": [
1270
+ * {
1271
+ * "allOf": [
1272
+ * {
1273
+ * "$ref": "#/definitions/basicConfig"
1274
+ * },
1275
+ * {
1276
+ * "type": "object",
1277
+ * "properties": {
1278
+ * "attributes": {
1279
+ * "$ref": "#/definitions/basicConfigOrBoolean"
1280
+ * },
1281
+ * "children": {
1282
+ * "$ref": "#/definitions/basicConfigOrBoolean"
1283
+ * }
1270
1284
  * }
1271
1285
  * }
1272
- * }
1273
- * ]
1274
- * },
1275
- * {
1276
- * "enum": ["always", "never"]
1277
- * }
1278
- * ]
1279
- * },
1280
- * {
1281
- * "type": "object",
1282
- * "properties": {
1283
- * "allowMultiline": {
1284
- * "type": "boolean"
1285
- * },
1286
- * "spacing": {
1287
- * "type": "object",
1288
- * "properties": {
1289
- * "objectLiterals": {
1290
- * "enum": ["always", "never"]
1291
- * }
1286
+ * ]
1287
+ * },
1288
+ * {
1289
+ * "enum": [
1290
+ * "always",
1291
+ * "never"
1292
+ * ]
1292
1293
  * }
1293
- * }
1294
+ * ]
1294
1295
  * },
1295
- * "additionalProperties": false
1296
- * }
1297
- * ]
1298
- * }
1296
+ * {
1297
+ * "type": "object",
1298
+ * "properties": {
1299
+ * "allowMultiline": {
1300
+ * "type": "boolean"
1301
+ * },
1302
+ * "spacing": {
1303
+ * "type": "object",
1304
+ * "properties": {
1305
+ * "objectLiterals": {
1306
+ * "enum": [
1307
+ * "always",
1308
+ * "never"
1309
+ * ]
1310
+ * }
1311
+ * }
1312
+ * }
1313
+ * },
1314
+ * "additionalProperties": false
1315
+ * }
1316
+ * ]
1317
+ * }
1318
+ * ]
1299
1319
  * ```
1300
1320
  */
1301
1321
  export type Options =
@@ -2404,61 +2424,66 @@ namespace JsxNoScriptUrl {
2404
2424
  * ### schema
2405
2425
  *
2406
2426
  * ```json
2407
- * {
2408
- * "anyOf": [
2409
- * {
2410
- * "type": "array",
2411
- * "items": [
2412
- * {
2413
- * "type": "array",
2414
- * "uniqueItems": true,
2415
- * "items": {
2427
+ * [
2428
+ * {
2429
+ * "anyOf": [
2430
+ * {
2431
+ * "type": "array",
2432
+ * "items": [
2433
+ * {
2434
+ * "type": "array",
2435
+ * "uniqueItems": true,
2436
+ * "items": {
2437
+ * "type": "object",
2438
+ * "properties": {
2439
+ * "name": {
2440
+ * "type": "string"
2441
+ * },
2442
+ * "props": {
2443
+ * "type": "array",
2444
+ * "items": {
2445
+ * "type": "string",
2446
+ * "uniqueItems": true
2447
+ * }
2448
+ * }
2449
+ * },
2450
+ * "required": [
2451
+ * "name",
2452
+ * "props"
2453
+ * ],
2454
+ * "additionalProperties": false
2455
+ * }
2456
+ * },
2457
+ * {
2416
2458
  * "type": "object",
2417
2459
  * "properties": {
2418
- * "name": {
2419
- * "type": "string"
2420
- * },
2421
- * "props": {
2422
- * "type": "array",
2423
- * "items": {
2424
- * "type": "string",
2425
- * "uniqueItems": true
2426
- * }
2460
+ * "includeFromSettings": {
2461
+ * "type": "boolean"
2427
2462
  * }
2428
2463
  * },
2429
- * "required": ["name", "props"],
2430
- * "additionalProperties": false
2464
+ * "additionalItems": false
2431
2465
  * }
2432
- * },
2433
- * {
2434
- * "type": "object",
2435
- * "properties": {
2436
- * "includeFromSettings": {
2437
- * "type": "boolean"
2438
- * }
2439
- * },
2440
- * "additionalItems": false
2441
- * }
2442
- * ],
2443
- * "additionalItems": false
2444
- * },
2445
- * {
2446
- * "type": "array",
2447
- * "items": [
2448
- * {
2449
- * "type": "object",
2450
- * "properties": {
2451
- * "includeFromSettings": {
2452
- * "type": "boolean"
2453
- * }
2454
- * },
2455
- * "additionalItems": false
2456
- * }
2457
- * ],
2458
- * "additionalItems": false
2459
- * }
2460
- * ]
2461
- * }
2466
+ * ],
2467
+ * "additionalItems": false
2468
+ * },
2469
+ * {
2470
+ * "type": "array",
2471
+ * "items": [
2472
+ * {
2473
+ * "type": "object",
2474
+ * "properties": {
2475
+ * "includeFromSettings": {
2476
+ * "type": "boolean"
2477
+ * }
2478
+ * },
2479
+ * "additionalItems": false
2480
+ * }
2481
+ * ],
2482
+ * "additionalItems": false
2483
+ * }
2484
+ * ]
2485
+ * }
2486
+ * ]
2462
2487
  * ```
2463
2488
  */
2464
2489
  export type Options =
@@ -2793,14 +2818,12 @@ namespace JsxPascalCase {
2793
2818
  * "type": "boolean"
2794
2819
  * },
2795
2820
  * "ignore": {
2796
- * "items": [
2797
- * {
2798
- * "type": "string"
2799
- * }
2800
- * ],
2801
2821
  * "minItems": 0,
2802
2822
  * "type": "array",
2803
- * "uniqueItems": true
2823
+ * "uniqueItems": true,
2824
+ * "items": {
2825
+ * "type": "string"
2826
+ * }
2804
2827
  * }
2805
2828
  * },
2806
2829
  * "additionalProperties": false
@@ -2813,7 +2836,7 @@ namespace JsxPascalCase {
2813
2836
  allowLeadingUnderscore?: boolean;
2814
2837
  allowNamespace?: boolean;
2815
2838
  /** @minItems 0 */
2816
- ignore?: readonly [] | readonly [string];
2839
+ ignore?: readonly string[];
2817
2840
  }>;
2818
2841
 
2819
2842
  export type RuleEntry =