@eslinted/core 0.8.1 → 0.9.0-rc.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. package/dist/boundary/boundary.d.ts +5 -10
  2. package/dist/boundary/boundary.d.ts.map +1 -1
  3. package/dist/boundary/boundary.js +2 -1
  4. package/dist/boundary/boundary.js.map +1 -1
  5. package/dist/boundary/input/input.d.ts +4 -7
  6. package/dist/boundary/input/input.d.ts.map +1 -1
  7. package/dist/boundary/input/parsers/parsers.d.ts +2 -2
  8. package/dist/boundary/input/parsers/parsers.d.ts.map +1 -1
  9. package/dist/boundary/input/plugins/plugins.d.ts +1 -2
  10. package/dist/boundary/input/plugins/plugins.d.ts.map +1 -1
  11. package/dist/boundary/output/output.d.ts +2 -2
  12. package/dist/boundary/output/output.d.ts.map +1 -1
  13. package/dist/boundary/scopes/scopes.d.ts.map +1 -0
  14. package/dist/boundary/scopes/scopes.js.map +1 -0
  15. package/dist/factory/Factory.d.ts +7 -0
  16. package/dist/factory/Factory.d.ts.map +1 -0
  17. package/dist/factory/{factory.js → Factory.js} +3 -3
  18. package/dist/factory/Factory.js.map +1 -0
  19. package/dist/factory/files/Files.d.ts +1 -1
  20. package/dist/factory/files/Files.d.ts.map +1 -1
  21. package/dist/factory/files/Files.js +4 -9
  22. package/dist/factory/files/Files.js.map +1 -1
  23. package/dist/factory/options/Options.d.ts +3 -1
  24. package/dist/factory/options/Options.d.ts.map +1 -1
  25. package/dist/factory/options/Options.js +1 -1
  26. package/dist/factory/options/Options.js.map +1 -1
  27. package/dist/factory/options/option/Option.d.ts +22 -8
  28. package/dist/factory/options/option/Option.d.ts.map +1 -1
  29. package/dist/factory/options/option/Option.js +23 -33
  30. package/dist/factory/options/option/Option.js.map +1 -1
  31. package/dist/factory/options/option/html/index.d.ts.map +1 -1
  32. package/dist/factory/options/option/html/index.js +2 -7
  33. package/dist/factory/options/option/html/index.js.map +1 -1
  34. package/dist/factory/options/option/js/index.d.ts.map +1 -1
  35. package/dist/factory/options/option/js/index.js +4 -9
  36. package/dist/factory/options/option/js/index.js.map +1 -1
  37. package/dist/factory/options/option/json/index.d.ts.map +1 -1
  38. package/dist/factory/options/option/json/index.js +2 -7
  39. package/dist/factory/options/option/json/index.js.map +1 -1
  40. package/dist/factory/options/option/jsonc/index.d.ts.map +1 -1
  41. package/dist/factory/options/option/jsonc/index.js +2 -7
  42. package/dist/factory/options/option/jsonc/index.js.map +1 -1
  43. package/dist/factory/options/option/svelte/index.d.ts.map +1 -1
  44. package/dist/factory/options/option/svelte/index.js +11 -16
  45. package/dist/factory/options/option/svelte/index.js.map +1 -1
  46. package/dist/factory/options/option/ts/index.d.ts.map +1 -1
  47. package/dist/factory/options/option/ts/index.js +9 -14
  48. package/dist/factory/options/option/ts/index.js.map +1 -1
  49. package/dist/factory/options/option/yml/index.d.ts.map +1 -1
  50. package/dist/factory/options/option/yml/index.js +2 -7
  51. package/dist/factory/options/option/yml/index.js.map +1 -1
  52. package/dist/factory/ruleset/Ruleset.d.ts +1 -1
  53. package/dist/factory/ruleset/Ruleset.d.ts.map +1 -1
  54. package/dist/factory/ruleset/Ruleset.js +11 -31
  55. package/dist/factory/ruleset/Ruleset.js.map +1 -1
  56. package/dist/index.d.ts +5 -7
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +3 -3
  59. package/dist/index.js.map +1 -1
  60. package/package.json +2 -2
  61. package/src/boundary/boundary.ts +11 -0
  62. package/src/boundary/input/input.ts +5 -0
  63. package/src/boundary/input/{parsers.ts → parsers/parsers.ts} +2 -2
  64. package/src/boundary/input/{plugins.ts → plugins/plugins.ts} +1 -2
  65. package/src/boundary/output/output.ts +3 -0
  66. package/src/factory/Factory.ts +13 -0
  67. package/src/factory/files/Files.ts +5 -13
  68. package/src/factory/options/{options.ts → Options.ts} +2 -0
  69. package/src/factory/options/option/Option.ts +51 -71
  70. package/src/factory/options/option/html/index.ts +2 -10
  71. package/src/factory/options/option/js/index.ts +4 -12
  72. package/src/factory/options/option/json/index.ts +2 -10
  73. package/src/factory/options/option/jsonc/index.ts +2 -10
  74. package/src/factory/options/option/svelte/index.ts +11 -19
  75. package/src/factory/options/option/ts/index.ts +9 -17
  76. package/src/factory/options/option/yml/index.ts +2 -10
  77. package/src/factory/ruleset/Ruleset.ts +15 -47
  78. package/src/index.ts +13 -9
  79. package/dist/boundary/input/parsers.d.ts +0 -7
  80. package/dist/boundary/input/parsers.d.ts.map +0 -1
  81. package/dist/boundary/input/parsers.js +0 -2
  82. package/dist/boundary/input/parsers.js.map +0 -1
  83. package/dist/boundary/input/plugins.d.ts +0 -7
  84. package/dist/boundary/input/plugins.d.ts.map +0 -1
  85. package/dist/boundary/input/plugins.js +0 -2
  86. package/dist/boundary/input/plugins.js.map +0 -1
  87. package/dist/boundary/input.d.ts +0 -8
  88. package/dist/boundary/input.d.ts.map +0 -1
  89. package/dist/boundary/input.js +0 -2
  90. package/dist/boundary/input.js.map +0 -1
  91. package/dist/boundary/output/IConfig.d.ts +0 -19
  92. package/dist/boundary/output/IConfig.d.ts.map +0 -1
  93. package/dist/boundary/output/IConfig.js +0 -2
  94. package/dist/boundary/output/IConfig.js.map +0 -1
  95. package/dist/boundary/output.d.ts +0 -3
  96. package/dist/boundary/output.d.ts.map +0 -1
  97. package/dist/boundary/output.js +0 -2
  98. package/dist/boundary/output.js.map +0 -1
  99. package/dist/factory/factory.d.ts +0 -5
  100. package/dist/factory/factory.d.ts.map +0 -1
  101. package/dist/factory/factory.js.map +0 -1
  102. package/dist/scopes/scopes.d.ts.map +0 -1
  103. package/dist/scopes/scopes.js.map +0 -1
  104. package/src/boundary/input.ts +0 -9
  105. package/src/boundary/output.ts +0 -3
  106. package/src/factory/factory.ts +0 -10
  107. /package/dist/{scopes → boundary/scopes}/scopes.d.ts +0 -0
  108. /package/dist/{scopes → boundary/scopes}/scopes.js +0 -0
  109. /package/src/boundary/output/{IConfig.ts → config/IConfig.ts} +0 -0
  110. /package/src/boundary/output/{interface → config/interface}/option/IOption.d.ts +0 -0
  111. /package/src/boundary/output/{interface → config/interface}/option/language/IOLanguage.d.ts +0 -0
  112. /package/src/boundary/output/{interface → config/interface}/option/language/ecma/IOLanguageEcma.d.ts +0 -0
  113. /package/src/boundary/output/{interface → config/interface}/option/language/globals/IOLanguageGlobals.d.ts +0 -0
  114. /package/src/boundary/output/{interface → config/interface}/option/language/source/IOLanguageSource.d.ts +0 -0
  115. /package/src/boundary/output/{interface → config/interface}/option/linter/IOLinter.d.ts +0 -0
  116. /package/src/boundary/output/{interface → config/interface}/option/plugins/IOPlugins.d.ts +0 -0
  117. /package/src/boundary/output/{interface → config/interface}/option/processor/IOProcessor.d.ts +0 -0
  118. /package/src/boundary/output/{interface → config/interface}/rules/IRule.d.ts +0 -0
  119. /package/src/boundary/output/{interface → config/interface}/rules/state/RuleSeverity.d.ts +0 -0
  120. /package/src/{scopes → boundary/scopes}/scopes.ts +0 -0
