@neralabs/rerail-pack-typescript 0.1.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.
Files changed (31) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +8 -0
  3. package/README.md +36 -0
  4. package/licenses/eslint-plugin-vitest/LICENSE +21 -0
  5. package/licenses/eslint-plugin-vitest/UPSTREAM.md +103 -0
  6. package/licenses/typescript-eslint/LICENSE +21 -0
  7. package/licenses/typescript-eslint/UPSTREAM.md +1607 -0
  8. package/pack.json +189 -0
  9. package/package.json +30 -0
  10. package/rules/typescript-eslint-ban-tslint-comment.json +33 -0
  11. package/rules/typescript-eslint-consistent-type-definitions.json +1 -0
  12. package/rules/typescript-eslint-default-param-last.json +55 -0
  13. package/rules/typescript-eslint-no-array-constructor.json +238 -0
  14. package/rules/typescript-eslint-no-confusing-non-null-assertion.json +190 -0
  15. package/rules/typescript-eslint-no-dupe-class-members.json +1 -0
  16. package/rules/typescript-eslint-no-duplicate-enum-values.json +178 -0
  17. package/rules/typescript-eslint-no-empty-function.json +1 -0
  18. package/rules/typescript-eslint-no-extra-non-null-assertion.json +84 -0
  19. package/rules/typescript-eslint-no-import-type-side-effects.json +336 -0
  20. package/rules/typescript-eslint-no-namespace.json +157 -0
  21. package/rules/typescript-eslint-no-non-null-asserted-optional-chain.json +173 -0
  22. package/rules/typescript-eslint-no-non-null-assertion.json +195 -0
  23. package/rules/typescript-eslint-no-unnecessary-type-constraint.json +66 -0
  24. package/rules/typescript-eslint-no-unsafe-function-type.json +50 -0
  25. package/rules/typescript-eslint-no-unused-expressions.json +1 -0
  26. package/rules/typescript-eslint-no-useless-empty-export.json +38 -0
  27. package/rules/typescript-eslint-no-wrapper-object-types.json +568 -0
  28. package/rules/typescript-eslint-prefer-as-const.json +224 -0
  29. package/rules/typescript-eslint-prefer-enum-initializers.json +26 -0
  30. package/rules/typescript-eslint-prefer-literal-enum-member.json +1 -0
  31. package/rules/typescript-eslint-prefer-namespace-keyword.json +98 -0
