@eslinted/core 6.0.0 → 7.0.0-rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. package/.github/workflows/RELEASE.yml +36 -38
  2. package/.github/workflows/rc.yml +36 -37
  3. package/.markdownlint.jsonc +122 -122
  4. package/LICENSE +21 -21
  5. package/README.md +5 -5
  6. package/SECURITY.md +9 -9
  7. package/eslint.config.js +3 -3
  8. package/package.json +96 -92
  9. package/src/factory/files.ts +26 -26
  10. package/src/factory/index.ts +27 -27
  11. package/src/factory/options/html.ts +18 -18
  12. package/src/factory/options/index.ts +21 -21
  13. package/src/factory/options/js.ts +13 -13
  14. package/src/factory/options/json.ts +18 -18
  15. package/src/factory/options/jsonc.ts +18 -18
  16. package/src/factory/options/mocha.ts +28 -28
  17. package/src/factory/options/option/index.ts +91 -91
  18. package/src/factory/options/option/template/globals.ts +5 -5
  19. package/src/factory/options/option/template/index.ts +26 -26
  20. package/src/factory/options/option/template/language/ecma.ts +3 -3
  21. package/src/factory/options/option/template/language/index.ts +21 -21
  22. package/src/factory/options/option/template/language/source.ts +4 -4
  23. package/src/factory/options/option/template/linter.ts +8 -8
  24. package/src/factory/options/option/template/plugins.ts +1 -1
  25. package/src/factory/options/svelte.ts +32 -32
  26. package/src/factory/options/ts.ts +24 -24
  27. package/src/factory/options/yml.ts +18 -18
  28. package/src/factory/rulesets/index.ts +24 -24
  29. package/src/factory/rulesets/ruleset.ts +25 -25
  30. package/src/index.ts +77 -77
  31. package/src/input/files.ts +6 -6
  32. package/src/input/imports/parsers.ts +10 -10
  33. package/src/input/imports/plugins.ts +9 -9
  34. package/src/input/index.ts +23 -23
  35. package/src/input/parsers.ts +3 -3
  36. package/src/input/plugins.ts +3 -3
  37. package/src/input/rules/entry/index.ts +7 -7
  38. package/src/input/rules/entry/record/index.ts +3 -3
  39. package/src/input/rules/entry/record/state.ts +5 -5
  40. package/src/input/rules/index.ts +14 -14
  41. package/src/output.ts +24 -24
  42. package/src/scopes.spec.ts +37 -37
  43. package/src/scopes.ts +11 -11
  44. package/tsconfig.json +163 -163
  45. package/typings/common/literals/number/bases/base32.d.ts +19 -19
  46. package/typings/common/literals/number/bases/base64.d.ts +35 -35
  47. package/typings/common/literals/number/bases/binary.d.ts +4 -4
  48. package/typings/common/literals/number/bases/decimal.d.ts +5 -5
  49. package/typings/common/literals/number/bases/hex.d.ts +10 -10
  50. package/typings/common/literals/number/bases/octal.d.ts +7 -7
  51. package/typings/common/literals/number/bases/quatral.d.ts +4 -4
  52. package/typings/common/literals/number/bases/ternary.d.ts +4 -4
  53. package/typings/common/literals/string/letter/digit/extended/base64/index.d.ts +13 -13
  54. package/typings/common/literals/string/letter/digit/extended/hex/index.d.ts +9 -9
  55. package/typings/common/literals/string/letter/digit/index.d.ts +12 -12
  56. package/typings/common/literals/string/letter/index.d.ts +35 -35
  57. package/typings/common/primitive/index.d.ts +5 -5
  58. package/typings/common/safe/index.d.ts +2 -2
  59. package/typings/common/safe/numbers/finite/index.d.ts +2 -2
  60. package/typings/common/safe/numbers/fint.d.ts +1 -1
  61. package/typings/common/safe/numbers/integer/index.d.ts +2 -2
  62. package/typings/common/safe/numbers/integer/numberful/index.d.ts +1 -1
  63. package/typings/common/safe/numbers/polarity/negative.d.ts +4 -4
  64. package/typings/common/safe/numbers/polarity/pole/index.d.ts +18 -18
  65. package/typings/common/safe/numbers/polarity/positive.d.ts +4 -4
  66. package/typings/common/safe/strings/char.d.ts +1 -1
  67. package/typings/common/safe/strings/stringful/index.d.ts +1 -1
  68. package/typings/common/safe/strings/stringful/length/index.d.ts +3 -3
  69. package/typings/common/utility/interface/build/particord/index.d.ts +1 -1
  70. package/typings/common/utility/interface/build/properties/Field.d.ts +1 -1
  71. package/typings/common/utility/interface/build/properties/Flag.d.ts +1 -1
  72. package/typings/common/utility/interface/build/properties/Limit.d.ts +8 -8
  73. package/typings/common/utility/interface/build/properties/List.d.ts +1 -1
  74. package/typings/common/utility/interface/build/properties/Listish.d.ts +1 -1
  75. package/typings/common/utility/interface/build/properties/Scalar.d.ts +1 -1
  76. package/typings/common/utility/interface/build/properties/property/index.d.ts +8 -8
  77. package/typings/common/utility/interface/build/recordful/index.d.ts +5 -5
  78. package/typings/common/utility/interface/build/tables/FieldTable.d.ts +1 -1
  79. package/typings/common/utility/interface/build/tables/FlagTable.d.ts +1 -1
  80. package/typings/common/utility/interface/build/tables/ListTable.d.ts +1 -1
  81. package/typings/common/utility/interface/build/tables/ListishTable.d.ts +1 -1
  82. package/typings/common/utility/interface/build/tables/ScalarTable.d.ts +1 -1
  83. package/typings/common/utility/interface/build/tables/table/index.d.ts +3 -3
  84. package/typings/common/utility/interface/identity/interface/index.d.ts +80 -80
  85. package/typings/common/utility/interface/identity/keys/index.d.ts +71 -71
  86. package/typings/common/utility/interface/transform/partial/unrequire/index.d.ts +45 -45
  87. package/typings/common/utility/iterable/build/arrays/array/index.d.ts +11 -11
  88. package/typings/common/utility/iterable/build/arrays/index.d.ts +2 -2
  89. package/typings/common/utility/iterable/build/tuples/index.d.ts +10 -10
  90. package/typings/common/utility/iterable/build/tuples/tuple/index.d.ts +26 -26
  91. package/typings/common/utility/iterable/identity/array/index.d.ts +65 -65
  92. package/typings/common/utility/iterable/identity/array/length/index.d.ts +16 -16
  93. package/typings/common/utility/iterable/identity/dyad.d.ts +3 -3
  94. package/typings/common/utility/iterable/identity/monad.d.ts +48 -48
  95. package/typings/common/utility/iterable/identity/triad.d.ts +3 -3
  96. package/typings/common/utility/iterable/transform/flat/index.d.ts +3 -3
  97. package/typings/common/utility/iterable/transform/flat/unflat/index.d.ts +3 -3
  98. package/typings/common/utility/iterable/transform/string/index.d.ts +30 -30
  99. package/typings/common/utility/iterable/transform/string/stringify/index.d.ts +27 -27
  100. package/typings/common/utility/nullable/index.d.ts +1 -1
  101. package/typings/common/utility/nullable/index.spec.d.ts +13 -13
  102. package/typings/common/utility/nullable/null/index.d.ts +1 -1
  103. package/typings/common/utility/nullable/null/index.spec.d.ts +13 -13
  104. package/typings/common/utility/object/build/index.d.ts +3 -3
  105. package/typings/common/utility/primitive/boolean/true/index.d.ts +30 -30
  106. package/typings/common/utility/primitive/index.d.ts +42 -42
  107. package/typings/common/utility/primitive/number/length/index.d.ts +35 -35
  108. package/typings/common/utility/primitive/number/length/numbered/index.d.ts +35 -35
  109. package/typings/common/utility/primitive/string/fake/index.d.ts +1 -1
  110. package/typings/common/utility/primitive/string/literalful/index.d.ts +28 -28
  111. package/typings/common/utility/primitive/string/literalful/literal/index.d.ts +22 -22
  112. package/typings/common/utility/test.d.ts +2 -2
  113. package/typings/common/valid/index.d.ts +7 -7
  114. package/typings/common/valid/string/index.d.ts +1 -1
