@eslinted/core 11.2.0 → 12.0.0-rc.1

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 (145) hide show
  1. package/dist/factory/index.d.ts +1 -1
  2. package/dist/factory/index.d.ts.map +1 -1
  3. package/dist/factory/options/index.d.ts +1 -1
  4. package/dist/factory/options/index.d.ts.map +1 -1
  5. package/dist/factory/options/option/index.d.ts +2 -2
  6. package/dist/factory/options/option/index.d.ts.map +1 -1
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +13 -6
  10. package/dist/index.js.map +1 -1
  11. package/dist/interface/index.d.ts +1 -1
  12. package/dist/interface/index.d.ts.map +1 -1
  13. package/dist/interface/input/global/ignores/defaults.d.ts +3 -0
  14. package/dist/interface/input/global/ignores/defaults.d.ts.map +1 -0
  15. package/dist/interface/input/global/ignores/defaults.js.map +1 -0
  16. package/dist/interface/input/global/ignores/extend.d.ts +5 -0
  17. package/dist/interface/input/global/ignores/extend.d.ts.map +1 -0
  18. package/dist/interface/input/global/ignores/extend.js +2 -0
  19. package/dist/interface/input/global/ignores/extend.js.map +1 -0
  20. package/dist/interface/input/global/ignores/index.d.ts +8 -0
  21. package/dist/interface/input/global/ignores/index.d.ts.map +1 -0
  22. package/dist/interface/input/global/ignores/index.js.map +1 -0
  23. package/dist/interface/input/global/index.d.ts +6 -0
  24. package/dist/interface/input/global/index.d.ts.map +1 -0
  25. package/dist/interface/input/global/index.js.map +1 -0
  26. package/dist/interface/input/imports/index.d.ts +1 -1
  27. package/dist/interface/input/imports/index.d.ts.map +1 -1
  28. package/dist/interface/input/index.d.ts +6 -4
  29. package/dist/interface/input/index.d.ts.map +1 -1
  30. package/dist/interface/input/scoped/files/defaults.d.ts.map +1 -0
  31. package/dist/interface/input/scoped/files/defaults.js.map +1 -0
  32. package/dist/interface/input/scoped/files/includes.d.ts.map +1 -0
  33. package/dist/interface/input/scoped/files/includes.js.map +1 -0
  34. package/dist/interface/input/scoped/files/index.d.ts.map +1 -0
  35. package/dist/interface/input/scoped/files/index.js.map +1 -0
  36. package/dist/interface/input/{user → scoped}/index.d.ts +1 -1
  37. package/dist/interface/input/scoped/index.d.ts.map +1 -0
  38. package/dist/interface/input/scoped/index.js.map +1 -0
  39. package/dist/interface/input/scoped/rules/defaults.d.ts.map +1 -0
  40. package/dist/interface/input/scoped/rules/defaults.js +2 -0
  41. package/dist/interface/input/scoped/rules/defaults.js.map +1 -0
  42. package/dist/interface/input/scoped/rules/index.d.ts.map +1 -0
  43. package/dist/interface/input/scoped/rules/index.js +2 -0
  44. package/dist/interface/input/scoped/rules/index.js.map +1 -0
  45. package/dist/interface/input/scoped/rules/overrides.d.ts.map +1 -0
  46. package/dist/interface/input/scoped/rules/overrides.js.map +1 -0
  47. package/dist/interface/input/settings/env.d.ts +3 -0
  48. package/dist/interface/input/settings/env.d.ts.map +1 -0
  49. package/dist/interface/input/settings/env.js +2 -0
  50. package/dist/interface/input/settings/env.js.map +1 -0
  51. package/dist/interface/input/settings/index.d.ts +6 -0
  52. package/dist/interface/input/settings/index.d.ts.map +1 -0
  53. package/dist/interface/input/settings/index.js +2 -0
  54. package/dist/interface/input/settings/index.js.map +1 -0
  55. package/dist/interface/output/globals.d.ts +6 -0
  56. package/dist/interface/output/globals.d.ts.map +1 -0
  57. package/dist/interface/output/globals.js +2 -0
  58. package/dist/interface/output/globals.js.map +1 -0
  59. package/dist/interface/output/index.d.ts +3 -3
  60. package/dist/interface/output/index.d.ts.map +1 -1
  61. package/dist/{interface/output/global → objects/config/globals}/ignores.d.ts +1 -1
  62. package/dist/objects/config/globals/ignores.d.ts.map +1 -0
  63. package/dist/objects/config/globals/ignores.js.map +1 -0
  64. package/dist/{interface/output/global → objects/config/globals}/system.d.ts +1 -1
  65. package/dist/objects/config/globals/system.d.ts.map +1 -0
  66. package/dist/objects/config/globals/system.js.map +1 -0
  67. package/dist/objects/config/index.d.ts +4 -14
  68. package/dist/objects/config/index.d.ts.map +1 -1
  69. package/dist/objects/config/scoped.d.ts +15 -0
  70. package/dist/objects/config/scoped.d.ts.map +1 -0
  71. package/dist/{interface/output → objects/config}/scoped.js.map +1 -1
  72. package/dist/objects/index.d.ts +1 -1
  73. package/dist/objects/index.d.ts.map +1 -1
  74. package/package.json +1 -1
  75. package/src/factory/index.ts +1 -1
  76. package/src/factory/options/index.ts +1 -1
  77. package/src/factory/options/option/index.ts +92 -91
  78. package/src/index.ts +19 -9
  79. package/src/interface/index.ts +11 -9
  80. package/src/interface/input/global/ignores/defaults.ts +6 -0
  81. package/src/interface/input/global/ignores/extend.ts +5 -0
  82. package/src/interface/input/global/ignores/index.ts +9 -0
  83. package/src/interface/input/global/index.ts +7 -0
  84. package/src/interface/input/imports/index.ts +1 -1
  85. package/src/interface/input/index.ts +12 -3
  86. package/src/interface/input/{user → scoped}/index.ts +1 -1
  87. package/src/interface/input/settings/env.ts +6 -0
  88. package/src/interface/input/settings/index.ts +7 -0
  89. package/src/interface/output/globals.ts +9 -0
  90. package/src/interface/output/index.ts +4 -5
  91. package/src/{interface/output/global → objects/config/globals}/ignores.ts +1 -1
  92. package/src/{interface/output/global → objects/config/globals}/system.ts +1 -1
  93. package/src/objects/config/index.ts +7 -15
  94. package/src/objects/config/scoped.ts +15 -0
  95. package/src/objects/index.ts +3 -2
  96. package/typings/common/utility/primitive/cast/number.d.ts +13 -3
  97. package/typings/common/utility/primitive/cast/number.spec.d.ts +57 -0
  98. package/dist/interface/input/user/files/defaults.d.ts.map +0 -1
  99. package/dist/interface/input/user/files/defaults.js.map +0 -1
  100. package/dist/interface/input/user/files/includes.d.ts.map +0 -1
  101. package/dist/interface/input/user/files/includes.js.map +0 -1
  102. package/dist/interface/input/user/files/index.d.ts.map +0 -1
  103. package/dist/interface/input/user/files/index.js.map +0 -1
  104. package/dist/interface/input/user/index.d.ts.map +0 -1
  105. package/dist/interface/input/user/index.js.map +0 -1
  106. package/dist/interface/input/user/rules/defaults.d.ts.map +0 -1
  107. package/dist/interface/input/user/rules/defaults.js.map +0 -1
  108. package/dist/interface/input/user/rules/index.d.ts.map +0 -1
  109. package/dist/interface/input/user/rules/index.js.map +0 -1
  110. package/dist/interface/input/user/rules/overrides.d.ts.map +0 -1
  111. package/dist/interface/input/user/rules/overrides.js.map +0 -1
  112. package/dist/interface/output/global/ignores.d.ts.map +0 -1
  113. package/dist/interface/output/global/ignores.js.map +0 -1
  114. package/dist/interface/output/global/index.d.ts +0 -8
  115. package/dist/interface/output/global/index.d.ts.map +0 -1
  116. package/dist/interface/output/global/index.js.map +0 -1
  117. package/dist/interface/output/global/system.d.ts.map +0 -1
  118. package/dist/interface/output/global/system.js.map +0 -1
  119. package/dist/interface/output/scoped.d.ts +0 -3
  120. package/dist/interface/output/scoped.d.ts.map +0 -1
  121. package/src/interface/output/global/index.ts +0 -12
  122. package/src/interface/output/scoped.ts +0 -3
  123. /package/dist/interface/input/{user/files → global/ignores}/defaults.js +0 -0
  124. /package/dist/interface/input/{user/files → global/ignores}/index.js +0 -0
  125. /package/dist/interface/input/{user → global}/index.js +0 -0
  126. /package/dist/interface/input/{user → scoped}/files/defaults.d.ts +0 -0
  127. /package/dist/interface/input/{user/rules → scoped/files}/defaults.js +0 -0
  128. /package/dist/interface/input/{user → scoped}/files/includes.d.ts +0 -0
  129. /package/dist/interface/input/{user → scoped}/files/includes.js +0 -0
  130. /package/dist/interface/input/{user → scoped}/files/index.d.ts +0 -0
  131. /package/dist/interface/input/{user/rules → scoped/files}/index.js +0 -0
  132. /package/dist/interface/{output/global → input/scoped}/index.js +0 -0
  133. /package/dist/interface/input/{user → scoped}/rules/defaults.d.ts +0 -0
  134. /package/dist/interface/input/{user → scoped}/rules/index.d.ts +0 -0
  135. /package/dist/interface/input/{user → scoped}/rules/overrides.d.ts +0 -0
  136. /package/dist/interface/input/{user → scoped}/rules/overrides.js +0 -0
  137. /package/dist/{interface/output/global → objects/config/globals}/ignores.js +0 -0
  138. /package/dist/{interface/output/global → objects/config/globals}/system.js +0 -0
  139. /package/dist/{interface/output → objects/config}/scoped.js +0 -0
  140. /package/src/interface/input/{user → scoped}/files/defaults.ts +0 -0
  141. /package/src/interface/input/{user → scoped}/files/includes.ts +0 -0
  142. /package/src/interface/input/{user → scoped}/files/index.ts +0 -0
  143. /package/src/interface/input/{user → scoped}/rules/defaults.ts +0 -0
  144. /package/src/interface/input/{user → scoped}/rules/index.ts +0 -0
  145. /package/src/interface/input/{user → scoped}/rules/overrides.ts +0 -0
