@eslinted/core 0.6.0 → 0.7.0-rc.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. package/dist/boundary/boundary.d.ts +6 -0
  2. package/dist/boundary/boundary.d.ts.map +1 -0
  3. package/dist/boundary/boundary.js +3 -0
  4. package/dist/boundary/boundary.js.map +1 -0
  5. package/dist/boundary/input/input.d.ts +5 -0
  6. package/dist/boundary/input/input.d.ts.map +1 -0
  7. package/dist/boundary/input/input.js +2 -0
  8. package/dist/boundary/input/input.js.map +1 -0
  9. package/dist/boundary/input/parsers/index.d.ts +5 -0
  10. package/dist/boundary/input/parsers/index.d.ts.map +1 -0
  11. package/dist/boundary/input/parsers/index.js +2 -0
  12. package/dist/boundary/input/parsers/index.js.map +1 -0
  13. package/dist/boundary/input/parsers/parsers.d.ts +7 -0
  14. package/dist/boundary/input/parsers/parsers.d.ts.map +1 -0
  15. package/dist/boundary/input/parsers/parsers.js +2 -0
  16. package/dist/boundary/input/parsers/parsers.js.map +1 -0
  17. package/dist/boundary/input/plugins/index.d.ts +32 -0
  18. package/dist/boundary/input/plugins/index.d.ts.map +1 -0
  19. package/dist/boundary/input/plugins/index.js +2 -0
  20. package/dist/boundary/input/plugins/index.js.map +1 -0
  21. package/dist/boundary/input/plugins/plugins.d.ts +6 -0
  22. package/dist/boundary/input/plugins/plugins.d.ts.map +1 -0
  23. package/dist/boundary/input/plugins/plugins.js +2 -0
  24. package/dist/boundary/input/plugins/plugins.js.map +1 -0
  25. package/dist/boundary/output/config/IConfig.d.ts +19 -0
  26. package/dist/boundary/output/config/IConfig.d.ts.map +1 -0
  27. package/dist/boundary/output/config/IConfig.js +2 -0
  28. package/dist/boundary/output/config/IConfig.js.map +1 -0
  29. package/dist/boundary/output/config/index.d.ts +19 -0
  30. package/dist/boundary/output/config/index.d.ts.map +1 -0
  31. package/dist/boundary/output/config/index.js +2 -0
  32. package/dist/boundary/output/config/index.js.map +1 -0
  33. package/dist/boundary/output/output.d.ts +3 -0
  34. package/dist/boundary/output/output.d.ts.map +1 -0
  35. package/dist/boundary/output/output.js +2 -0
  36. package/dist/boundary/output/output.js.map +1 -0
  37. package/dist/boundary/scopes/scopes.d.ts +4 -0
  38. package/dist/boundary/scopes/scopes.d.ts.map +1 -0
  39. package/dist/boundary/scopes/scopes.js +11 -0
  40. package/dist/boundary/scopes/scopes.js.map +1 -0
  41. package/dist/factory/Factory.d.ts +7 -0
  42. package/dist/factory/Factory.d.ts.map +1 -0
  43. package/dist/factory/Factory.js +5 -0
  44. package/dist/factory/Factory.js.map +1 -0
  45. package/dist/factory/files/Files.d.ts +8 -0
  46. package/dist/factory/files/Files.d.ts.map +1 -0
  47. package/dist/factory/files/Files.js +15 -0
  48. package/dist/factory/files/Files.js.map +1 -0
  49. package/dist/factory/options/Options.d.ts +20 -0
  50. package/dist/factory/options/Options.d.ts.map +1 -0
  51. package/dist/factory/options/Options.js +17 -0
  52. package/dist/factory/options/Options.js.map +1 -0
  53. package/dist/factory/options/option/Option.d.ts +29 -0
  54. package/dist/factory/options/option/Option.d.ts.map +1 -0
  55. package/dist/factory/options/option/Option.js +26 -0
  56. package/dist/factory/options/option/Option.js.map +1 -0
  57. package/dist/factory/options/option/html/index.d.ts +7 -3
  58. package/dist/factory/options/option/html/index.d.ts.map +1 -1
  59. package/dist/factory/options/option/html/index.js +6 -12
  60. package/dist/factory/options/option/html/index.js.map +1 -1
  61. package/dist/factory/options/option/js/index.d.ts +7 -2
  62. package/dist/factory/options/option/js/index.d.ts.map +1 -1
  63. package/dist/factory/options/option/js/index.js +8 -15
  64. package/dist/factory/options/option/js/index.js.map +1 -1
  65. package/dist/factory/options/option/json/index.d.ts +7 -3
  66. package/dist/factory/options/option/json/index.d.ts.map +1 -1
  67. package/dist/factory/options/option/json/index.js +6 -12
  68. package/dist/factory/options/option/json/index.js.map +1 -1
  69. package/dist/factory/options/option/jsonc/index.d.ts +7 -3
  70. package/dist/factory/options/option/jsonc/index.d.ts.map +1 -1
  71. package/dist/factory/options/option/jsonc/index.js +6 -12
  72. package/dist/factory/options/option/jsonc/index.js.map +1 -1
  73. package/dist/factory/options/option/svelte/index.d.ts +22 -5
  74. package/dist/factory/options/option/svelte/index.d.ts.map +1 -1
  75. package/dist/factory/options/option/svelte/index.js +14 -21
  76. package/dist/factory/options/option/svelte/index.js.map +1 -1
  77. package/dist/factory/options/option/ts/index.d.ts +15 -4
  78. package/dist/factory/options/option/ts/index.d.ts.map +1 -1
  79. package/dist/factory/options/option/ts/index.js +12 -18
  80. package/dist/factory/options/option/ts/index.js.map +1 -1
  81. package/dist/factory/options/option/yml/index.d.ts +7 -3
  82. package/dist/factory/options/option/yml/index.d.ts.map +1 -1
  83. package/dist/factory/options/option/yml/index.js +6 -12
  84. package/dist/factory/options/option/yml/index.js.map +1 -1
  85. package/dist/factory/ruleset/Ruleset.d.ts +12 -0
  86. package/dist/factory/ruleset/Ruleset.d.ts.map +1 -0
  87. package/dist/factory/ruleset/Ruleset.js +27 -0
  88. package/dist/factory/ruleset/Ruleset.js.map +1 -0
  89. package/dist/factory/ruleset/rule/Rule.d.ts +6 -0
  90. package/dist/factory/ruleset/rule/Rule.d.ts.map +1 -0
  91. package/dist/factory/ruleset/rule/Rule.js +9 -0
  92. package/dist/factory/ruleset/rule/Rule.js.map +1 -0
  93. package/dist/index.d.ts +3 -4
  94. package/dist/index.d.ts.map +1 -1
  95. package/dist/index.js +38 -26
  96. package/dist/index.js.map +1 -1
  97. package/package.json +2 -2
  98. package/src/boundary/boundary.ts +11 -0
  99. package/src/boundary/input/input.ts +5 -0
  100. package/src/boundary/input/parsers/parsers.ts +6 -0
  101. package/src/boundary/input/plugins/plugins.ts +7 -0
  102. package/src/{config/index.ts → boundary/output/config/IConfig.ts} +3 -4
  103. package/src/boundary/output/config/interface/option/IOption.d.ts +20 -0
  104. package/src/boundary/output/config/interface/option/language/IOLanguage.d.ts +18 -0
  105. package/src/boundary/output/config/interface/option/language/ecma/IOLanguageEcma.d.ts +1 -0
  106. package/src/boundary/output/config/interface/option/language/globals/IOLanguageGlobals.d.ts +1 -0
  107. package/src/boundary/output/config/interface/option/language/source/IOLanguageSource.d.ts +3 -0
  108. package/src/boundary/output/config/interface/option/linter/IOLinter.d.ts +4 -0
  109. package/src/boundary/output/config/interface/option/name/IOName.d.ts +1 -0
  110. package/src/boundary/output/config/interface/option/plugins/IOPlugins.d.ts +1 -0
  111. package/src/boundary/output/config/interface/option/processor/IOProcessor.d.ts +1 -0
  112. package/src/boundary/output/output.ts +3 -0
  113. package/src/factory/Factory.ts +13 -0
  114. package/src/factory/files/Files.ts +15 -0
  115. package/src/factory/options/{index.ts → Options.ts} +2 -2
  116. package/src/factory/options/option/Option.ts +58 -0
  117. package/src/factory/options/option/html/index.ts +10 -23
  118. package/src/factory/options/option/js/index.ts +9 -20
  119. package/src/factory/options/option/json/index.ts +10 -23
  120. package/src/factory/options/option/jsonc/index.ts +10 -23
  121. package/src/factory/options/option/svelte/index.ts +23 -34
  122. package/src/factory/options/option/ts/index.ts +20 -29
  123. package/src/factory/options/option/yml/index.ts +10 -23
  124. package/src/factory/ruleset/{index.ts → Ruleset.ts} +1 -1
  125. package/src/index.ts +62 -72
  126. package/types/project/OmitLast.d.ts +1 -0
  127. package/src/config/files/IFiles.d.ts +0 -1
  128. package/src/config/option/IOption.d.ts +0 -25
  129. package/src/config/option/language/IOLanguage.d.ts +0 -15
  130. package/src/config/option/language/ecma/IOLanguageEcma.d.ts +0 -19
  131. package/src/config/option/language/globals/IOLanguageGlobals.d.ts +0 -3
  132. package/src/config/option/language/parser/IOLanguageParser.d.ts +0 -3
  133. package/src/config/option/language/parserOptions/IOLanguageParserOptions.d.ts +0 -5
  134. package/src/config/option/language/source/IOLanguageSource.d.ts +0 -12
  135. package/src/config/option/linter/IOLinter.d.ts +0 -30
  136. package/src/config/option/name/IOName.d.ts +0 -3
  137. package/src/config/option/plugins/IOPlugins.d.ts +0 -3
  138. package/src/config/option/processor/IOProcessor.d.ts +0 -3
  139. package/src/config/rules/IRules.d.ts +0 -1
  140. package/src/factory/files/index.ts +0 -20
  141. package/src/factory/index.ts +0 -12
  142. package/src/factory/options/option/index.ts +0 -27
  143. package/src/module/boundary/index.ts +0 -3
  144. package/src/module/boundary/parsers/index.ts +0 -12
  145. package/src/module/boundary/plugins/index.ts +0 -20
  146. package/src/module/index.ts +0 -9
  147. /package/src/{config/rules/rule → boundary/output/config/interface/rules}/IRule.d.ts +0 -0
  148. /package/src/{config/rules/rule → boundary/output/config/interface/rules}/state/RuleSeverity.d.ts +0 -0
  149. /package/src/{module/scopes/index.ts → boundary/scopes/scopes.ts} +0 -0
  150. /package/src/factory/ruleset/rule/{index.ts → Rule.ts} +0 -0
  151. /package/types/{literal → typioca/literal}/number/base32.d.ts +0 -0
  152. /package/types/{literal → typioca/literal}/number/base64.d.ts +0 -0
  153. /package/types/{literal → typioca/literal}/number/binary.d.ts +0 -0
  154. /package/types/{literal → typioca/literal}/number/decimal.d.ts +0 -0
  155. /package/types/{literal → typioca/literal}/number/hex.d.ts +0 -0
  156. /package/types/{literal → typioca/literal}/number/octal.d.ts +0 -0
  157. /package/types/{literal → typioca/literal}/number/quatral.d.ts +0 -0
  158. /package/types/{literal → typioca/literal}/number/ternary.d.ts +0 -0
  159. /package/types/{literal → typioca/literal}/string/base64char.d.ts +0 -0
  160. /package/types/{literal → typioca/literal}/string/digit.d.ts +0 -0
  161. /package/types/{literal → typioca/literal}/string/hexchar.d.ts +0 -0
  162. /package/types/{literal → typioca/literal}/string/letter.d.ts +0 -0
  163. /package/types/{safe → typioca/safe}/Safe.d.ts +0 -0
  164. /package/types/{safe → typioca/safe}/numbers/finite/Finite.d.ts +0 -0
  165. /package/types/{safe → typioca/safe}/numbers/finite.d.ts +0 -0
  166. /package/types/{safe → typioca/safe}/numbers/fint.d.ts +0 -0
  167. /package/types/{safe → typioca/safe}/numbers/int/Int.d.ts +0 -0
  168. /package/types/{safe → typioca/safe}/numbers/int.d.ts +0 -0
  169. /package/types/{safe → typioca/safe}/numbers/numberful.d.ts +0 -0
  170. /package/types/{safe → typioca/safe}/numbers/polarity/Negative.d.ts +0 -0
  171. /package/types/{safe → typioca/safe}/numbers/polarity/Positive.d.ts +0 -0
  172. /package/types/{safe → typioca/safe}/numbers/polarity/pole/Pole.d.ts +0 -0
  173. /package/types/{safe → typioca/safe}/primitive.d.ts +0 -0
  174. /package/types/{safe → typioca/safe}/strings/char.d.ts +0 -0
  175. /package/types/{safe → typioca/safe}/strings/length/PropLength.d.ts +0 -0
  176. /package/types/{safe → typioca/safe}/strings/stringful.d.ts +0 -0
  177. /package/types/{utility → typioca/utility}/interface/construct/Particord.d.ts +0 -0
  178. /package/types/{utility → typioca/utility}/interface/construct/Property.d.ts +0 -0
  179. /package/types/{utility → typioca/utility}/interface/construct/Recordful.d.ts +0 -0
  180. /package/types/{utility → typioca/utility}/interface/construct/Table.d.ts +0 -0
  181. /package/types/{utility → typioca/utility}/interface/construct/properties/Field.d.ts +0 -0
  182. /package/types/{utility → typioca/utility}/interface/construct/properties/Flag.d.ts +0 -0
  183. /package/types/{utility → typioca/utility}/interface/construct/properties/Limit.d.ts +0 -0
  184. /package/types/{utility → typioca/utility}/interface/construct/properties/List.d.ts +0 -0
  185. /package/types/{utility → typioca/utility}/interface/construct/properties/Listish.d.ts +0 -0
  186. /package/types/{utility → typioca/utility}/interface/construct/properties/Scalar.d.ts +0 -0
  187. /package/types/{utility → typioca/utility}/interface/construct/tables/FieldTable.d.ts +0 -0
  188. /package/types/{utility → typioca/utility}/interface/construct/tables/FlagTable.d.ts +0 -0
  189. /package/types/{utility → typioca/utility}/interface/construct/tables/ListTable.d.ts +0 -0
  190. /package/types/{utility → typioca/utility}/interface/construct/tables/ListishTable.d.ts +0 -0
  191. /package/types/{utility → typioca/utility}/interface/construct/tables/ScalarTable.d.ts +0 -0
  192. /package/types/{utility → typioca/utility}/interface/identity/Interface.d.ts +0 -0
  193. /package/types/{utility → typioca/utility}/interface/identity/Keys.d.ts +0 -0
  194. /package/types/{utility → typioca/utility}/interface/transform/Unrequire.d.ts +0 -0
  195. /package/types/{utility → typioca/utility}/iterable/construct/ArrayN.d.ts +0 -0
  196. /package/types/{utility → typioca/utility}/iterable/construct/Tuple.d.ts +0 -0
  197. /package/types/{utility → typioca/utility}/iterable/construct/arrays/Arrays.d.ts +0 -0
  198. /package/types/{utility → typioca/utility}/iterable/construct/tuples/Tuples.d.ts +0 -0
  199. /package/types/{utility → typioca/utility}/iterable/identity/DyadType.d.ts +0 -0
  200. /package/types/{utility → typioca/utility}/iterable/identity/MonadType.d.ts +0 -0
  201. /package/types/{utility → typioca/utility}/iterable/identity/TriadType.d.ts +0 -0
  202. /package/types/{utility → typioca/utility}/iterable/identity/array/ArrayType.d.ts +0 -0
  203. /package/types/{utility → typioca/utility}/iterable/identity/array/length/ArrayLength.d.ts +0 -0
  204. /package/types/{utility → typioca/utility}/iterable/transform/Join.d.ts +0 -0
  205. /package/types/{utility → typioca/utility}/iterable/transform/Unflat.d.ts +0 -0
  206. /package/types/{utility → typioca/utility}/iterable/transform/stringarray/Chain.d.ts +0 -0
  207. /package/types/{utility → typioca/utility}/iterable/transform/stringarray/PathN.d.ts +0 -0
  208. /package/types/{utility → typioca/utility}/iterable/transform/stringarray/stringify/Stringify.d.ts +0 -0
  209. /package/types/{utility → typioca/utility}/length/Length.d.ts +0 -0
  210. /package/types/{utility → typioca/utility}/null/null.d.ts +0 -0
  211. /package/types/{utility → typioca/utility}/null/nullable.d.ts +0 -0
  212. /package/types/{utility → typioca/utility}/primitive/Primeval.d.ts +0 -0
  213. /package/types/{utility → typioca/utility}/primitive/boolean/True.d.ts +0 -0
  214. /package/types/{utility → typioca/utility}/primitive/number/Numbered.d.ts +0 -0
  215. /package/types/{utility → typioca/utility}/primitive/string/literal.d.ts +0 -0
  216. /package/types/{utility → typioca/utility}/primitive/string/literalful.d.ts +0 -0
