@eslinted/core 4.0.4 → 4.0.5-rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (236) hide show
  1. package/package.json +8 -4
  2. package/src/factory/{files/index.ts → files.ts} +4 -4
  3. package/src/factory/index.ts +3 -6
  4. package/src/factory/options/{option/html/index.ts → html.ts} +1 -1
  5. package/src/factory/options/index.ts +9 -9
  6. package/src/factory/options/{option/js/index.ts → js.ts} +1 -1
  7. package/src/factory/options/{option/json/index.ts → json.ts} +1 -1
  8. package/src/factory/options/{option/jsonc/index.ts → jsonc.ts} +1 -1
  9. package/src/factory/options/{option/md/index.ts → md.ts} +1 -1
  10. package/src/factory/options/{option/mocha/index.ts → mocha.ts} +2 -2
  11. package/src/factory/options/option/index.ts +19 -13
  12. package/src/factory/options/option/params/globals.ts +3 -0
  13. package/src/{boundary/output/config/option/language/index.ts → factory/options/option/params/language.ts} +3 -5
  14. package/src/factory/options/option/params/languageOptions/ecma.ts +1 -0
  15. package/src/factory/options/option/params/languageOptions/source.ts +1 -0
  16. package/src/{boundary/output/config/option/linter/index.ts → factory/options/option/params/linter.ts} +1 -1
  17. package/src/factory/options/option/params/plugins.ts +1 -0
  18. package/src/factory/options/option/template.ts +24 -0
  19. package/src/factory/options/{option/svelte/index.ts → svelte.ts} +2 -2
  20. package/src/factory/options/{option/ts/index.ts → ts.ts} +2 -2
  21. package/src/factory/options/{option/yml/index.ts → yml.ts} +1 -1
  22. package/src/factory/{rulesets/ruleset → ruleset}/index.ts +5 -4
  23. package/src/factory/ruleset/rule.ts +8 -0
  24. package/src/factory/{rulesets/index.ts → rulesets.ts} +5 -5
  25. package/src/index.ts +23 -19
  26. package/src/input.ts +11 -0
  27. package/src/inputs/files/base.ts +3 -0
  28. package/src/inputs/files/includes.ts +3 -0
  29. package/src/inputs/files.ts +7 -0
  30. package/src/inputs/imports/parsers.ts +11 -0
  31. package/src/{dependency/plugins/index.ts → inputs/imports/plugins.ts} +2 -5
  32. package/src/inputs/imports.ts +2 -0
  33. package/src/inputs/parsers.ts +3 -0
  34. package/src/inputs/plugins.ts +3 -0
  35. package/src/inputs/rules/entry/index.ts +3 -0
  36. package/src/inputs/rules/entry/object/index.ts +7 -0
  37. package/src/inputs/rules/entry/object/state/index.ts +4 -0
  38. package/src/inputs/rules/overrides.ts +4 -0
  39. package/src/inputs/rules/preset.ts +4 -0
  40. package/src/inputs/rules.ts +7 -0
  41. package/src/{boundary/output/config/index.ts → output.ts} +3 -4
  42. package/src/{scopes/index.ts → scopes.ts} +1 -3
  43. package/dist/boundary/index.d.ts +0 -9
  44. package/dist/boundary/index.d.ts.map +0 -1
  45. package/dist/boundary/index.js +0 -2
  46. package/dist/boundary/index.js.map +0 -1
  47. package/dist/boundary/input/files/default/index.d.ts +0 -4
  48. package/dist/boundary/input/files/default/index.d.ts.map +0 -1
  49. package/dist/boundary/input/files/default/index.js +0 -2
  50. package/dist/boundary/input/files/default/index.js.map +0 -1
  51. package/dist/boundary/input/files/includes/index.d.ts +0 -4
  52. package/dist/boundary/input/files/includes/index.d.ts.map +0 -1
  53. package/dist/boundary/input/files/includes/index.js +0 -2
  54. package/dist/boundary/input/files/includes/index.js.map +0 -1
  55. package/dist/boundary/input/files/index.d.ts +0 -8
  56. package/dist/boundary/input/files/index.d.ts.map +0 -1
  57. package/dist/boundary/input/files/index.js +0 -2
  58. package/dist/boundary/input/files/index.js.map +0 -1
  59. package/dist/boundary/input/index.d.ts +0 -14
  60. package/dist/boundary/input/index.d.ts.map +0 -1
  61. package/dist/boundary/input/index.js +0 -2
  62. package/dist/boundary/input/index.js.map +0 -1
  63. package/dist/boundary/input/parsers/index.d.ts +0 -4
  64. package/dist/boundary/input/parsers/index.d.ts.map +0 -1
  65. package/dist/boundary/input/parsers/index.js +0 -2
  66. package/dist/boundary/input/parsers/index.js.map +0 -1
  67. package/dist/boundary/input/plugins/index.d.ts +0 -6
  68. package/dist/boundary/input/plugins/index.d.ts.map +0 -1
  69. package/dist/boundary/input/plugins/index.js +0 -2
  70. package/dist/boundary/input/plugins/index.js.map +0 -1
  71. package/dist/boundary/input/rules/index.d.ts +0 -8
  72. package/dist/boundary/input/rules/index.d.ts.map +0 -1
  73. package/dist/boundary/input/rules/index.js +0 -2
  74. package/dist/boundary/input/rules/index.js.map +0 -1
  75. package/dist/boundary/input/rules/overrides/index.d.ts +0 -5
  76. package/dist/boundary/input/rules/overrides/index.d.ts.map +0 -1
  77. package/dist/boundary/input/rules/overrides/index.js +0 -2
  78. package/dist/boundary/input/rules/overrides/index.js.map +0 -1
  79. package/dist/boundary/input/rules/preset/entry/index.d.ts +0 -4
  80. package/dist/boundary/input/rules/preset/entry/index.d.ts.map +0 -1
  81. package/dist/boundary/input/rules/preset/entry/index.js +0 -2
  82. package/dist/boundary/input/rules/preset/entry/index.js.map +0 -1
  83. package/dist/boundary/input/rules/preset/entry/object/index.d.ts +0 -4
  84. package/dist/boundary/input/rules/preset/entry/object/index.d.ts.map +0 -1
  85. package/dist/boundary/input/rules/preset/entry/object/index.js +0 -2
  86. package/dist/boundary/input/rules/preset/entry/object/index.js.map +0 -1
  87. package/dist/boundary/input/rules/preset/entry/object/state/index.d.ts +0 -3
  88. package/dist/boundary/input/rules/preset/entry/object/state/index.d.ts.map +0 -1
  89. package/dist/boundary/input/rules/preset/entry/object/state/index.js +0 -2
  90. package/dist/boundary/input/rules/preset/entry/object/state/index.js.map +0 -1
  91. package/dist/boundary/input/rules/preset/index.d.ts +0 -5
  92. package/dist/boundary/input/rules/preset/index.d.ts.map +0 -1
  93. package/dist/boundary/input/rules/preset/index.js +0 -2
  94. package/dist/boundary/input/rules/preset/index.js.map +0 -1
  95. package/dist/boundary/output/config/index.d.ts +0 -22
  96. package/dist/boundary/output/config/index.d.ts.map +0 -1
  97. package/dist/boundary/output/config/index.js +0 -2
  98. package/dist/boundary/output/config/index.js.map +0 -1
  99. package/dist/boundary/output/config/option/index.d.ts +0 -14
  100. package/dist/boundary/output/config/option/index.d.ts.map +0 -1
  101. package/dist/boundary/output/config/option/index.js +0 -2
  102. package/dist/boundary/output/config/option/index.js.map +0 -1
  103. package/dist/boundary/output/config/option/language/ecma/index.d.ts +0 -3
  104. package/dist/boundary/output/config/option/language/ecma/index.d.ts.map +0 -1
  105. package/dist/boundary/output/config/option/language/ecma/index.js +0 -2
  106. package/dist/boundary/output/config/option/language/ecma/index.js.map +0 -1
  107. package/dist/boundary/output/config/option/language/index.d.ts +0 -15
  108. package/dist/boundary/output/config/option/language/index.d.ts.map +0 -1
  109. package/dist/boundary/output/config/option/language/index.js +0 -2
  110. package/dist/boundary/output/config/option/language/index.js.map +0 -1
  111. package/dist/boundary/output/config/option/language/source/index.d.ts +0 -3
  112. package/dist/boundary/output/config/option/language/source/index.d.ts.map +0 -1
  113. package/dist/boundary/output/config/option/language/source/index.js +0 -2
  114. package/dist/boundary/output/config/option/language/source/index.js.map +0 -1
  115. package/dist/boundary/output/config/option/linter/index.d.ts +0 -5
  116. package/dist/boundary/output/config/option/linter/index.d.ts.map +0 -1
  117. package/dist/boundary/output/config/option/linter/index.js +0 -2
  118. package/dist/boundary/output/config/option/linter/index.js.map +0 -1
  119. package/dist/boundary/output/config/option/plugins/index.d.ts +0 -5
  120. package/dist/boundary/output/config/option/plugins/index.d.ts.map +0 -1
  121. package/dist/boundary/output/config/option/plugins/index.js +0 -2
  122. package/dist/boundary/output/config/option/plugins/index.js.map +0 -1
  123. package/dist/boundary/output/index.d.ts +0 -3
  124. package/dist/boundary/output/index.d.ts.map +0 -1
  125. package/dist/boundary/output/index.js +0 -2
  126. package/dist/boundary/output/index.js.map +0 -1
  127. package/dist/dependency/globals/index.d.ts +0 -4
  128. package/dist/dependency/globals/index.d.ts.map +0 -1
  129. package/dist/dependency/globals/index.js +0 -2
  130. package/dist/dependency/globals/index.js.map +0 -1
  131. package/dist/dependency/index.d.ts +0 -5
  132. package/dist/dependency/index.d.ts.map +0 -1
  133. package/dist/dependency/index.js +0 -2
  134. package/dist/dependency/index.js.map +0 -1
  135. package/dist/dependency/parsers/index.d.ts +0 -4
  136. package/dist/dependency/parsers/index.d.ts.map +0 -1
  137. package/dist/dependency/parsers/index.js +0 -2
  138. package/dist/dependency/parsers/index.js.map +0 -1
  139. package/dist/dependency/plugins/index.d.ts +0 -3
  140. package/dist/dependency/plugins/index.d.ts.map +0 -1
  141. package/dist/dependency/plugins/index.js +0 -2
  142. package/dist/dependency/plugins/index.js.map +0 -1
  143. package/dist/factory/files/index.d.ts +0 -8
  144. package/dist/factory/files/index.d.ts.map +0 -1
  145. package/dist/factory/files/index.js +0 -16
  146. package/dist/factory/files/index.js.map +0 -1
  147. package/dist/factory/index.d.ts +0 -7
  148. package/dist/factory/index.d.ts.map +0 -1
  149. package/dist/factory/index.js +0 -7
  150. package/dist/factory/index.js.map +0 -1
  151. package/dist/factory/options/index.d.ts +0 -22
  152. package/dist/factory/options/index.d.ts.map +0 -1
  153. package/dist/factory/options/index.js +0 -21
  154. package/dist/factory/options/index.js.map +0 -1
  155. package/dist/factory/options/option/html/index.d.ts +0 -9
  156. package/dist/factory/options/option/html/index.d.ts.map +0 -1
  157. package/dist/factory/options/option/html/index.js +0 -10
  158. package/dist/factory/options/option/html/index.js.map +0 -1
  159. package/dist/factory/options/option/index.d.ts +0 -2989
  160. package/dist/factory/options/option/index.d.ts.map +0 -1
  161. package/dist/factory/options/option/index.js +0 -56
  162. package/dist/factory/options/option/index.js.map +0 -1
  163. package/dist/factory/options/option/js/index.d.ts +0 -10
  164. package/dist/factory/options/option/js/index.d.ts.map +0 -1
  165. package/dist/factory/options/option/js/index.js +0 -12
  166. package/dist/factory/options/option/js/index.js.map +0 -1
  167. package/dist/factory/options/option/json/index.d.ts +0 -9
  168. package/dist/factory/options/option/json/index.d.ts.map +0 -1
  169. package/dist/factory/options/option/json/index.js +0 -10
  170. package/dist/factory/options/option/json/index.js.map +0 -1
  171. package/dist/factory/options/option/jsonc/index.d.ts +0 -9
  172. package/dist/factory/options/option/jsonc/index.d.ts.map +0 -1
  173. package/dist/factory/options/option/jsonc/index.js +0 -10
  174. package/dist/factory/options/option/jsonc/index.js.map +0 -1
  175. package/dist/factory/options/option/md/index.d.ts +0 -9
  176. package/dist/factory/options/option/md/index.d.ts.map +0 -1
  177. package/dist/factory/options/option/md/index.js +0 -10
  178. package/dist/factory/options/option/md/index.js.map +0 -1
  179. package/dist/factory/options/option/mocha/index.d.ts +0 -40
  180. package/dist/factory/options/option/mocha/index.d.ts.map +0 -1
  181. package/dist/factory/options/option/mocha/index.js +0 -17
  182. package/dist/factory/options/option/mocha/index.js.map +0 -1
  183. package/dist/factory/options/option/svelte/index.d.ts +0 -27
  184. package/dist/factory/options/option/svelte/index.d.ts.map +0 -1
  185. package/dist/factory/options/option/svelte/index.js +0 -21
  186. package/dist/factory/options/option/svelte/index.js.map +0 -1
  187. package/dist/factory/options/option/ts/index.d.ts +0 -19
  188. package/dist/factory/options/option/ts/index.d.ts.map +0 -1
  189. package/dist/factory/options/option/ts/index.js +0 -15
  190. package/dist/factory/options/option/ts/index.js.map +0 -1
  191. package/dist/factory/options/option/yml/index.d.ts +0 -9
  192. package/dist/factory/options/option/yml/index.d.ts.map +0 -1
  193. package/dist/factory/options/option/yml/index.js +0 -10
  194. package/dist/factory/options/option/yml/index.js.map +0 -1
  195. package/dist/factory/rulesets/index.d.ts +0 -9
  196. package/dist/factory/rulesets/index.d.ts.map +0 -1
  197. package/dist/factory/rulesets/index.js +0 -17
  198. package/dist/factory/rulesets/index.js.map +0 -1
  199. package/dist/factory/rulesets/ruleset/index.d.ts +0 -13
  200. package/dist/factory/rulesets/ruleset/index.d.ts.map +0 -1
  201. package/dist/factory/rulesets/ruleset/index.js +0 -38
  202. package/dist/factory/rulesets/ruleset/index.js.map +0 -1
  203. package/dist/factory/rulesets/ruleset/rule/index.d.ts +0 -7
  204. package/dist/factory/rulesets/ruleset/rule/index.d.ts.map +0 -1
  205. package/dist/factory/rulesets/ruleset/rule/index.js +0 -9
  206. package/dist/factory/rulesets/ruleset/rule/index.js.map +0 -1
  207. package/dist/index.d.ts +0 -23
  208. package/dist/index.d.ts.map +0 -1
  209. package/dist/index.js +0 -31
  210. package/dist/index.js.map +0 -1
  211. package/dist/scopes/index.d.ts +0 -4
  212. package/dist/scopes/index.d.ts.map +0 -1
  213. package/dist/scopes/index.js +0 -13
  214. package/dist/scopes/index.js.map +0 -1
  215. package/src/boundary/index.ts +0 -15
  216. package/src/boundary/input/files/default/index.ts +0 -8
  217. package/src/boundary/input/files/includes/index.ts +0 -5
  218. package/src/boundary/input/files/index.ts +0 -11
  219. package/src/boundary/input/index.ts +0 -23
  220. package/src/boundary/input/parsers/index.ts +0 -5
  221. package/src/boundary/input/plugins/index.ts +0 -5
  222. package/src/boundary/input/rules/index.ts +0 -14
  223. package/src/boundary/input/rules/overrides/index.ts +0 -6
  224. package/src/boundary/input/rules/preset/entry/index.ts +0 -9
  225. package/src/boundary/input/rules/preset/entry/object/index.ts +0 -13
  226. package/src/boundary/input/rules/preset/entry/object/state/index.ts +0 -10
  227. package/src/boundary/input/rules/preset/index.ts +0 -10
  228. package/src/boundary/output/config/option/index.ts +0 -24
  229. package/src/boundary/output/config/option/language/ecma/index.ts +0 -3
  230. package/src/boundary/output/config/option/language/source/index.ts +0 -3
  231. package/src/boundary/output/config/option/plugins/index.ts +0 -3
  232. package/src/boundary/output/index.ts +0 -3
  233. package/src/dependency/globals/index.ts +0 -8
  234. package/src/dependency/index.ts +0 -5
  235. package/src/dependency/parsers/index.ts +0 -13
  236. package/src/factory/rulesets/ruleset/rule/index.ts +0 -8