@@ -1,91 +1,92 @@
1
- import globals from "globals";
2
- import type {
3
- Scope,
4
- Config,
5
- } from "..";
6
- import type {
7
- OptionTemplate,
8
- LanguageOptions,
9
- Globals,
10
- } from "./template";
11
-
12
- export default abstract class Option<
13
- S extends Scope,
14
- ParserOptions extends
15
- | object
16
- | boolean = false,
17
- ParserCount extends 0 | 1 | 2 = 0,
18
- Global extends Globals = never,
19
- Processor extends object = never,
20
- Language extends object = never,
21
- > {
22
- public abstract readonly scope: literalful<S>;
23
- public abstract readonly processor: Interface<Processor> extends never
24
- ? object
25
- : Interface<Processor> extends Readonly<Record<"processor", string>>
26
- ? Interface<Processor>
27
- : object;
28
- public abstract readonly language: Interface<Language> extends never
29
- ? object
30
- : Interface<Language> extends Readonly<Record<"language", string>>
31
- ? Interface<Language>
32
- : object;
33
-
34
- constructor(
35
- public readonly parser: Tuple<ParserCount, unknown>,
36
- public readonly files: string[],
37
- public readonly ruleset: Ruleset,
38
- ) {}
39
-
40
- public get configs(): Config[] {
41
- const {
42
- scope,
43
- ruleset,
44
- files,
45
- option,
46
- } = this;
47
-
48
- if (ruleset.scope !== scope)
49
- throw new TypeError(`Scope mismatch between option and ruleset`, { cause: { option: scope, ruleset: ruleset.scope } });
50
-
51
- return files.length < 1
52
- ? []
53
- : ruleset.ruleset.map(({ id, rule }) => {
54
- return {
55
- name: `linted/${id}`,
56
- files,
57
- ignores: [],
58
- rules: rule,
59
- ...option,
60
- };
61
- });
62
- }
63
-
64
- private get option() {
65
- try {
66
- const {
67
- languageOptions,
68
- processor,
69
- language,
70
- } = this;
71
-
72
- return {
73
- languageOptions,
74
- ...processor,
75
- ...language,
76
- } satisfies OptionTemplate<
77
- ParserOptions,
78
- Global,
79
- Processor,
80
- Language
81
- >;
82
- }
83
- catch (e) { throw new Error(`linted.factory.Option/scope:${this.scope}: option`, { cause: e }); }
84
- }
85
-
86
- protected abstract get languageOptions(): LanguageOptions<ParserOptions, Global>;
87
-
88
- protected globals(type: Global) {
89
- return globals[type];
90
- }
91
- }
1
+ import globals from "globals";
2
+ import type {
3
+ Scope,
4
+ ScopedConfig,
5
+ } from "..";
6
+ import type {
7
+ OptionTemplate,
8
+ LanguageOptions,
9
+ Globals,
10
+ } from "./template";
11
+ import type { Ruleset } from "../../rulesets/ruleset";
12
+
13
+ export default abstract class Option<
14
+ S extends Scope,
15
+ ParserOptions extends
16
+ | object
17
+ | boolean = false,
18
+ ParserCount extends 0 | 1 | 2 = 0,
19
+ Global extends Globals = never,
20
+ Processor extends object = never,
21
+ Language extends object = never,
22
+ > {
23
+ public abstract readonly scope: literalful<S>;
24
+ public abstract readonly processor: Interface<Processor> extends never
25
+ ? object
26
+ : Interface<Processor> extends Readonly<Record<"processor", string>>
27
+ ? Interface<Processor>
28
+ : object;
29
+ public abstract readonly language: Interface<Language> extends never
30
+ ? object
31
+ : Interface<Language> extends Readonly<Record<"language", string>>
32
+ ? Interface<Language>
33
+ : object;
34
+
35
+ constructor(
36
+ public readonly parser: Tuple<ParserCount, unknown>,
37
+ public readonly files: string[],
38
+ public readonly ruleset: Ruleset,
39
+ ) {}
40
+
41
+ public get configs(): ScopedConfig[] {
42
+ const {
43
+ scope,
44
+ ruleset,
45
+ files,
46
+ option,
47
+ } = this;
48
+
49
+ if (ruleset.scope !== scope)
50
+ throw new TypeError(`Scope mismatch between option and ruleset`, { cause: { option: scope, ruleset: ruleset.scope } });
51
+
52
+ return files.length < 1
53
+ ? []
54
+ : ruleset.ruleset.map(({ id, rule }) => {
55
+ return {
56
+ name: `linted/${id}`,
57
+ files,
58
+ ignores: [],
59
+ rules: rule,
60
+ ...option,
61
+ };
62
+ });
63
+ }
64
+
65
+ private get option() {
66
+ try {
67
+ const {
68
+ languageOptions,
69
+ processor,
70
+ language,
71
+ } = this;
72
+
73
+ return {
74
+ languageOptions,
75
+ ...processor,
76
+ ...language,
77
+ } satisfies OptionTemplate<
78
+ ParserOptions,
79
+ Global,
80
+ Processor,
81
+ Language
82
+ >;
83
+ }
84
+ catch (e) { throw new Error(`linted.factory.Option/scope:${this.scope}: option`, { cause: e }); }
85
+ }
86
+
87
+ protected abstract get languageOptions(): LanguageOptions<ParserOptions, Global>;
88
+
89
+ protected globals(type: Global) {
90
+ return globals[type];
91
+ }
92
+ }
package/src/index.ts CHANGED
@@ -4,8 +4,9 @@ export type {
4
4
  RuleEntry,
5
5
  RuleRecord,
6
6
  RuleState,
7
- Config,
8
- ConfigProperty,
7
+ ScopedConfig,
8
+ GlobalConfigIgnores,
9
+ GlobalConfigSystem,
9
10
  } from "./objects";