@@ -1,42 +1,42 @@
1
- declare type Primeval<P extends T, T extends primitive> = [T] extends [primitive]
2
- ? [P] extends [T]
3
- ? Extract<P, object> extends never
4
- ? Exclude<P, T> extends never
5
- ? T extends P
6
- ? never
7
- : P
8
- : never
9
- : never
10
- : never
11
- : never;
12
-
13
- declare namespace Primeval {
14
- export type T0 = Primeval<"fast", string>;
15
- export type T0a = Primeval<"", string>;
16
- export type T0b = Primeval<"fast" | "good", string>;
17
- export type T0c = Primeval<"fast" | "", string>;
18
- export type T1 = Primeval<5, number>;
19
- export type T1a = Primeval<0, number>;
20
- export type T2 = Primeval<true, boolean>;
21
- export type T2a = Primeval<false, boolean>;
22
- }
23
-
24
- declare namespace NotPrimeval {
25
- export type N0 = Primeval<string, string>;
26
- export type N0a = Primeval<number, number>;
27
- export type N0b = Primeval<boolean, boolean>;
28
- export type N1 = Primeval<stringful, string>;
29
- export type N1b = Primeval<numberful, number>;
30
-
31
- // export type N2 = Primeval<number | 5, number>;
32
- // export type N2a = Primeval<string | "good", string>;
33
- // export type N2b = Primeval<boolean | true, boolean>;
34
- // export type N3 = Primeval<5, number | object>;
35
- // export type N3a = Primeval<symbol, symbol>;
36
- // export type N3b = Primeval<object, object>;
37
- // export type N3c = Primeval<[], readonly unknown[]>;
38
- // export type N3d = Primeval<()=> 5, Function>;
39
- // export type N3e = Primeval<5, unknown>;
40
- // export type N3f = Primeval<true | 10, boolean>;
41
- // export type N3g = Primeval<string | "good", string>;
42
- }
1
+ declare type Primeval<P extends T, T extends primitive> = [T] extends [primitive]
2
+ ? [P] extends [T]
3
+ ? Extract<P, object> extends never
4
+ ? Exclude<P, T> extends never
5
+ ? T extends P
6
+ ? never
7
+ : P
8
+ : never
9
+ : never
10
+ : never
11
+ : never;
12
+
13
+ declare namespace Primeval {
14
+ export type T0 = Primeval<"fast", string>;
15
+ export type T0a = Primeval<"", string>;
16
+ export type T0b = Primeval<"fast" | "good", string>;
17
+ export type T0c = Primeval<"fast" | "", string>;
18
+ export type T1 = Primeval<5, number>;
19
+ export type T1a = Primeval<0, number>;
20
+ export type T2 = Primeval<true, boolean>;
21
+ export type T2a = Primeval<false, boolean>;
22
+ }
23
+
24
+ declare namespace NotPrimeval {
25
+ export type N0 = Primeval<string, string>;
26
+ export type N0a = Primeval<number, number>;
27
+ export type N0b = Primeval<boolean, boolean>;
28
+ export type N1 = Primeval<stringful, string>;
29
+ export type N1b = Primeval<numberful, number>;
30
+
31
+ // export type N2 = Primeval<number | 5, number>;
32
+ // export type N2a = Primeval<string | "good", string>;
33
+ // export type N2b = Primeval<boolean | true, boolean>;
34
+ // export type N3 = Primeval<5, number | object>;
35
+ // export type N3a = Primeval<symbol, symbol>;
36
+ // export type N3b = Primeval<object, object>;
37
+ // export type N3c = Primeval<[], readonly unknown[]>;
38
+ // export type N3d = Primeval<()=> 5, Function>;
39
+ // export type N3e = Primeval<5, unknown>;
40
+ // export type N3f = Primeval<true | 10, boolean>;
41
+ // export type N3g = Primeval<string | "good", string>;
42
+ }
@@ -1,35 +1,35 @@
1
- declare type LengthValue<N extends number> = [N] extends [number]
2
- ? [number] extends [N]
3
- ? 0
4
- : Numbered<N>
5
- : never;
6
-
7
- declare namespace Length {
8
- export type T0 = LengthValue<0>;
9
- export type T0a = LengthValue<0.0>; // 0
10
- export type T0b = LengthValue<number>; // 0
11
- export type T1 = LengthValue<1>;
12
- export type T1a = LengthValue<1.0>; // 1
13
- export type T2 = LengthValue<1.1>; // 1.1
14
- export type T3 = LengthValue<1 | 5>; // 1 | 5
15
- export type T3b = LengthValue<0 | 1 | 5>; // 0 | 1 | 5
16
- }
17
-
18
- declare namespace NotLength {
19
- export type N = LengthValue<never>;
20
-
21
- // export type N0 = Length<unknown>;
22
- // export type N0a = Length<undefined>;
23
- // export type N0b = Length<null>;
24
- // export type N0c = Length<void>;
25
- // export type N0d = Length<undefined>;
26
- // export type N0e = Length<undefined>;
27
- // export type N1 = Length<"1">;
28
- // export type N1a = Length<true>;
29
- // export type N1b = Length<[5, 5]>;
30
- // export type N1c = Length<()=> void>;
31
- // export type N1d = Length<object>;
32
- // export type N2 = Length<null | 1>;
33
- // export type N2a = Length<true | 1>;
34
- // export type N2b = Length<number | 1>; // 0
35
- }
1
+ declare type LengthValue<N extends number> = [N] extends [number]
2
+ ? [number] extends [N]
3
+ ? 0
4
+ : Numbered<N>
5
+ : never;
6
+
7
+ declare namespace Length {
8
+ export type T0 = LengthValue<0>;
9
+ export type T0a = LengthValue<0.0>; // 0
10
+ export type T0b = LengthValue<number>; // 0
11
+ export type T1 = LengthValue<1>;
12
+ export type T1a = LengthValue<1.0>; // 1
13
+ export type T2 = LengthValue<1.1>; // 1.1
14
+ export type T3 = LengthValue<1 | 5>; // 1 | 5
15
+ export type T3b = LengthValue<0 | 1 | 5>; // 0 | 1 | 5
16
+ }
17
+
18
+ declare namespace NotLength {
19
+ export type N = LengthValue<never>;
20
+
21
+ // export type N0 = Length<unknown>;
22
+ // export type N0a = Length<undefined>;
23
+ // export type N0b = Length<null>;
24
+ // export type N0c = Length<void>;
25
+ // export type N0d = Length<undefined>;
26
+ // export type N0e = Length<undefined>;
27
+ // export type N1 = Length<"1">;
28
+ // export type N1a = Length<true>;
29
+ // export type N1b = Length<[5, 5]>;
30
+ // export type N1c = Length<()=> void>;
31
+ // export type N1d = Length<object>;
32
+ // export type N2 = Length<null | 1>;
33
+ // export type N2a = Length<true | 1>;
34
+ // export type N2b = Length<number | 1>; // 0
35
+ }
@@ -1,35 +1,35 @@
1
- declare type Numbered<N extends number> = Primeval<N, number>;
2
-
3
- declare namespace Numbered {
4
- export type T0 = Numbered<0>;
5
- export type T1 = Numbered<0.0>;
6
- export type T2 = Numbered<1>;
7
- export type T3 = Numbered<1.0>;
8
- export type T4 = Numbered<1.1>;
9
- export type T5 = Numbered<1 | 5>;
10
- }
11
-
12
- declare namespace NumberedNever {
13
- export type N0 = Numbered<number>;
14
- export type N0b = Numbered<numberful>;
15
- export type N0c = Numbered<number | numberful>;
16
- export type N0d = Numbered<1 | numberful>;
17
- export type N1 = Numbered<never>;
18
-
19
- // export type N0e = Numbered<1 | number>;
20
- // export type N2 = Numbered<"cool">;
21
- // export type N3 = Numbered<"NaN">;
22
- // export type N4 = Numbered<"5">;
23
- // export type N5 = Numbered<string>;
24
- // export type N6 = Numbered<boolean>;
25
- // export type N6a = Numbered<true>;
26
- // export type N6b = Numbered<false>;
27
- // export type N7 = Numbered<null>;
28
- // export type N8 = Numbered<undefined>;
29
- // export type N9 = Numbered<void>;
30
- // export type N10 = Numbered<object>;
31
- // export type N11 = Numbered<[]>;
32
- // export type N12 = Numbered<5 | true>;
33
- // export type N13 = Numbered<()=> 5>;
34
- // export type N14 = Numbered<symbol>;
35
- }
1
+ declare type Numbered<N extends number> = Primeval<N, number>;
2
+
3
+ declare namespace Numbered {
4
+ export type T0 = Numbered<0>;
5
+ export type T1 = Numbered<0.0>;
6
+ export type T2 = Numbered<1>;
7
+ export type T3 = Numbered<1.0>;
8
+ export type T4 = Numbered<1.1>;
9
+ export type T5 = Numbered<1 | 5>;
10
+ }
11
+
12
+ declare namespace NumberedNever {
13
+ export type N0 = Numbered<number>;
14
+ export type N0b = Numbered<numberful>;
15
+ export type N0c = Numbered<number | numberful>;
16
+ export type N0d = Numbered<1 | numberful>;
17
+ export type N1 = Numbered<never>;
18
+
19
+ // export type N0e = Numbered<1 | number>;
20
+ // export type N2 = Numbered<"cool">;
21
+ // export type N3 = Numbered<"NaN">;
22
+ // export type N4 = Numbered<"5">;
23
+ // export type N5 = Numbered<string>;
24
+ // export type N6 = Numbered<boolean>;
25
+ // export type N6a = Numbered<true>;
26
+ // export type N6b = Numbered<false>;
27
+ // export type N7 = Numbered<null>;
28
+ // export type N8 = Numbered<undefined>;
29
+ // export type N9 = Numbered<void>;
30
+ // export type N10 = Numbered<object>;
31
+ // export type N11 = Numbered<[]>;
32
+ // export type N12 = Numbered<5 | true>;
33
+ // export type N13 = Numbered<()=> 5>;
34
+ // export type N14 = Numbered<symbol>;
35
+ }
@@ -1 +1 @@
1
- declare type Fake<T> = T extends string ? string : string;
1
+ declare type Fake<T> = T extends string ? string : string;
@@ -1,28 +1,28 @@
1
- declare type literalful<S extends string> = "" extends literal<S>
2
- ? never
3
- : literal<S>;
4
-
5
- declare namespace literalful {
6
- export type T0 = literalful<"a">;
7
- export type T1 = literalful<"a" | "b">;
8
- }
9
-
10
- declare namespace Notliteralful {
11
-
12
- export type N0 = literalful<never>;
13
- export type N1 = literalful<"">;
14
- export type N2 = literalful<string>;
15
- export type N2b = literalful<stringful>;
16
- export type N3 = literalful<"" | "a">;
17
-
18
- // export type N5 = literalful<"a" | string>;
19
- // export type N5a = literalful<unknown>;
20
- // export type N5b = literalful<null>;
21
- // export type N5c = literalful<undefined>;
22
- // export type N5d = literalful<void>;
23
- // export type N5e = literalful<[]>;
24
- // export type N5f = literalful<object>;
25
- // export type N5g = literalful<()=> "a">;
26
- // export type N5h = literalful<symbol>;
27
- // export type N5i = literalful<"a" | 5>;
28
- }
1
+ declare type literalful<S extends string> = "" extends literal<S>
2
+ ? never
3
+ : literal<S>;
4
+
5
+ declare namespace literalful {
6
+ export type T0 = literalful<"a">;
7
+ export type T1 = literalful<"a" | "b">;
8
+ }
9
+
10
+ declare namespace Notliteralful {
11
+
12
+ export type N0 = literalful<never>;
13
+ export type N1 = literalful<"">;
14
+ export type N2 = literalful<string>;
15
+ export type N2b = literalful<stringful>;
16
+ export type N3 = literalful<"" | "a">;
17
+
18
+ // export type N5 = literalful<"a" | string>;
19
+ // export type N5a = literalful<unknown>;
20
+ // export type N5b = literalful<null>;
21
+ // export type N5c = literalful<undefined>;
22
+ // export type N5d = literalful<void>;
23
+ // export type N5e = literalful<[]>;
24
+ // export type N5f = literalful<object>;
25
+ // export type N5g = literalful<()=> "a">;
26
+ // export type N5h = literalful<symbol>;
27
+ // export type N5i = literalful<"a" | 5>;
28
+ }
@@ -1,22 +1,22 @@
1
- declare type literal<S extends string> = Primeval<S, string>;
2
-
3
- declare namespace literal {
4
- export type T = literal<"">;
5
- export type T0 = literal<"a">;
6
- export type T1 = literal<"a" | "b">;
7
- export type T1b = literal<"a" | "">;
8
- }
9
-
10
- declare namespace Notliteral {
11
- export type N = literal<never>;
12
- export type N0 = literal<string>;
13
-
14
- // export type N1 = literal<unknown>;
15
- // export type N2 = literal<null>;
16
- // export type N3 = literal<undefined>;
17
- // export type N4 = literal<void>;
18
- // export type N5 = literal<object>;
19
- // export type N6 = literal<()=> "a">;
20
- // export type N7 = literal<symbol>;
21
- // export type N8 = literal<"a" | 5>;
22
- }
1
+ declare type literal<S extends string> = Primeval<S, string>;
2
+
3
+ declare namespace literal {
4
+ export type T = literal<"">;
5
+ export type T0 = literal<"a">;
6
+ export type T1 = literal<"a" | "b">;
7
+ export type T1b = literal<"a" | "">;
8
+ }
9
+
10
+ declare namespace Notliteral {
11
+ export type N = literal<never>;
12
+ export type N0 = literal<string>;
13
+
14
+ // export type N1 = literal<unknown>;
15
+ // export type N2 = literal<null>;
16
+ // export type N3 = literal<undefined>;
17
+ // export type N4 = literal<void>;
18
+ // export type N5 = literal<object>;
19
+ // export type N6 = literal<()=> "a">;
20
+ // export type N7 = literal<symbol>;
21
+ // export type N8 = literal<"a" | 5>;
22
+ }
@@ -1,2 +1,2 @@
1
- declare type Test<TF extends { T: unknown; F?: unknown }> = (OmitNever<TF["T"]> extends TF["T"] ? true : never) & (object extends OmitNever<TF["F"]> ? true : undefined extends OmitNever<TF["F"]> ? true : never);
2
- declare type OmitNever<R> = { [K in keyof R as R[K] extends never ? never : K]: R[K] };
1
+ declare type Test<TF extends { T: unknown; F?: unknown }> = (OmitNever<TF["T"]> extends TF["T"] ? true : never) & (object extends OmitNever<TF["F"]> ? true : undefined extends OmitNever<TF["F"]> ? true : never);
2
+ declare type OmitNever<R> = { [K in keyof R as R[K] extends never ? never : K]: R[K] };
@@ -1,7 +1,7 @@
1
- declare const v: unique symbol;
2
- declare type valid<T, V extends readonly string[]> =
3
- & T
4
- & (Chain<V, ":", true> extends never
5
- ? never
6
- : { [v]: Chain<V, ":", true> })
7
- ;
1
+ declare const v: unique symbol;
2
+ declare type valid<T, V extends readonly string[]> =
3
+ & T
4
+ & (Chain<V, ":", true> extends never
5
+ ? never
6
+ : { [v]: Chain<V, ":", true> })
7
+ ;
@@ -1 +1 @@
1
- declare type vstring<V extends string> = valid<stringful, [V, "string"]>;
1
+ declare type vstring<V extends string> = valid<stringful, [V, "string"]>;