@@ -1,13 +0,0 @@
1
- const scopes = [
2
- "js",
3
- "ts",
4
- "svelte",
5
- "mocha",
6
- "html",
7
- "json",
8
- "jsonc",
9
- "yml",
10
- "md",
11
- ];
12
- export default scopes;
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG;IACb,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,IAAI;CACI,CAAC;AAEX,eAAe,MAAM,CAAC"}
@@ -1,15 +0,0 @@
1
- import type * as Input from "./input/index.js";
2
- import type * as Output from "./output/index.js";
3
-
4
- type Output = Output.Config;
5
-
6
- namespace Boundary {
7
- export type Input = Input.Input;
8
- export type Output = Output.Config;
9
- }
10
-
11
- export type {
12
- Input,
13
- Output,
14
- Boundary as default,
15
- };
@@ -1,8 +0,0 @@
1
- import type { Scope } from "../../../../scopes/index.js";
2
-
3
- type FileBase = Readonly<Record<Scope, readonly string[]>>;
4
-
5
- export type {
6
- FileBase,
7
- FileBase as default,
8
- };
@@ -1,5 +0,0 @@
1
- import type * as Includes from "../default/index.js";
2
-
3
- type Includes = Partial<Includes.FileBase>;
4
-
5
- export type { Includes, Includes as default };
@@ -1,11 +0,0 @@
1
- import type FileBase from "./default/index.js";
2
- import type Includes from "./includes/index.js";
3
-
4
- type Files = { files: FileBase; includes: Includes };
5
-
6
- export type {
7
- FileBase,
8
- Includes,
9
- Files,
10
- Files as default,
11
- };
@@ -1,23 +0,0 @@
1
- import type Plugins from "./plugins/index.js";
2
- import type Parsers from "./parsers/index.js";
3
- import type * as Files from "./files/index.js";
4
- import type * as Rules from "./rules/index.js";
5
-
6
- type Files = Files.Files;
7
- type Rules = Rules.Rules;
8
-
9
- interface Input {
10
- files: Files;
11
- rules: Rules;
12
- plugins: Plugins;
13
- parsers: Parsers;
14
- }
15
-
16
- export type {
17
- Files,
18
- Rules,
19
- Plugins,
20
- Parsers,
21
- Input,
22
- Input as default,
23
- };
@@ -1,5 +0,0 @@
1
- import type { Parsers as Dependencies } from "../../../dependency/index.js";
2
-
3
- type Parsers = Readonly<Record<Dependencies, unknown>>;
4
-
5
- export type { Dependencies, Parsers, Parsers as default };
@@ -1,5 +0,0 @@
1
- import type { Plugins as Dependencies } from "../../../dependency/index.js";
2
-
3
- type Plugins = Readonly<Record<Dependencies, { configs: unknown }>>;
4
-
5
- export type { Dependencies, Plugins, Plugins as default };
@@ -1,14 +0,0 @@
1
- import type RuleBase from "./preset/index.js";
2
- import type Overrides from "./overrides/index.js";
3
-
4
- type Rules = {
5
- rules: RuleBase;
6
- overrides: Overrides;
7
- };
8
-
9
- export type {
10
- RuleBase,
11
- Overrides,
12
- Rules,
13
- Rules as default,
14
- };
@@ -1,6 +0,0 @@
1
- import type { Scope } from "../../../../scopes/index.js";
2
- import type * as Overrides from "../preset/index.js";
3
-
4
- type Overrides = Readonly<Partial<Record<Scope, Overrides.RuleBase.RuleEntry.RuleObject>>>;
5
-
6
- export type { Overrides, Overrides as default };
@@ -1,9 +0,0 @@
1
- import type * as RuleEntry from "./object/index.js";
2
-
3
- type RuleEntry = readonly [string, RuleEntry.RuleObject];
4
-
5
- export type {
6
- RuleEntry,
7
- RuleEntry as Entry,
8
- RuleEntry as default,
9
- };
@@ -1,13 +0,0 @@
1
- import type * as RuleObject from "./state/index.js";
2
-
3
- type RuleObject = Readonly<Record<
4
- string,
5
- | RuleObject.RuleLevel
6
- | readonly [RuleObject.RuleLevel, ...unknown[]]
7
- >>;
8
-
9
- export type {
10
- RuleObject,
11
- RuleObject as Object,
12
- RuleObject as default,
13
- };
@@ -1,10 +0,0 @@
1
- type RuleLevel =
2
- | "error"
3
- | "warn"
4
- | "off";
5
-
6
- export type {
7
- RuleLevel,
8
- RuleLevel as Level,
9
- RuleLevel as default,
10
- };
@@ -1,10 +0,0 @@
1
- import type { Scope } from "../../../../scopes/index.js";
2
- import type * as RuleBase from "./entry/index.js";
3
-
4
- type RuleBase = Readonly<Record<Scope, readonly RuleBase.RuleEntry[]>>;
5
-
6
- export type {
7
- RuleBase,
8
- RuleBase as Base,
9
- RuleBase as default,
10
- };
@@ -1,24 +0,0 @@
1
- import type Language from "./language/index.js";
2
- import type Linter from "./linter/index.js";
3
- import type Plugins from "./plugins/index.js";
4
-
5
- type IOption<
6
- PluginId extends string,
7
- IsEcma extends boolean,
8
- ParserOptions extends boolean | object,
9
- GlobalTypes extends string,
10
- Processor extends object,
11
- > =
12
- & { linterOptions: Linter }
13
- & { languageOptions: Language<IsEcma, ParserOptions, GlobalTypes> }
14
- & (Plugins<PluginId> extends never ? object : { plugins: Plugins<PluginId> })
15
- & (Interface<Processor> extends never ? object : Interface<Processor> extends { processor: string } ? Interface<Processor> : object)
16
- ;
17
-
18
- export type {
19
- Plugins,
20
- Linter,
21
- Language,
22
- IOption,
23
- IOption as default,
24
- };
@@ -1,3 +0,0 @@
1
- type Ecma = "latest";
2
-
3
- export type { Ecma, Ecma as default };
@@ -1,3 +0,0 @@
1
- type Source = "module" | "script";
2
-
3
- export type { Source, Source as default };
@@ -1,3 +0,0 @@
1
- type Plugins<PluginId extends string> = Record<literalful<PluginId>, { configs: unknown }>;
2
-
3
- export type { Plugins, Plugins as default };
@@ -1,3 +0,0 @@
1
- import type Config from "./config/index.js";
2
-
3
- export type { Config, Config as default };
@@ -1,8 +0,0 @@
1
- import type globals from "globals";
2
-
3
- type Globals =
4
- | "mocha"
5
- & keyof typeof globals
6
- ;
7
-
8
- export type { Globals as default };
@@ -1,5 +0,0 @@
1
- import type Plugins from "./plugins/index.js";
2
- import type Parsers from "./parsers/index.js";
3
- import type Globals from "./globals/index.js";
4
-
5
- export type { Plugins, Parsers, Globals };
@@ -1,13 +0,0 @@
1
- import type { Scope } from "../../scopes/index.js";
2
-
3
- type Parsers =
4
- | "ts"
5
- | "svelte"
6
- | "html"
7
- | "jsonc"
8
- | "yml"
9
- | "md"
10
- & Scope
11
- ;
12
-
13
- export type { Parsers as default };
@@ -1,8 +0,0 @@
1
- import type { Input } from "../../../../boundary/index.js";
2
-
3
- export default class {
4
- constructor(
5
- public readonly id: string,
6
- public readonly rules: Input.Rules.RuleBase.RuleEntry.RuleObject,
7
- ) {}
8
- }