10
11
 
11
12
  import type {
@@ -29,6 +30,8 @@ export default function (input: Input): Output {
29
30
  const {
30
31
  plugins,
31
32
  parsers,
33
+ settings,
34
+ ignores,
32
35
  files,
33
36
  rules,
34
37
  } = input,
@@ -78,20 +81,27 @@ export default function (input: Input): Output {
78
81
 
79
82
  return [
80
83
  {
81
- ignores: [],
82
- } as const,
84
+ ignores: typeof ignores.extend.ignores === "undefined" || ignores.extend.ignores.length < 1
85
+ ? ignores.ignores.ignores
86
+ : [
87
+ ...ignores.extend.inherit === false
88
+ ? []
89
+ : ignores.ignores.ignores,
90
+ ...ignores.extend.ignores,
91
+ ],
92
+ },
83
93
  {
84
94
  name: "linted",
85
95
  plugins,
86
96
  linterOptions: {
87
- noInlineConfig: true,
88
- reportUnusedDisableDirectives: "error",
97
+ noInlineConfig: settings.noInlineConfig,
98
+ reportUnusedDisableDirectives: settings.reportUnusedDisableDirectives,
89
99
  },
90
100
  languageOptions: {
91
- sourceType: "module",
92
- ecmaVersion: 2023,
101
+ sourceType: settings.sourceType,
102
+ ecmaVersion: settings.ecmaVersion,
93
103
  },
94
- } as const,
104
+ },
95
105
  ...scopes.flatMap(scope => options[scope]),
96
106
  ];
97
107
  }