@@ -1,19 +0,0 @@
1
- declare type IOLanguageEcma<Ecma extends number | IOLanguageEcma.Ecma> = [Ecma] extends [number]
2
- ? Numbered<Ecma> extends never
3
- ? object
4
- : { ecmaVersion: Numbered<Ecma> }
5
- : [Ecma] extends [string]
6
- ? literalful<Ecma> extends never
7
- ? object
8
- : literalful<Ecma> extends IOLanguageEcma.Ecma
9
- ? { ecmaVersion: literalful<Ecma> }
10
- : object
11
- : object;
12
-
13
- declare namespace IOLanguageEcma {
14
- export type Ecma =
15
- | `${number}`
16
- | `ES${number}`
17
- | `es${number}`
18
- | "latest";
19
- }
@@ -1,3 +0,0 @@
1
- declare type IOLanguageGlobals<GlobalTypes extends string> = literalful<GlobalTypes> extends never
2
- ? object
3
- : { globals: Record<literalful<GlobalTypes>, true> };
@@ -1,3 +0,0 @@
1
- declare type IOLanguageParser<UseParser extends boolean> = True<UseParser> extends never
2
- ? object
3
- : { parser: unknown };
@@ -1,5 +0,0 @@
1
- declare type IOLanguageParserOptions<ParserOptions extends object> = Interface<ParserOptions> extends never
2
- ? object
3
- : Keys<ParserOptions> extends never
4
- ? object
5
- : { parserOptions: Interface<ParserOptions> };
@@ -1,12 +0,0 @@
1
- declare type IOLanguageSource<Source extends IOLanguageSource.Source> = literalful<Source> extends never
2
- ? object
3
- : literalful<Source> extends IOLanguageSource.Source
4
- ? { sourceType: literalful<Source> }
5
- : object;
6
-
7
- declare namespace IOLanguageSource {
8
- export type Source =
9
- | "module"
10
- | "script"
11
- | "commonjs";
12
- }
@@ -1,30 +0,0 @@
1
- declare type IOLinter<
2
- NoInline extends boolean,
3
- ReportUnused extends
4
- | boolean
5
- | IOLinter.States,
6
- > = {
7
- linterOptions: {
8
- noInlineConfig: True<NoInline> extends never
9
- ? false
10
- : True<NoInline>;
11
- reportUnusedDisableDirectives: [ReportUnused] extends [boolean]
12
- ? True<ReportUnused> extends never
13
- ? false
14
- : True<ReportUnused>
15
- : [ReportUnused] extends [string]
16
- ? literalful<ReportUnused> extends never
17
- ? false
18
- : literalful<ReportUnused> extends IOLinter.States
19
- ? literalful<ReportUnused>
20
- : false
21
- : false;
22
- };
23
- };
24
-
25
- declare namespace IOLinter {
26
- export type States =
27
- | "error"
28
- | "warn"
29
- | "off";
30
- }
@@ -1,3 +0,0 @@
1
- declare type IOName<Name extends string> = literalful<Name> extends never
2
- ? never
3
- : { name: literalful<Name> };
@@ -1,3 +0,0 @@
1
- declare type IOPlugins<PluginId extends string> = literalful<PluginId> extends never
2
- ? never
3
- : { plugins: Record<literalful<PluginId>, { configs: unknown }> };
@@ -1,3 +0,0 @@
1
- declare type IOProcessor<ProcessorId extends string> = literalful<ProcessorId> extends never
2
- ? object
3
- : { processor: literalful<ProcessorId> };
@@ -1 +0,0 @@
1
- declare interface IRules { rules: IRule }
@@ -1,20 +0,0 @@
1
- import type { Scope } from "../index.js";
2
-
3
- export default class Files<S extends Scope> {
4
- public readonly files: readonly string[];
5
-
6
- constructor(
7
- scope: S,
8
- filescopes: {
9
- base: Record<Scope, string[]>;
10
- includes: Particord<Scope, string[]>;
11
- },
12
- ) {
13
- const { base, includes } = filescopes;
14
-
15
- this.files = [
16
- ...base[scope],
17
- ...includes[scope] ?? [],
18
- ];
19
- }
20
- }
@@ -1,12 +0,0 @@
1
- import options from "./options/index.js";
2
- import Files from "./files/index.js";
3
- import Ruleset, { Rule } from "./ruleset/index.js";
4
- import type { Scope } from "../index.js";
5
-
6
- export {
7
- options,
8
- Files,
9
- Ruleset,
10
- Rule,
11
- type Scope,
12
- };
@@ -1,27 +0,0 @@
1
- import type { Scope } from "../index.js";
2
-
3
- export default class Option<
4
- S extends Scope,
5
- PluginId extends string,
6
- UseParser extends boolean = never,
7
- ParserOptions extends object = never,
8
- GlobalTypes extends string = never,
9
- ProcessorId extends string = never,
10
- Source extends IOLanguageSource.Source = "module",
11
- Ecma extends number | IOLanguageEcma.Ecma = "latest",
12
- > {
13
- constructor(
14
- public readonly body: IOption<
15
- `linted/scope:${literalful<S>}`,
16
- true,
17
- "error",
18
- PluginId,
19
- Ecma,
20
- Source,
21
- UseParser,
22
- ParserOptions,
23
- GlobalTypes,
24
- ProcessorId
25
- >,
26
- ) {}
27
- }
@@ -1,3 +0,0 @@
1
- export type { default as Plugins } from "./plugins/index.js";
2
- export type { Parsers } from "./parsers/index.js";
3
- export type { Scope } from "../index.js";
@@ -1,12 +0,0 @@
1
- import type { Scope } from "../index.js";
2
-
3
- type ParsedScopes = Scope & (
4
- | "ts"
5
- | "svelte"
6
- | "html"
7
- | "json"
8
- | "jsonc"
9
- | "yml"
10
- );
11
-
12
- export type Parsers = Record<ParsedScopes, unknown>;
@@ -1,20 +0,0 @@
1
- import type { Scope } from "../index.js";
2
-
3
- type PluginImport = { configs: unknown };
4
-
5
- export default interface Plugins extends Record<Scope, Record<string, PluginImport>> {
6
- js: { "@stylistic": PluginImport };
7
- ts: {
8
- "@stylistic": PluginImport;
9
- "@typescript-eslint": PluginImport;
10
- };
11
- svelte: {
12
- "@stylistic": PluginImport;
13
- "@typescript-eslint": PluginImport;
14
- svelte: PluginImport;
15
- };
16
- html: { "@html-eslint": PluginImport };
17
- json: { jsonc: PluginImport };
18
- jsonc: { jsonc: PluginImport };
19
- yml: { yml: PluginImport };
20
- }
@@ -1,9 +0,0 @@
1
- import scopes, { type Scope } from "./scopes/index.js";
2
- import type { Plugins, Parsers } from "./boundary/index.js";
3
-
4
- export type {
5
- Scope,
6
- Plugins,
7
- Parsers,
8
- };
9
- export default scopes;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes