@eslinted/core 13.3.0-rc.1 → 13.3.0-rc.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. package/dist/factory/index.d.ts +230 -2
  2. package/dist/factory/index.d.ts.map +1 -1
  3. package/dist/factory/index.js +65 -2
  4. package/dist/factory/index.js.map +1 -1
  5. package/dist/factory/scopes/html.d.ts +11 -0
  6. package/dist/factory/scopes/html.d.ts.map +1 -0
  7. package/dist/factory/{settings/scopes → scopes}/html.js +3 -5
  8. package/dist/factory/scopes/html.js.map +1 -0
  9. package/dist/factory/scopes/js.d.ts +9 -0
  10. package/dist/factory/scopes/js.d.ts.map +1 -0
  11. package/dist/factory/{settings/scopes → scopes}/js.js +3 -4
  12. package/dist/factory/scopes/js.js.map +1 -0
  13. package/dist/factory/scopes/json.d.ts +11 -0
  14. package/dist/factory/scopes/json.d.ts.map +1 -0
  15. package/dist/factory/{settings/scopes → scopes}/json.js +3 -5
  16. package/dist/factory/scopes/json.js.map +1 -0
  17. package/dist/factory/scopes/jsonc.d.ts +11 -0
  18. package/dist/factory/scopes/jsonc.d.ts.map +1 -0
  19. package/dist/factory/{settings/scopes → scopes}/jsonc.js +3 -5
  20. package/dist/factory/scopes/jsonc.js.map +1 -0
  21. package/dist/factory/{settings/scopes → scopes}/mocha.d.ts +6 -4
  22. package/dist/factory/scopes/mocha.d.ts.map +1 -0
  23. package/dist/factory/scopes/mocha.js +19 -0
  24. package/dist/factory/scopes/mocha.js.map +1 -0
  25. package/dist/factory/{settings/setting.d.ts → scopes/setting/index.d.ts} +52 -39
  26. package/dist/factory/{settings/setting.d.ts.map → scopes/setting/index.d.ts.map} +1 -1
  27. package/dist/factory/{settings/setting.js → scopes/setting/index.js} +6 -7
  28. package/dist/factory/scopes/setting/index.js.map +1 -0
  29. package/dist/factory/{settings/scopes → scopes}/svelte.d.ts +17 -13
  30. package/dist/factory/scopes/svelte.d.ts.map +1 -0
  31. package/dist/factory/scopes/svelte.js +19 -0
  32. package/dist/factory/scopes/svelte.js.map +1 -0
  33. package/dist/factory/{settings/scopes → scopes}/ts.d.ts +11 -7
  34. package/dist/factory/scopes/ts.d.ts.map +1 -0
  35. package/dist/factory/scopes/ts.js +17 -0
  36. package/dist/factory/scopes/ts.js.map +1 -0
  37. package/dist/factory/scopes/yml.d.ts +11 -0
  38. package/dist/factory/scopes/yml.d.ts.map +1 -0
  39. package/dist/factory/{settings/scopes → scopes}/yml.js +3 -5
  40. package/dist/factory/scopes/yml.js.map +1 -0
  41. package/dist/factory/{settings/index.d.ts → settings.d.ts} +1 -2
  42. package/dist/factory/settings.d.ts.map +1 -0
  43. package/dist/factory/{settings/index.js → settings.js} +1 -1
  44. package/dist/factory/settings.js.map +1 -0
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +3 -12
  47. package/dist/index.js.map +1 -1
  48. package/package.json +1 -1
  49. package/src/factory/index.ts +104 -2
  50. package/src/factory/{settings/scopes → scopes}/html.ts +4 -9
  51. package/src/factory/scopes/js.ts +9 -0
  52. package/src/factory/{settings/scopes → scopes}/json.ts +4 -9
  53. package/src/factory/{settings/scopes → scopes}/jsonc.ts +4 -9
  54. package/src/factory/scopes/mocha.ts +24 -0
  55. package/src/factory/scopes/setting/index.ts +61 -0
  56. package/src/factory/scopes/svelte.ts +30 -0
  57. package/src/factory/scopes/ts.ts +27 -0
  58. package/src/factory/{settings/scopes → scopes}/yml.ts +4 -10
  59. package/src/factory/{settings/index.ts → settings.ts} +0 -1
  60. package/src/index.ts +3 -13
  61. package/dist/factory/factory.d.ts +0 -129
  62. package/dist/factory/factory.d.ts.map +0 -1
  63. package/dist/factory/factory.js +0 -46
  64. package/dist/factory/factory.js.map +0 -1
  65. package/dist/factory/settings/index.d.ts.map +0 -1
  66. package/dist/factory/settings/index.js.map +0 -1
  67. package/dist/factory/settings/scopes/html.d.ts +0 -10
  68. package/dist/factory/settings/scopes/html.d.ts.map +0 -1
  69. package/dist/factory/settings/scopes/html.js.map +0 -1
  70. package/dist/factory/settings/scopes/js.d.ts +0 -8
  71. package/dist/factory/settings/scopes/js.d.ts.map +0 -1
  72. package/dist/factory/settings/scopes/js.js.map +0 -1
  73. package/dist/factory/settings/scopes/json.d.ts +0 -10
  74. package/dist/factory/settings/scopes/json.d.ts.map +0 -1
  75. package/dist/factory/settings/scopes/json.js.map +0 -1
  76. package/dist/factory/settings/scopes/jsonc.d.ts +0 -10
  77. package/dist/factory/settings/scopes/jsonc.d.ts.map +0 -1
  78. package/dist/factory/settings/scopes/jsonc.js.map +0 -1
  79. package/dist/factory/settings/scopes/mocha.d.ts.map +0 -1
  80. package/dist/factory/settings/scopes/mocha.js +0 -20
  81. package/dist/factory/settings/scopes/mocha.js.map +0 -1
  82. package/dist/factory/settings/scopes/svelte.d.ts.map +0 -1
  83. package/dist/factory/settings/scopes/svelte.js +0 -20
  84. package/dist/factory/settings/scopes/svelte.js.map +0 -1
  85. package/dist/factory/settings/scopes/ts.d.ts.map +0 -1
  86. package/dist/factory/settings/scopes/ts.js +0 -18
  87. package/dist/factory/settings/scopes/ts.js.map +0 -1
  88. package/dist/factory/settings/scopes/yml.d.ts +0 -10
  89. package/dist/factory/settings/scopes/yml.d.ts.map +0 -1
  90. package/dist/factory/settings/scopes/yml.js.map +0 -1
  91. package/dist/factory/settings/setting.js.map +0 -1
  92. package/src/factory/factory.ts +0 -83
  93. package/src/factory/settings/scopes/js.ts +0 -11
  94. package/src/factory/settings/scopes/mocha.ts +0 -28
  95. package/src/factory/settings/scopes/svelte.ts +0 -32
  96. package/src/factory/settings/scopes/ts.ts +0 -28
  97. package/src/factory/settings/setting.ts +0 -65