@@ -1,9 +1,11 @@
1
- export type {
2
- Scope,
3
- Plugins,
4
- RuleEntry,
5
- RuleRecord,
6
- Config,
7
- ConfigProperty,
8
- } from "..";
9
- export type { Output } from "./output";
1
+ export type {
2
+ Scope,
3
+ Plugins,
4
+ RuleEntry,
5
+ RuleRecord,
6
+ ScopedConfig,
7
+ GlobalConfigIgnores,
8
+ GlobalConfigSystem,
9
+ } from "..";
10
+ export type { Input } from "./input";
11
+ export type { Output } from "./output";
@@ -0,0 +1,6 @@
1
+ import type { GlobalConfigIgnores } from ".";
2
+
3
+ export type GlobalIgnoreDefaults = Pick<
4
+ GlobalConfigIgnores,
5
+ "ignores"
6
+ >;
@@ -0,0 +1,5 @@
1
+ import type { GlobalIgnoreDefaults } from "./defaults";
2
+
3
+ export type GlobalIgnoreExtend = {
4
+ inherit?: boolean;
5
+ } & Partial<GlobalIgnoreDefaults>;
@@ -0,0 +1,9 @@
1
+ export type { GlobalConfigIgnores } from "..";
2
+
3
+ import type { GlobalIgnoreDefaults } from "./defaults";
4
+ import type { GlobalIgnoreExtend } from "./extend";
5
+
6
+ export interface InputGlobalIgnores {
7
+ ignores: GlobalIgnoreDefaults;
8
+ extend: GlobalIgnoreExtend;
9
+ }
@@ -0,0 +1,7 @@
1
+ export type { GlobalConfigIgnores } from "..";
2
+
3
+ import type { InputGlobalIgnores } from "./ignores";
4
+
5
+ export interface InputGlobal {
6
+ ignores: InputGlobalIgnores;
7
+ }
@@ -6,7 +6,7 @@ export type {
6
6
  import type { InputPlugins } from "./plugins";
7
7
  import type { InputParsers } from "./parsers";
8
8
 
9
- export interface Imports {
9
+ export interface InputImports {
10
10
  plugins: InputPlugins;
11
11
  parsers: InputParsers;
12
12
  }
@@ -3,9 +3,18 @@ export type {
3
3
  Plugins,
4
4
  RuleEntry,
5
5
  RuleRecord,
6
+ GlobalConfigSystem,
7
+ GlobalConfigIgnores,
6
8
  } from "..";
7
9
 
8
- import type { Imports } from "./imports";
9
- import type { User } from "./user";
10
+ import type { InputImports } from "./imports";
11
+ import type { InputSettings } from "./settings";
12
+ import type { InputGlobal } from "./global";
13
+ import type { InputScoped } from "./scoped";
10
14
 
11
- export type Input = Imports & User;
15
+ export type Input = (
16
+ & InputImports
17
+ & InputSettings
18
+ & InputGlobal
19
+ & InputScoped
20
+ );
@@ -7,7 +7,7 @@ export type {
7
7
  import type { InputFiles } from "./files";
8
8
  import type { InputRules } from "./rules";
9
9
 
10
- export interface User {
10
+ export interface InputScoped {
11
11
  files: InputFiles;
12
12
  rules: InputRules;
13
13
  }
@@ -0,0 +1,6 @@
1
+ import type { GlobalConfigSystem } from ".";
2
+
3
+ export type InputEnvironment = Required<
4
+ & GlobalConfigSystem["linterOptions"]
5
+ & GlobalConfigSystem["languageOptions"]
6
+ >;
@@ -0,0 +1,7 @@
1
+ export type { GlobalConfigSystem } from "..";
2
+
3
+ import type { InputEnvironment } from "./env";
4
+
5
+ export interface InputSettings {
6
+ settings: InputEnvironment;
7
+ }
@@ -0,0 +1,9 @@
1
+ import type {
2
+ GlobalConfigIgnores,
3
+ GlobalConfigSystem,
4
+ } from ".";
5
+
6
+ export type GlobalConfigs = readonly [
7
+ GlobalConfigIgnores,
8
+ GlobalConfigSystem,
9
+ ];
@@ -1,11 +1,10 @@
1
1
  export type {
2
- Plugins,
3
- Config,
4
- ConfigProperty,
2
+ GlobalConfigIgnores,
3
+ GlobalConfigSystem,
5
4
  } from "..";
6
5
 
7
- import type { GlobalConfigs } from "./global";
8
- import type { ScopedConfig } from "./scoped";
6
+ import type { GlobalConfigs } from "./globals";
7
+ import type { ScopedConfig } from "..";
9
8
 
10
9
  export type Output = [
11
10
  ...GlobalConfigs,
@@ -1,4 +1,4 @@
1
- import type { ConfigProperty } from ".";
1
+ import type { ConfigProperty } from "..";
2
2
 
3
3
  export type GlobalConfigIgnores = Partial<Record<
4
4
  Exclude<
@@ -1,7 +1,7 @@
1
1
  import type {
2
2
  Plugins,
3
3
  ConfigProperty,
4
- } from ".";
4
+ } from "..";
5
5
 
6
6
  export type GlobalConfigSystem = Partial<Record<
7
7
  Exclude<
@@ -1,16 +1,8 @@
1
- import type { RuleRecord } from "..";
2
-
3
- export interface Config {
4
- name: `linted/${string}`;
5
- rules: RuleRecord;
6
- files: string[];
7
- ignores: string[];
8
- languageOptions: {
9
- parser?: unknown;
10
- parserOptions?: Table;
11
- globals?: Table<true>;
12
- };
13
- processor?: string;
14
- language?: string;
15
- }
1
+ export type {
2
+ Plugins,
3
+ RuleRecord,
4
+ } from "..";
16
5
  export type { ConfigProperty } from "./property";
6
+ export type { ScopedConfig } from "./scoped";
7
+ export type { GlobalConfigIgnores } from "./globals/ignores";
8
+ export type { GlobalConfigSystem } from "./globals/system";
@@ -0,0 +1,15 @@
1
+ import type { RuleRecord } from ".";
2
+
3
+ export interface ScopedConfig {
4
+ name: `linted/${string}`;
5
+ rules: RuleRecord;
6
+ files: string[];
7
+ ignores: string[];
8
+ languageOptions: {
9
+ parser?: unknown;
10
+ parserOptions?: Table;
11
+ globals?: Table<true>;
12
+ };
13
+ processor?: string;
14
+ language?: string;
15
+ }
@@ -5,6 +5,7 @@ export type {
5
5
  RuleState,
6
6
  } from "./rule";
7
7
  export type {
8
- Config,
9
- ConfigProperty,
8
+ ScopedConfig,
9
+ GlobalConfigIgnores,
10
+ GlobalConfigSystem,
10
11
  } from "./config";
@@ -1,3 +1,13 @@
1
- declare type ToNumber<Value extends string> = literalful<Value> extends `${infer Number extends number}`
2
- ? Number
3
- : never;
1
+ declare type ToNumber<Value extends string> = literalful<Value> extends never
2
+ ? never
3
+ : literalful<Value> extends literalful<Exclude<literalful<Value>, "0" | "-0" >>
4
+ ? literalful<Value> extends `${infer Number extends number}`
5
+ ? number extends Number
6
+ ? never
7
+ : Number
8
+ : never
9
+ : literalful<Exclude<literalful<Value>, "0" | "-0" >> extends `${infer Number extends number}`
10
+ ? number extends Number
11
+ ? never
12
+ : 0 | Number
13
+ : never;
@@ -0,0 +1,57 @@
1
+ declare namespace ToNumber {
2
+ export type OK = Tester<TF> | 0;
3
+ export type TF = {
4
+ T: {
5
+ T0: ToNumber<"0">;
6
+ T0a: ToNumber<"-0">;
7
+ T1: ToNumber<"0" | "-0">;
8
+ T2: ToNumber<"0" | "1">;
9
+ T2a: ToNumber<"-0" | "1">;
10
+ T2d: ToNumber<"0" | "-1">;
11
+ T2e: ToNumber<"-0" | "-1">;
12
+ T3: ToNumber<"1">;
13
+ T3a: ToNumber<"-1">;
14
+ T4: ToNumber<"0.1">;
15
+ T4b: ToNumber<"-0.1">;
16
+ T6: ToNumber<"5" | "9">;
17
+ T6a: ToNumber<"5" | "-9">;
18
+ T6b: ToNumber<"5" | "0.9">;
19
+ T6c: ToNumber<"5" | "-0.9">;
20
+ Tn: ToNumber<`1${1 | 2 | 3 | 4}`>;
21
+ Tna: ToNumber<`-1${1 | 2 | 3 | 4}`>;
22
+ Tnb: ToNumber<`1${1 | 2 | 3 | 4}` | `-1${1 | 2 | 3 | 4}`>;
23
+ Tnc: ToNumber<"-0" | `1${1 | 2 | 3 | 4}` | `-1${1 | 2 | 3 | 4}`>;
24
+ };
25
+ F: {
26
+ F0: ToNumber<string>;
27
+ F1: ToNumber<"">;
28
+ F2: ToNumber<"NaN">;
29
+ F2a: ToNumber<"Infinity">;
30
+ F2b: ToNumber<"-Infinity">;
31
+ F3: ToNumber<"0.0">;
32
+ F3a: ToNumber<"-0.0">;
33
+ F3d: ToNumber<"1.0">;
34
+ F3e: ToNumber<"-1.0">;
35
+ F4: ToNumber<"0.0" | "-0">;
36
+ F4a: ToNumber<"-0.0" | "-0">;
37
+ F4b: ToNumber<"-0.0" | "0">;
38
+ F4c: ToNumber<"0.0" | "-1">;
39
+ F4d: ToNumber<"-0.0" | "-1">;
40
+ F4e: ToNumber<"0.0" | "1">;
41
+ F4f: ToNumber<"-0.0" | "1">;
42
+ F4g: ToNumber<"0" | "-1.0">;
43
+ F4h: ToNumber<"-0" | "-1.0">;
44
+ F4i: ToNumber<"0.0" | "-1.0">;
45
+ F4j: ToNumber<"-0.0" | "-1.0">;
46
+ F5: ToNumber<".1">;
47
+ F5a: ToNumber<"-.1">;
48
+ F6: ToNumber<"" | "0">;
49
+ F6a: ToNumber<"" | "1">;
50
+ F6b: ToNumber<"1" | ".9">;
51
+ F6c: ToNumber<"5" | ".9">;
52
+ F6d: ToNumber<"5" | "-.9">;
53
+ Fn: ToNumber<`1${number}`>;
54
+ Fna: ToNumber<`-1${number}`>;
55
+ };
56
+ };
57
+ }
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../../../src/interface/input/user/files/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE/B,MAAM,MAAM,aAAa,GAAG,MAAM,CAChC,KAAK,EACL,MAAM,EAAE,CACT,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../../../src/interface/input/user/files/defaults.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"includes.d.ts","sourceRoot":"","sources":["../../../../../src/interface/input/user/files/includes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,MAAM,aAAa,GAAG,OAAO,CACjC,aAAa,CACd,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"includes.js","sourceRoot":"","sources":["../../../../../src/interface/input/user/files/includes.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/interface/input/user/files/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAEhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,aAAa,CAAC;CACzB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/interface/input/user/files/index.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/user/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,KAAK,EACL,SAAS,EACT,UAAU,GACX,MAAM,IAAI,CAAC;AAEZ,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,UAAU,CAAC;CACnB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interface/input/user/index.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../../../src/interface/input/user/rules/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,SAAS,EACV,MAAM,GAAG,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,CAChC,KAAK,EACL,SAAS,EAAE,CACZ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../../../src/interface/input/user/rules/defaults.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/interface/input/user/rules/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,KAAK,EACL,SAAS,EACT,UAAU,GACX,MAAM,IAAI,CAAC;AAEZ,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,cAAc,CAAC;CAC3B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/interface/input/user/rules/index.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"overrides.d.ts","sourceRoot":"","sources":["../../../../../src/interface/input/user/rules/overrides.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,MAAM,cAAc,GAAG,SAAS,CACpC,MAAM,aAAa,EACnB,UAAU,CACX,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"overrides.js","sourceRoot":"","sources":["../../../../../src/interface/input/user/rules/overrides.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ignores.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/global/ignores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,GAAG,CAAC;AAExC,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAC9C,OAAO,CACL,cAAc,EACd,SAAS,CACV,EACD,KAAK,CACN,CAAC,GAAG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ignores.js","sourceRoot":"","sources":["../../../../src/interface/output/global/ignores.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- export type { Plugins, ConfigProperty, } from "../index.js";
2
- import type { GlobalConfigIgnores } from "./ignores.js";
3
- import type { GlobalConfigSystem } from "./system.js";
4
- export type GlobalConfigs = readonly [
5
- GlobalConfigIgnores,
6
- GlobalConfigSystem
7
- ];
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/global/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,OAAO,EACP,cAAc,GACf,MAAM,IAAI,CAAC;AAEZ,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,MAAM,MAAM,aAAa,GAAG,SAAS;IACnC,mBAAmB;IACnB,kBAAkB;CACnB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interface/output/global/index.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../../src/interface/output/global/system.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,GAAG,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAC7C,OAAO,CACL,cAAc,EACZ,MAAM,GACN,SAAS,GACT,eAAe,GACf,iBAAiB,CACpB,EACD,KAAK,CACN,CAAC,GAAG;IACH,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE;QACb,cAAc,EAAE,OAAO,CAAC;QACxB,6BAA6B,EACzB,OAAO,GACP,MAAM,GACN,KAAK,CACR;KACF,CAAC;IACF,eAAe,EAAE;QACf,UAAU,CAAC,EACP,QAAQ,GACR,QAAQ,CACX;QACD,WAAW,CAAC,EACR,QAAQ,GACR,CAAC,GACD,CAAC,GACD,QAAQ,CAAC,KAAK,CACZ,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,CACL,EAAE,CAAC,CAAC;KACR,CAAC;CACH,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"system.js","sourceRoot":"","sources":["../../../../src/interface/output/global/system.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import type { Config } from "./index.js";
2
- export type ScopedConfig = Config;
3
- //# sourceMappingURL=scoped.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scoped.d.ts","sourceRoot":"","sources":["../../../src/interface/output/scoped.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;AAEhC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC"}
@@ -1,12 +0,0 @@
1
- export type {
2
- Plugins,
3
- ConfigProperty,
4
- } from "..";
5
-
6
- import type { GlobalConfigIgnores } from "./ignores";
7
- import type { GlobalConfigSystem } from "./system";
8
-
9
- export type GlobalConfigs = readonly [
10
- GlobalConfigIgnores,
11
- GlobalConfigSystem,
12
- ];
@@ -1,3 +0,0 @@
1
- import type { Config } from ".";
2
-
3
- export type ScopedConfig = Config;