vize 0.747.0 → 0.749.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/dist/{config-WBDk9f44.d.mts → config-BTQCamgc.d.mts} +349 -1
- package/dist/config-BTQCamgc.d.mts.map +1 -0
- package/dist/{config-8YaAzL3p.mjs → config-CDRIaXKp.mjs} +2 -2
- package/dist/config-CDRIaXKp.mjs.map +1 -0
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
- package/pkl/LintRuleOptionTypes.pkl +147 -0
- package/pkl/LinterConfig.pkl +19 -0
- package/pkl/jsonschema/LintRuleOptionsSchemaDefinitions.pkl +22 -0
- package/pkl/jsonschema/TypeAwareRuleOptions.pkl +396 -0
- package/pkl/jsonschema/TypeAwareRuleOptionsMToO.pkl +400 -0
- package/pkl/jsonschema/TypeAwareRuleOptionsPToU.pkl +338 -0
- package/pkl/vize.pkl +22 -15
- package/schemas/vize.config.schema.json +1096 -0
- package/src/types/generated.ts +388 -0
- package/virtual-ts.d.cts +9 -5
- package/virtual-ts.d.mts +9 -5
- package/virtual-ts.d.ts +9 -5
- package/dist/config-8YaAzL3p.mjs.map +0 -1
- package/dist/config-WBDk9f44.d.mts.map +0 -1
package/src/types/generated.ts
CHANGED
|
@@ -376,6 +376,394 @@ export interface LintRuleOptions {
|
|
|
376
376
|
version?: string;
|
|
377
377
|
ignores?: string[];
|
|
378
378
|
};
|
|
379
|
+
"type/await-thenable"?: {
|
|
380
|
+
/**
|
|
381
|
+
* Whether to allow promise aggregators to receive iterables mixing Promise and non-Promise values, as long as at least one value may be a Promise.
|
|
382
|
+
*/
|
|
383
|
+
allowMixedPromiseArrays?: boolean;
|
|
384
|
+
};
|
|
385
|
+
"type/no-base-to-string"?: {
|
|
386
|
+
/**
|
|
387
|
+
* Whether to also check values of type `unknown`
|
|
388
|
+
*/
|
|
389
|
+
checkUnknown?: boolean;
|
|
390
|
+
/**
|
|
391
|
+
* Stringified type names to ignore.
|
|
392
|
+
*/
|
|
393
|
+
ignoredTypeNames?: string[];
|
|
394
|
+
};
|
|
395
|
+
"type/no-confusing-void-expression"?: {
|
|
396
|
+
/**
|
|
397
|
+
* Whether to ignore "shorthand" `() =>` arrow functions: those without `{ ... }` braces.
|
|
398
|
+
*/
|
|
399
|
+
ignoreArrowShorthand?: boolean;
|
|
400
|
+
/**
|
|
401
|
+
* Whether to ignore returns that start with the `void` operator.
|
|
402
|
+
*/
|
|
403
|
+
ignoreVoidOperator?: boolean;
|
|
404
|
+
/**
|
|
405
|
+
* Whether to ignore returns from functions with explicit `void` return types and functions with contextual `void` return types.
|
|
406
|
+
*/
|
|
407
|
+
ignoreVoidReturningFunctions?: boolean;
|
|
408
|
+
};
|
|
409
|
+
"type/no-deprecated"?: {
|
|
410
|
+
/**
|
|
411
|
+
* Type specifiers that can be allowed.
|
|
412
|
+
*/
|
|
413
|
+
allow?: (
|
|
414
|
+
| string
|
|
415
|
+
| {
|
|
416
|
+
from: "file";
|
|
417
|
+
name: string | [string, ...string[]];
|
|
418
|
+
path?: string;
|
|
419
|
+
}
|
|
420
|
+
| {
|
|
421
|
+
from: "lib";
|
|
422
|
+
name: string | [string, ...string[]];
|
|
423
|
+
}
|
|
424
|
+
| {
|
|
425
|
+
from: "package";
|
|
426
|
+
name: string | [string, ...string[]];
|
|
427
|
+
package: string;
|
|
428
|
+
}
|
|
429
|
+
)[];
|
|
430
|
+
};
|
|
431
|
+
"type/no-duplicate-type-constituents"?: {
|
|
432
|
+
/**
|
|
433
|
+
* Whether to ignore `&` intersections.
|
|
434
|
+
*/
|
|
435
|
+
ignoreIntersections?: boolean;
|
|
436
|
+
/**
|
|
437
|
+
* Whether to ignore `|` unions.
|
|
438
|
+
*/
|
|
439
|
+
ignoreUnions?: boolean;
|
|
440
|
+
};
|
|
441
|
+
"type/no-floating-promises"?: {
|
|
442
|
+
/**
|
|
443
|
+
* Type specifiers of functions whose calls are safe to float.
|
|
444
|
+
*/
|
|
445
|
+
allowForKnownSafeCalls?: (
|
|
446
|
+
| string
|
|
447
|
+
| {
|
|
448
|
+
from: "file";
|
|
449
|
+
name: string | [string, ...string[]];
|
|
450
|
+
path?: string;
|
|
451
|
+
}
|
|
452
|
+
| {
|
|
453
|
+
from: "lib";
|
|
454
|
+
name: string | [string, ...string[]];
|
|
455
|
+
}
|
|
456
|
+
| {
|
|
457
|
+
from: "package";
|
|
458
|
+
name: string | [string, ...string[]];
|
|
459
|
+
package: string;
|
|
460
|
+
}
|
|
461
|
+
)[];
|
|
462
|
+
/**
|
|
463
|
+
* Type specifiers that are known to be safe to float.
|
|
464
|
+
*/
|
|
465
|
+
allowForKnownSafePromises?: (
|
|
466
|
+
| string
|
|
467
|
+
| {
|
|
468
|
+
from: "file";
|
|
469
|
+
name: string | [string, ...string[]];
|
|
470
|
+
path?: string;
|
|
471
|
+
}
|
|
472
|
+
| {
|
|
473
|
+
from: "lib";
|
|
474
|
+
name: string | [string, ...string[]];
|
|
475
|
+
}
|
|
476
|
+
| {
|
|
477
|
+
from: "package";
|
|
478
|
+
name: string | [string, ...string[]];
|
|
479
|
+
package: string;
|
|
480
|
+
}
|
|
481
|
+
)[];
|
|
482
|
+
/**
|
|
483
|
+
* Whether to check all "Thenable"s, not just the built-in Promise type.
|
|
484
|
+
*/
|
|
485
|
+
checkThenables?: boolean;
|
|
486
|
+
/**
|
|
487
|
+
* Whether to ignore async IIFEs (Immediately Invoked Function Expressions).
|
|
488
|
+
*/
|
|
489
|
+
ignoreIIFE?: boolean;
|
|
490
|
+
/**
|
|
491
|
+
* Whether to ignore `void` expressions.
|
|
492
|
+
*/
|
|
493
|
+
ignoreVoid?: boolean;
|
|
494
|
+
};
|
|
495
|
+
"type/no-meaningless-void-operator"?: {
|
|
496
|
+
/**
|
|
497
|
+
* Whether to suggest removing `void` when a call's return type is `never`.
|
|
498
|
+
*/
|
|
499
|
+
checkNever?: boolean;
|
|
500
|
+
};
|
|
501
|
+
"type/no-misused-promises"?: {
|
|
502
|
+
/**
|
|
503
|
+
* Whether to warn when a Promise is provided to conditional statements.
|
|
504
|
+
*/
|
|
505
|
+
checksConditionals?:
|
|
506
|
+
| boolean
|
|
507
|
+
| {
|
|
508
|
+
/**
|
|
509
|
+
* Configures how union types containing Promise-like types are checked.
|
|
510
|
+
*/
|
|
511
|
+
flagUnions?: "all" | "strict" | "none";
|
|
512
|
+
};
|
|
513
|
+
/**
|
|
514
|
+
* Whether to warn when `...` spreading a `Promise`.
|
|
515
|
+
*/
|
|
516
|
+
checksSpreads?: boolean;
|
|
517
|
+
/**
|
|
518
|
+
* Whether to warn when a Promise is returned from a function typed as returning `void`.
|
|
519
|
+
*/
|
|
520
|
+
checksVoidReturn?:
|
|
521
|
+
| boolean
|
|
522
|
+
| {
|
|
523
|
+
/**
|
|
524
|
+
* Disables checking an asynchronous function passed as argument where the parameter type expects a function that returns `void`.
|
|
525
|
+
*/
|
|
526
|
+
arguments?: boolean;
|
|
527
|
+
/**
|
|
528
|
+
* Disables checking an asynchronous function passed as a JSX attribute expected to be a function that returns `void`.
|
|
529
|
+
*/
|
|
530
|
+
attributes?: boolean;
|
|
531
|
+
/**
|
|
532
|
+
* Disables checking an asynchronous method in a type that extends or implements another type expecting that method to return `void`.
|
|
533
|
+
*/
|
|
534
|
+
inheritedMethods?: boolean;
|
|
535
|
+
/**
|
|
536
|
+
* Disables checking an asynchronous function passed as an object property expected to be a function that returns `void`.
|
|
537
|
+
*/
|
|
538
|
+
properties?: boolean;
|
|
539
|
+
/**
|
|
540
|
+
* Disables checking an asynchronous function returned in a function whose return type is a function that returns `void`.
|
|
541
|
+
*/
|
|
542
|
+
returns?: boolean;
|
|
543
|
+
/**
|
|
544
|
+
* Disables checking an asynchronous function used as a variable whose return type is a function that returns `void`.
|
|
545
|
+
*/
|
|
546
|
+
variables?: boolean;
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
"type/no-misused-spread"?: {
|
|
550
|
+
/**
|
|
551
|
+
* An array of type specifiers that are known to be safe to spread.
|
|
552
|
+
*/
|
|
553
|
+
allow?: (
|
|
554
|
+
| string
|
|
555
|
+
| {
|
|
556
|
+
from: "file";
|
|
557
|
+
name: string | [string, ...string[]];
|
|
558
|
+
path?: string;
|
|
559
|
+
}
|
|
560
|
+
| {
|
|
561
|
+
from: "lib";
|
|
562
|
+
name: string | [string, ...string[]];
|
|
563
|
+
}
|
|
564
|
+
| {
|
|
565
|
+
from: "package";
|
|
566
|
+
name: string | [string, ...string[]];
|
|
567
|
+
package: string;
|
|
568
|
+
}
|
|
569
|
+
)[];
|
|
570
|
+
};
|
|
571
|
+
"type/no-unnecessary-boolean-literal-compare"?: {
|
|
572
|
+
/**
|
|
573
|
+
* Whether to allow comparisons between nullable boolean variables and `false`.
|
|
574
|
+
*/
|
|
575
|
+
allowComparingNullableBooleansToFalse?: boolean;
|
|
576
|
+
/**
|
|
577
|
+
* Whether to allow comparisons between nullable boolean variables and `true`.
|
|
578
|
+
*/
|
|
579
|
+
allowComparingNullableBooleansToTrue?: boolean;
|
|
580
|
+
/**
|
|
581
|
+
* Unless this is set to `true`, the rule will error on every file whose `tsconfig.json` does _not_ have the `strictNullChecks` compiler option (or `strict`) set to `true`.
|
|
582
|
+
*/
|
|
583
|
+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
|
|
584
|
+
};
|
|
585
|
+
"type/no-unnecessary-condition"?: {
|
|
586
|
+
/**
|
|
587
|
+
* Whether to ignore constant loop conditions, such as `while (true)`.
|
|
588
|
+
*/
|
|
589
|
+
allowConstantLoopConditions?: boolean | ("always" | "never" | "only-allowed-literals");
|
|
590
|
+
/**
|
|
591
|
+
* Whether to not error when running with a tsconfig that has strictNullChecks turned.
|
|
592
|
+
*/
|
|
593
|
+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
|
|
594
|
+
/**
|
|
595
|
+
* Whether to check the asserted argument of a type predicate function for unnecessary conditions
|
|
596
|
+
*/
|
|
597
|
+
checkTypePredicates?: boolean;
|
|
598
|
+
};
|
|
599
|
+
"type/no-unnecessary-type-assertion"?: {
|
|
600
|
+
/**
|
|
601
|
+
* Whether to check literal const assertions.
|
|
602
|
+
*/
|
|
603
|
+
checkLiteralConstAssertions?: boolean;
|
|
604
|
+
/**
|
|
605
|
+
* A list of type names to ignore.
|
|
606
|
+
*/
|
|
607
|
+
typesToIgnore?: string[];
|
|
608
|
+
};
|
|
609
|
+
"type/no-unsafe-member-access"?: {
|
|
610
|
+
/**
|
|
611
|
+
* Whether to allow `?.` optional chains on `any` values.
|
|
612
|
+
*/
|
|
613
|
+
allowOptionalChaining?: boolean;
|
|
614
|
+
};
|
|
615
|
+
"type/only-throw-error"?: {
|
|
616
|
+
/**
|
|
617
|
+
* Type specifiers that can be thrown.
|
|
618
|
+
*/
|
|
619
|
+
allow?: (
|
|
620
|
+
| string
|
|
621
|
+
| {
|
|
622
|
+
from: "file";
|
|
623
|
+
name: string | [string, ...string[]];
|
|
624
|
+
path?: string;
|
|
625
|
+
}
|
|
626
|
+
| {
|
|
627
|
+
from: "lib";
|
|
628
|
+
name: string | [string, ...string[]];
|
|
629
|
+
}
|
|
630
|
+
| {
|
|
631
|
+
from: "package";
|
|
632
|
+
name: string | [string, ...string[]];
|
|
633
|
+
package: string;
|
|
634
|
+
}
|
|
635
|
+
)[];
|
|
636
|
+
/**
|
|
637
|
+
* Whether to allow rethrowing caught values that are not `Error` objects.
|
|
638
|
+
*/
|
|
639
|
+
allowRethrowing?: boolean;
|
|
640
|
+
/**
|
|
641
|
+
* Whether to always allow throwing values typed as `any`.
|
|
642
|
+
*/
|
|
643
|
+
allowThrowingAny?: boolean;
|
|
644
|
+
/**
|
|
645
|
+
* Whether to always allow throwing values typed as `unknown`.
|
|
646
|
+
*/
|
|
647
|
+
allowThrowingUnknown?: boolean;
|
|
648
|
+
};
|
|
649
|
+
"type/prefer-promise-reject-errors"?: {
|
|
650
|
+
/**
|
|
651
|
+
* Type specifiers that can be used as Promise rejection reasons.
|
|
652
|
+
*/
|
|
653
|
+
allow?: (
|
|
654
|
+
| string
|
|
655
|
+
| {
|
|
656
|
+
from: "file";
|
|
657
|
+
name: string | [string, ...string[]];
|
|
658
|
+
path?: string;
|
|
659
|
+
}
|
|
660
|
+
| {
|
|
661
|
+
from: "lib";
|
|
662
|
+
name: string | [string, ...string[]];
|
|
663
|
+
}
|
|
664
|
+
| {
|
|
665
|
+
from: "package";
|
|
666
|
+
name: string | [string, ...string[]];
|
|
667
|
+
package: string;
|
|
668
|
+
}
|
|
669
|
+
)[];
|
|
670
|
+
/**
|
|
671
|
+
* Whether to allow calls to `Promise.reject()` with no arguments.
|
|
672
|
+
*/
|
|
673
|
+
allowEmptyReject?: boolean;
|
|
674
|
+
/**
|
|
675
|
+
* Whether to always allow throwing values typed as `any`.
|
|
676
|
+
*/
|
|
677
|
+
allowThrowingAny?: boolean;
|
|
678
|
+
/**
|
|
679
|
+
* Whether to always allow throwing values typed as `unknown`.
|
|
680
|
+
*/
|
|
681
|
+
allowThrowingUnknown?: boolean;
|
|
682
|
+
};
|
|
683
|
+
"type/restrict-plus-operands"?: {
|
|
684
|
+
/**
|
|
685
|
+
* Whether to allow `any` typed values.
|
|
686
|
+
*/
|
|
687
|
+
allowAny?: boolean;
|
|
688
|
+
/**
|
|
689
|
+
* Whether to allow `boolean` typed values.
|
|
690
|
+
*/
|
|
691
|
+
allowBoolean?: boolean;
|
|
692
|
+
/**
|
|
693
|
+
* Whether to allow potentially `null` or `undefined` typed values.
|
|
694
|
+
*/
|
|
695
|
+
allowNullish?: boolean;
|
|
696
|
+
/**
|
|
697
|
+
* Whether to allow `bigint`/`number` typed values and `string` typed values to be added together.
|
|
698
|
+
*/
|
|
699
|
+
allowNumberAndString?: boolean;
|
|
700
|
+
/**
|
|
701
|
+
* Whether to allow `regexp` typed values.
|
|
702
|
+
*/
|
|
703
|
+
allowRegExp?: boolean;
|
|
704
|
+
/**
|
|
705
|
+
* Whether to skip compound assignments such as `+=`.
|
|
706
|
+
*/
|
|
707
|
+
skipCompoundAssignments?: boolean;
|
|
708
|
+
};
|
|
709
|
+
"type/restrict-template-expressions"?: {
|
|
710
|
+
/**
|
|
711
|
+
* Whether to allow `any` typed values in template expressions.
|
|
712
|
+
*/
|
|
713
|
+
allowAny?: boolean;
|
|
714
|
+
/**
|
|
715
|
+
* Whether to allow `array` typed values in template expressions.
|
|
716
|
+
*/
|
|
717
|
+
allowArray?: boolean;
|
|
718
|
+
/**
|
|
719
|
+
* Whether to allow `boolean` typed values in template expressions.
|
|
720
|
+
*/
|
|
721
|
+
allowBoolean?: boolean;
|
|
722
|
+
/**
|
|
723
|
+
* Whether to allow `nullish` typed values in template expressions.
|
|
724
|
+
*/
|
|
725
|
+
allowNullish?: boolean;
|
|
726
|
+
/**
|
|
727
|
+
* Whether to allow `number` typed values in template expressions.
|
|
728
|
+
*/
|
|
729
|
+
allowNumber?: boolean;
|
|
730
|
+
/**
|
|
731
|
+
* Whether to allow `regexp` typed values in template expressions.
|
|
732
|
+
*/
|
|
733
|
+
allowRegExp?: boolean;
|
|
734
|
+
/**
|
|
735
|
+
* Whether to allow `never` typed values in template expressions.
|
|
736
|
+
*/
|
|
737
|
+
allowNever?: boolean;
|
|
738
|
+
/**
|
|
739
|
+
* Types to allow in template expressions.
|
|
740
|
+
*/
|
|
741
|
+
allow?: (
|
|
742
|
+
| string
|
|
743
|
+
| {
|
|
744
|
+
from: "file";
|
|
745
|
+
name: string | [string, ...string[]];
|
|
746
|
+
path?: string;
|
|
747
|
+
}
|
|
748
|
+
| {
|
|
749
|
+
from: "lib";
|
|
750
|
+
name: string | [string, ...string[]];
|
|
751
|
+
}
|
|
752
|
+
| {
|
|
753
|
+
from: "package";
|
|
754
|
+
name: string | [string, ...string[]];
|
|
755
|
+
package: string;
|
|
756
|
+
}
|
|
757
|
+
)[];
|
|
758
|
+
};
|
|
759
|
+
"type/return-await"?: ("always" | "error-handling-correctness-only" | "in-try-catch" | "never") &
|
|
760
|
+
string;
|
|
761
|
+
"type/unbound-method"?: {
|
|
762
|
+
/**
|
|
763
|
+
* Whether to skip checking whether `static` methods are correctly bound.
|
|
764
|
+
*/
|
|
765
|
+
ignoreStatic?: boolean;
|
|
766
|
+
};
|
|
379
767
|
"vue/no-unused-script-vars"?: {
|
|
380
768
|
vars?: "all" | "local";
|
|
381
769
|
varsIgnorePattern?: string;
|
package/virtual-ts.d.cts
CHANGED
|
@@ -81,11 +81,15 @@ export type $RegisteredSlotProvider<
|
|
|
81
81
|
: L extends keyof G
|
|
82
82
|
? G[L]
|
|
83
83
|
: $SilentAny;
|
|
84
|
-
type $NamedSlotPayload<S, N> =
|
|
85
|
-
|
|
86
|
-
?
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
type $NamedSlotPayload<S, N> = (
|
|
85
|
+
S extends unknown
|
|
86
|
+
? {
|
|
87
|
+
[K in keyof S & N]-?: NonNullable<S[K]> extends (props: infer P, ...args: any[]) => any
|
|
88
|
+
? P
|
|
89
|
+
: never;
|
|
90
|
+
}[keyof S & N]
|
|
91
|
+
: never
|
|
92
|
+
) extends infer P
|
|
89
93
|
? [P] extends [never]
|
|
90
94
|
? any
|
|
91
95
|
: P
|
package/virtual-ts.d.mts
CHANGED
|
@@ -81,11 +81,15 @@ export type $RegisteredSlotProvider<
|
|
|
81
81
|
: L extends keyof G
|
|
82
82
|
? G[L]
|
|
83
83
|
: $SilentAny;
|
|
84
|
-
type $NamedSlotPayload<S, N> =
|
|
85
|
-
|
|
86
|
-
?
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
type $NamedSlotPayload<S, N> = (
|
|
85
|
+
S extends unknown
|
|
86
|
+
? {
|
|
87
|
+
[K in keyof S & N]-?: NonNullable<S[K]> extends (props: infer P, ...args: any[]) => any
|
|
88
|
+
? P
|
|
89
|
+
: never;
|
|
90
|
+
}[keyof S & N]
|
|
91
|
+
: never
|
|
92
|
+
) extends infer P
|
|
89
93
|
? [P] extends [never]
|
|
90
94
|
? any
|
|
91
95
|
: P
|
package/virtual-ts.d.ts
CHANGED
|
@@ -81,11 +81,15 @@ export type $RegisteredSlotProvider<
|
|
|
81
81
|
: L extends keyof G
|
|
82
82
|
? G[L]
|
|
83
83
|
: $SilentAny;
|
|
84
|
-
type $NamedSlotPayload<S, N> =
|
|
85
|
-
|
|
86
|
-
?
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
type $NamedSlotPayload<S, N> = (
|
|
85
|
+
S extends unknown
|
|
86
|
+
? {
|
|
87
|
+
[K in keyof S & N]-?: NonNullable<S[K]> extends (props: infer P, ...args: any[]) => any
|
|
88
|
+
? P
|
|
89
|
+
: never;
|
|
90
|
+
}[keyof S & N]
|
|
91
|
+
: never
|
|
92
|
+
) extends infer P
|
|
89
93
|
? [P] extends [never]
|
|
90
94
|
? any
|
|
91
95
|
: P
|