package/src/index.ts CHANGED
@@ -1,23 +1,27 @@
1
- import scopes, { type Scope } from "./scopes/scopes.js";
2
- import type Output from "./boundary/output.js";
3
- import type Input from "./boundary/input.js";
1
+ import scopes from "./boundary/boundary.js";
2
+ import type {
3
+ Scope,
4
+ Plugins,
5
+ Parsers,
6
+ IConfig,
7
+ } from "./boundary/boundary.js";
4
8
  import {
5
9
  Options,
6
10
  Files,
7
11
  Ruleset,
8
12
  Rule,
9
- } from "./factory/factory.js";
13
+ } from "./factory/Factory.js";
10
14
 
11
- export type { Scope, Output };
15
+ export type { Scope };
12
16
  export { Ruleset, Rule };
13
17
  export default function (
14
- plugins: Input.Plugins,
15
- parsers: Input.Parsers,
18
+ plugins: Plugins,
19
+ parsers: Parsers,
16
20
  base: Record<Scope, string[]>,
17
21
  includes: Particord<Scope, string[]>,
18
22
  rulesets: { [S in Scope]: Ruleset<S> },
19
23
  overrides: Particord<Scope, IRule>,
20
- ): Output[] {
24
+ ): IConfig[] {
21
25
  try {
22
26
  const files = new Files(
23
27
  base,
@@ -103,7 +107,7 @@ export default function (
103
107
  }
104
108
  catch (e) {
105
109
  throw new Error(
106
- `linted.main`,
110
+ `linted(): Caught exception.`,
107
111
  { cause: e },
108
112
  );
109
113
  }
@@ -1,7 +0,0 @@
1
- import type { Scope } from "../../scopes/scopes.js";
2
- import type { Options } from "../../factory/factory.js";
3
- type Parsers = {
4
- readonly [S in Scope]: ConstructorParameters<typeof Options[S]>[2] extends readonly [unknown, ...unknown[]] ? unknown : null;
5
- };
6
- export type { Parsers as default };
7
- //# sourceMappingURL=parsers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../../../src/boundary/input/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAExD,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,CAAC,IAAI,KAAK,GAAG,qBAAqB,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,SAAS,CAAC,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC,GACvG,OAAO,GACP,IAAI;CACT,CAAC;AAEF,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=parsers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../../src/boundary/input/parsers.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import type { Scope } from "../../scopes/scopes.js";
2
- import type { Options } from "../../factory/factory.js";
3
- type Plugins = {
4
- readonly [S in Scope]: InstanceType<typeof Options[S]>["plugins"];
5
- };
6
- export type { Plugins as default };
7
- //# sourceMappingURL=plugins.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../src/boundary/input/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAExD,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,CAAC,IAAI,KAAK,GAAG,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;CAClE,CAAC;AAEF,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=plugins.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../src/boundary/input/plugins.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- import type plugins from "./input/plugins.js";
2
- import type parsers from "./input/parsers.js";
3
- declare namespace Input {
4
- type Plugins = plugins;
5
- type Parsers = parsers;
6
- }
7
- export type { Input as default };
8
- //# sourceMappingURL=input.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/boundary/input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAE9C,kBAAU,KAAK,CAAC;IACd,KAAY,OAAO,GAAG,OAAO,CAAC;IAC9B,KAAY,OAAO,GAAG,OAAO,CAAC;CAC/B;AAED,YAAY,EAAE,KAAK,IAAI,OAAO,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/boundary/input.ts"],"names":[],"mappings":""}
@@ -1,19 +0,0 @@
1
- export default interface IConfig {
2
- name: `scope:${string}/rule:${string}+${string}`;
3
- rules: IRule;
4
- files: readonly string[];
5
- linterOptions: {
6
- noInlineConfig: true;
7
- reportUnusedDisableDirectives: "error";
8
- };
9
- languageOptions: {
10
- sourceType?: "module" | "script";
11
- ecmaVersion?: "latest";
12
- globals?: Record<string, true>;
13
- parser?: unknown;
14
- parserOptions?: Record<string, unknown>;
15
- };
16
- plugins: Record<string, Record<"configs", unknown>>;
17
- processor?: string;
18
- }
19
- //# sourceMappingURL=IConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IConfig.d.ts","sourceRoot":"","sources":["../../../src/boundary/output/IConfig.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,OAAO;IAC9B,IAAI,EAAE,SAAS,MAAM,SAAS,MAAM,IAAI,MAAM,EAAE,CAAC;IACjD,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,aAAa,EAAE;QACb,cAAc,EAAE,IAAI,CAAC;QACrB,6BAA6B,EAAE,OAAO,CAAC;KACxC,CAAC;IACF,eAAe,EAAE;QACf,UAAU,CAAC,EACP,QAAQ,GACR,QAAQ,CAAC;QACb,WAAW,CAAC,EAAE,QAAQ,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACzC,CAAC;IACF,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IConfig.js","sourceRoot":"","sources":["../../../src/boundary/output/IConfig.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import type Output from "./output/IConfig.js";
2
- export type { Output as default };
3
- //# sourceMappingURL=output.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/boundary/output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAE9C,YAAY,EAAE,MAAM,IAAI,OAAO,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=output.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/boundary/output.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import Ruleset, { Rule } from "./ruleset/Ruleset.js";
2
- import Files from "./files/Files.js";
3
- import Options from "./options/options.js";
4
- export { Options, Files, Ruleset, Rule, };
5
- //# sourceMappingURL=factory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/factory/factory.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,MAAM,kBAAkB,CAAC;AACrC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAE3C,OAAO,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,GACL,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src/factory/factory.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,MAAM,kBAAkB,CAAC;AACrC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAE3C,OAAO,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,GACL,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../src/scopes/scopes.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM,iEAQF,CAAC;AAEX,eAAe,MAAM,CAAC;AACtB,MAAM,MAAM,KAAK,GAAG,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"scopes.js","sourceRoot":"","sources":["../../src/scopes/scopes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG;IACb,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;CACG,CAAC;AAEX,eAAe,MAAM,CAAC"}
@@ -1,9 +0,0 @@
1
- import type plugins from "./input/plugins.js";
2
- import type parsers from "./input/parsers.js";
3
-
4
- namespace Input {
5
- export type Plugins = plugins;
6
- export type Parsers = parsers;
7
- }
8
-
9
- export type { Input as default };
@@ -1,3 +0,0 @@
1
- import type Output from "./output/IConfig.js";
2
-
3
- export type { Output as default };
@@ -1,10 +0,0 @@
1
- import Ruleset, { Rule } from "./ruleset/Ruleset.js";
2
- import Files from "./files/Files.js";
3
- import Options from "./options/options.js";
4
-
5
- export {
6
- Options,
7
- Files,
8
- Ruleset,
9
- Rule,
10
- };
File without changes
File without changes
File without changes