@@ -1,28 +0,0 @@
1
- import { ScopeSetting } from "../setting";
2
-
3
- export default class TsSetting extends ScopeSetting<
4
- "ts",
5
- {
6
- readonly project: "tsconfig.json";
7
- readonly sourceType: "module";
8
- readonly ecmaVersion: 2023;
9
- },
10
- 1
11
- > {
12
- public readonly scope = "ts";
13
- public readonly processor = {} as const;
14
- public readonly language = {} as const;
15
-
16
- public get languageOptions() {
17
- const [parser] = this.parser;
18
-
19
- return {
20
- parser,
21
- parserOptions: {
22
- project: "tsconfig.json",
23
- sourceType: "module",
24
- ecmaVersion: 2023,
25
- } as const,
26
- } as const;
27
- }
28
- }
@@ -1,65 +0,0 @@
1
- import globals from "globals";
2
- import type { Scopes } from "../..";
3
-
4
- export abstract class ScopeSetting<
5
- S extends Scopes,
6
- ParserOptions extends
7
- | object
8
- | boolean = false,
9
- ParserCount extends 0 | 1 | 2 = ParserOptions extends false ? 0 : 1,
10
- G extends keyof typeof globals | false = false,
11
- Processor extends object = object,
12
- Language extends object = object,
13
- > {
14
- public abstract readonly scope: S;
15
- public abstract readonly processor: (Processor extends never
16
- ? object
17
- : Processor extends { readonly processor: infer P }
18
- ? string extends P
19
- ? object
20
- : { readonly processor: P }
21
- : object);
22
- public abstract readonly language: (Language extends never
23
- ? object
24
- : Language extends { readonly language: infer L }
25
- ? string extends L
26
- ? object
27
- : { readonly language: L }
28
- : object);
29
- constructor(public readonly parser: readonly unknown[] & { length: ParserCount }) {}
30
-
31
- public get option() {
32
- const { languageOptions, processor, language } = this;
33
-
34
- return {
35
- languageOptions,
36
- ...processor,
37
- ...language,
38
- } as const;
39
- }
40
-
41
- protected abstract get languageOptions():
42
- (G extends never
43
- ? object
44
- : G extends boolean
45
- ? object
46
- : G extends string
47
- ? string extends G
48
- ? object
49
- : { readonly globals: Readonly<Record<string, unknown>> }
50
- : object
51
- ) & ParserOptions extends never
52
- ? object
53
- : ParserOptions extends boolean
54
- ? ParserOptions extends true
55
- ? { readonly parser: unknown }
56
- : object
57
- : { readonly parser: unknown; readonly parserOptions: ParserOptions };
58
-
59
- protected globals(global: G & keyof typeof globals) {
60
- if (typeof global === "boolean")
61
- throw new TypeError("`global` must be a string key of `globals` package");
62
-
63
- return globals[global];
64
- }
65
- }