@@ -0,0 +1,568 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "typescript-eslint-no-wrapper-object-types",
4
+ "revision": 1,
5
+ "mode": "steer",
6
+ "description": "typescript-eslint 8.70.1 @typescript-eslint/no-wrapper-object-types, default options. Port of typescript-eslint's `no-wrapper-object-types` rule (https://typescript-eslint.io/rules/no-wrapper-object-types). Flags type references, `implements` and interface `extends` naming BigInt/Boolean/Number/Object/String/Symbol when the name `resolves` to no file-local type binding. Type references are fixed to the lowercase primitive.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*.ts",
10
+ "**/*.tsx",
11
+ "**/*.mts",
12
+ "**/*.cts",
13
+ "**/*.js",
14
+ "**/*.jsx",
15
+ "**/*.mjs",
16
+ "**/*.cjs"
17
+ ],
18
+ "exclude": []
19
+ },
20
+ "clauses": [
21
+ {
22
+ "id": "type-bigint",
23
+ "forbid": {
24
+ "ast": {
25
+ "language": "typescript",
26
+ "rule": {
27
+ "kind": "type_identifier",
28
+ "resolves": {
29
+ "global": [
30
+ "BigInt"
31
+ ]
32
+ },
33
+ "not": {
34
+ "matches": "heritage"
35
+ }
36
+ },
37
+ "utils": {
38
+ "heritage": {
39
+ "inside": {
40
+ "any": [
41
+ {
42
+ "kind": "implements_clause"
43
+ },
44
+ {
45
+ "kind": "extends_type_clause"
46
+ }
47
+ ],
48
+ "stopBy": "neighbor"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ },
54
+ "violation": {
55
+ "anchor": "witness.span",
56
+ "code": "@typescript-eslint/no-wrapper-object-types",
57
+ "message": "Prefer using the primitive `bigint` as a type name, rather than the upper-cased `BigInt`.",
58
+ "fix": "bigint",
59
+ "suppress": {
60
+ "eslint": {
61
+ "rules": [
62
+ "@typescript-eslint/no-wrapper-object-types"
63
+ ]
64
+ }
65
+ }
66
+ }
67
+ },
68
+ {
69
+ "id": "type-boolean",
70
+ "forbid": {
71
+ "ast": {
72
+ "language": "typescript",
73
+ "rule": {
74
+ "kind": "type_identifier",
75
+ "resolves": {
76
+ "global": [
77
+ "Boolean"
78
+ ]
79
+ },
80
+ "not": {
81
+ "matches": "heritage"
82
+ }
83
+ },
84
+ "utils": {
85
+ "heritage": {
86
+ "inside": {
87
+ "any": [
88
+ {
89
+ "kind": "implements_clause"
90
+ },
91
+ {
92
+ "kind": "extends_type_clause"
93
+ }
94
+ ],
95
+ "stopBy": "neighbor"
96
+ }
97
+ }
98
+ }
99
+ }
100
+ },
101
+ "violation": {
102
+ "anchor": "witness.span",
103
+ "code": "@typescript-eslint/no-wrapper-object-types",
104
+ "message": "Prefer using the primitive `boolean` as a type name, rather than the upper-cased `Boolean`.",
105
+ "fix": "boolean",
106
+ "suppress": {
107
+ "eslint": {
108
+ "rules": [
109
+ "@typescript-eslint/no-wrapper-object-types"
110
+ ]
111
+ }
112
+ }
113
+ }
114
+ },
115
+ {
116
+ "id": "type-number",
117
+ "forbid": {
118
+ "ast": {
119
+ "language": "typescript",
120
+ "rule": {
121
+ "kind": "type_identifier",
122
+ "resolves": {
123
+ "global": [
124
+ "Number"
125
+ ]
126
+ },
127
+ "not": {
128
+ "matches": "heritage"
129
+ }
130
+ },
131
+ "utils": {
132
+ "heritage": {
133
+ "inside": {
134
+ "any": [
135
+ {
136
+ "kind": "implements_clause"
137
+ },
138
+ {
139
+ "kind": "extends_type_clause"
140
+ }
141
+ ],
142
+ "stopBy": "neighbor"
143
+ }
144
+ }
145
+ }
146
+ }
147
+ },
148
+ "violation": {
149
+ "anchor": "witness.span",
150
+ "code": "@typescript-eslint/no-wrapper-object-types",
151
+ "message": "Prefer using the primitive `number` as a type name, rather than the upper-cased `Number`.",
152
+ "fix": "number",
153
+ "suppress": {
154
+ "eslint": {
155
+ "rules": [
156
+ "@typescript-eslint/no-wrapper-object-types"
157
+ ]
158
+ }
159
+ }
160
+ }
161
+ },
162
+ {
163
+ "id": "type-object",
164
+ "forbid": {
165
+ "ast": {
166
+ "language": "typescript",
167
+ "rule": {
168
+ "kind": "type_identifier",
169
+ "resolves": {
170
+ "global": [
171
+ "Object"
172
+ ]
173
+ },
174
+ "not": {
175
+ "matches": "heritage"
176
+ }
177
+ },
178
+ "utils": {
179
+ "heritage": {
180
+ "inside": {
181
+ "any": [
182
+ {
183
+ "kind": "implements_clause"
184
+ },
185
+ {
186
+ "kind": "extends_type_clause"
187
+ }
188
+ ],
189
+ "stopBy": "neighbor"
190
+ }
191
+ }
192
+ }
193
+ }
194
+ },
195
+ "violation": {
196
+ "anchor": "witness.span",
197
+ "code": "@typescript-eslint/no-wrapper-object-types",
198
+ "message": "Prefer using the primitive `object` as a type name, rather than the upper-cased `Object`.",
199
+ "fix": "object",
200
+ "suppress": {
201
+ "eslint": {
202
+ "rules": [
203
+ "@typescript-eslint/no-wrapper-object-types"
204
+ ]
205
+ }
206
+ }
207
+ }
208
+ },
209
+ {
210
+ "id": "type-string",
211
+ "forbid": {
212
+ "ast": {
213
+ "language": "typescript",
214
+ "rule": {
215
+ "kind": "type_identifier",
216
+ "resolves": {
217
+ "global": [
218
+ "String"
219
+ ]
220
+ },
221
+ "not": {
222
+ "matches": "heritage"
223
+ }
224
+ },
225
+ "utils": {
226
+ "heritage": {
227
+ "inside": {
228
+ "any": [
229
+ {
230
+ "kind": "implements_clause"
231
+ },
232
+ {
233
+ "kind": "extends_type_clause"
234
+ }
235
+ ],
236
+ "stopBy": "neighbor"
237
+ }
238
+ }
239
+ }
240
+ }
241
+ },
242
+ "violation": {
243
+ "anchor": "witness.span",
244
+ "code": "@typescript-eslint/no-wrapper-object-types",
245
+ "message": "Prefer using the primitive `string` as a type name, rather than the upper-cased `String`.",
246
+ "fix": "string",
247
+ "suppress": {
248
+ "eslint": {
249
+ "rules": [
250
+ "@typescript-eslint/no-wrapper-object-types"
251
+ ]
252
+ }
253
+ }
254
+ }
255
+ },
256
+ {
257
+ "id": "type-symbol",
258
+ "forbid": {
259
+ "ast": {
260
+ "language": "typescript",
261
+ "rule": {
262
+ "kind": "type_identifier",
263
+ "resolves": {
264
+ "global": [
265
+ "Symbol"
266
+ ]
267
+ },
268
+ "not": {
269
+ "matches": "heritage"
270
+ }
271
+ },
272
+ "utils": {
273
+ "heritage": {
274
+ "inside": {
275
+ "any": [
276
+ {
277
+ "kind": "implements_clause"
278
+ },
279
+ {
280
+ "kind": "extends_type_clause"
281
+ }
282
+ ],
283
+ "stopBy": "neighbor"
284
+ }
285
+ }
286
+ }
287
+ }
288
+ },
289
+ "violation": {
290
+ "anchor": "witness.span",
291
+ "code": "@typescript-eslint/no-wrapper-object-types",
292
+ "message": "Prefer using the primitive `symbol` as a type name, rather than the upper-cased `Symbol`.",
293
+ "fix": "symbol",
294
+ "suppress": {
295
+ "eslint": {
296
+ "rules": [
297
+ "@typescript-eslint/no-wrapper-object-types"
298
+ ]
299
+ }
300
+ }
301
+ }
302
+ },
303
+ {
304
+ "id": "heritage-bigint",
305
+ "forbid": {
306
+ "ast": {
307
+ "language": "typescript",
308
+ "rule": {
309
+ "kind": "type_identifier",
310
+ "resolves": {
311
+ "global": [
312
+ "BigInt"
313
+ ]
314
+ },
315
+ "matches": "heritage"
316
+ },
317
+ "utils": {
318
+ "heritage": {
319
+ "inside": {
320
+ "any": [
321
+ {
322
+ "kind": "implements_clause"
323
+ },
324
+ {
325
+ "kind": "extends_type_clause"
326
+ }
327
+ ],
328
+ "stopBy": "neighbor"
329
+ }
330
+ }
331
+ }
332
+ }
333
+ },
334
+ "violation": {
335
+ "anchor": "witness.span",
336
+ "code": "@typescript-eslint/no-wrapper-object-types",
337
+ "message": "Prefer using the primitive `bigint` as a type name, rather than the upper-cased `BigInt`.",
338
+ "suppress": {
339
+ "eslint": {
340
+ "rules": [
341
+ "@typescript-eslint/no-wrapper-object-types"
342
+ ]
343
+ }
344
+ }
345
+ }
346
+ },
347
+ {
348
+ "id": "heritage-boolean",
349
+ "forbid": {
350
+ "ast": {
351
+ "language": "typescript",
352
+ "rule": {
353
+ "kind": "type_identifier",
354
+ "resolves": {
355
+ "global": [
356
+ "Boolean"
357
+ ]
358
+ },
359
+ "matches": "heritage"
360
+ },
361
+ "utils": {
362
+ "heritage": {
363
+ "inside": {
364
+ "any": [
365
+ {
366
+ "kind": "implements_clause"
367
+ },
368
+ {
369
+ "kind": "extends_type_clause"
370
+ }
371
+ ],
372
+ "stopBy": "neighbor"
373
+ }
374
+ }
375
+ }
376
+ }
377
+ },
378
+ "violation": {
379
+ "anchor": "witness.span",
380
+ "code": "@typescript-eslint/no-wrapper-object-types",
381
+ "message": "Prefer using the primitive `boolean` as a type name, rather than the upper-cased `Boolean`.",
382
+ "suppress": {
383
+ "eslint": {
384
+ "rules": [
385
+ "@typescript-eslint/no-wrapper-object-types"
386
+ ]
387
+ }
388
+ }
389
+ }
390
+ },
391
+ {
392
+ "id": "heritage-number",
393
+ "forbid": {
394
+ "ast": {
395
+ "language": "typescript",
396
+ "rule": {
397
+ "kind": "type_identifier",
398
+ "resolves": {
399
+ "global": [
400
+ "Number"
401
+ ]
402
+ },
403
+ "matches": "heritage"
404
+ },
405
+ "utils": {
406
+ "heritage": {
407
+ "inside": {
408
+ "any": [
409
+ {
410
+ "kind": "implements_clause"
411
+ },
412
+ {
413
+ "kind": "extends_type_clause"
414
+ }
415
+ ],
416
+ "stopBy": "neighbor"
417
+ }
418
+ }
419
+ }
420
+ }
421
+ },
422
+ "violation": {
423
+ "anchor": "witness.span",
424
+ "code": "@typescript-eslint/no-wrapper-object-types",
425
+ "message": "Prefer using the primitive `number` as a type name, rather than the upper-cased `Number`.",
426
+ "suppress": {
427
+ "eslint": {
428
+ "rules": [
429
+ "@typescript-eslint/no-wrapper-object-types"
430
+ ]
431
+ }
432
+ }
433
+ }
434
+ },
435
+ {
436
+ "id": "heritage-object",
437
+ "forbid": {
438
+ "ast": {
439
+ "language": "typescript",
440
+ "rule": {
441
+ "kind": "type_identifier",
442
+ "resolves": {
443
+ "global": [
444
+ "Object"
445
+ ]
446
+ },
447
+ "matches": "heritage"
448
+ },
449
+ "utils": {
450
+ "heritage": {
451
+ "inside": {
452
+ "any": [
453
+ {
454
+ "kind": "implements_clause"
455
+ },
456
+ {
457
+ "kind": "extends_type_clause"
458
+ }
459
+ ],
460
+ "stopBy": "neighbor"
461
+ }
462
+ }
463
+ }
464
+ }
465
+ },
466
+ "violation": {
467
+ "anchor": "witness.span",
468
+ "code": "@typescript-eslint/no-wrapper-object-types",
469
+ "message": "Prefer using the primitive `object` as a type name, rather than the upper-cased `Object`.",
470
+ "suppress": {
471
+ "eslint": {
472
+ "rules": [
473
+ "@typescript-eslint/no-wrapper-object-types"
474
+ ]
475
+ }
476
+ }
477
+ }
478
+ },
479
+ {
480
+ "id": "heritage-string",
481
+ "forbid": {
482
+ "ast": {
483
+ "language": "typescript",
484
+ "rule": {
485
+ "kind": "type_identifier",
486
+ "resolves": {
487
+ "global": [
488
+ "String"
489
+ ]
490
+ },
491
+ "matches": "heritage"
492
+ },
493
+ "utils": {
494
+ "heritage": {
495
+ "inside": {
496
+ "any": [
497
+ {
498
+ "kind": "implements_clause"
499
+ },
500
+ {
501
+ "kind": "extends_type_clause"
502
+ }
503
+ ],
504
+ "stopBy": "neighbor"
505
+ }
506
+ }
507
+ }
508
+ }
509
+ },
510
+ "violation": {
511
+ "anchor": "witness.span",
512
+ "code": "@typescript-eslint/no-wrapper-object-types",
513
+ "message": "Prefer using the primitive `string` as a type name, rather than the upper-cased `String`.",
514
+ "suppress": {
515
+ "eslint": {
516
+ "rules": [
517
+ "@typescript-eslint/no-wrapper-object-types"
518
+ ]
519
+ }
520
+ }
521
+ }
522
+ },
523
+ {
524
+ "id": "heritage-symbol",
525
+ "forbid": {
526
+ "ast": {
527
+ "language": "typescript",
528
+ "rule": {
529
+ "kind": "type_identifier",
530
+ "resolves": {
531
+ "global": [
532
+ "Symbol"
533
+ ]
534
+ },
535
+ "matches": "heritage"
536
+ },
537
+ "utils": {
538
+ "heritage": {
539
+ "inside": {
540
+ "any": [
541
+ {
542
+ "kind": "implements_clause"
543
+ },
544
+ {
545
+ "kind": "extends_type_clause"
546
+ }
547
+ ],
548
+ "stopBy": "neighbor"
549
+ }
550
+ }
551
+ }
552
+ }
553
+ },
554
+ "violation": {
555
+ "anchor": "witness.span",
556
+ "code": "@typescript-eslint/no-wrapper-object-types",
557
+ "message": "Prefer using the primitive `symbol` as a type name, rather than the upper-cased `Symbol`.",
558
+ "suppress": {
559
+ "eslint": {
560
+ "rules": [
561
+ "@typescript-eslint/no-wrapper-object-types"
562
+ ]
563
+ }
564
+ }
565
+ }
566
+ }
567
+ ]
568
+ }