@eslinted/core 19.0.2-rc.0 → 19.0.3-rc.0

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 (137) hide show
  1. package/dist/factory/index.d.ts +17 -16
  2. package/dist/factory/index.d.ts.map +1 -1
  3. package/dist/factory/index.js +9 -6
  4. package/dist/factory/index.js.map +1 -1
  5. package/dist/index.d.ts +4 -2
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +2 -2
  8. package/dist/index.js.map +1 -1
  9. package/dist/interface/input/imports.d.ts +3 -3
  10. package/dist/interface/input/imports.d.ts.map +1 -1
  11. package/dist/interface/input/index.d.ts +2 -2
  12. package/dist/interface/input/index.d.ts.map +1 -1
  13. package/dist/scope/dependencies/index.d.ts +2 -2
  14. package/dist/scope/dependencies/parsers.d.ts +1 -1
  15. package/dist/scope/dependencies/plugins.d.ts +1 -1
  16. package/dist/scope/index.d.ts +3 -2
  17. package/dist/scope/index.d.ts.map +1 -1
  18. package/dist/scope/index.js +2 -1
  19. package/dist/scope/index.js.map +1 -1
  20. package/dist/scope/registry/index.d.ts +99 -0
  21. package/dist/scope/registry/index.d.ts.map +1 -0
  22. package/dist/{factory/register.js → scope/registry/index.js} +2 -2
  23. package/dist/scope/registry/index.js.map +1 -0
  24. package/dist/scope/registry/manifests/css.d.ts +8 -0
  25. package/dist/scope/registry/manifests/css.d.ts.map +1 -0
  26. package/dist/scope/registry/manifests/css.js +10 -0
  27. package/dist/scope/registry/manifests/css.js.map +1 -0
  28. package/dist/scope/registry/manifests/html.d.ts +10 -0
  29. package/dist/scope/registry/manifests/html.d.ts.map +1 -0
  30. package/dist/{factory → scope/registry}/manifests/html.js +0 -2
  31. package/dist/scope/registry/manifests/html.js.map +1 -0
  32. package/dist/scope/registry/manifests/js.d.ts +5 -0
  33. package/dist/scope/registry/manifests/js.d.ts.map +1 -0
  34. package/dist/scope/registry/manifests/js.js +5 -0
  35. package/dist/scope/registry/manifests/js.js.map +1 -0
  36. package/dist/scope/registry/manifests/json.d.ts +8 -0
  37. package/dist/scope/registry/manifests/json.d.ts.map +1 -0
  38. package/dist/scope/registry/manifests/json.js +8 -0
  39. package/dist/scope/registry/manifests/json.js.map +1 -0
  40. package/dist/scope/registry/manifests/jsonc.d.ts +6 -0
  41. package/dist/scope/registry/manifests/jsonc.d.ts.map +1 -0
  42. package/dist/scope/registry/manifests/jsonc.js +6 -0
  43. package/dist/scope/registry/manifests/jsonc.js.map +1 -0
  44. package/dist/scope/registry/manifests/jsoncc.d.ts +6 -0
  45. package/dist/scope/registry/manifests/jsoncc.d.ts.map +1 -0
  46. package/dist/scope/registry/manifests/jsoncc.js +6 -0
  47. package/dist/scope/registry/manifests/jsoncc.js.map +1 -0
  48. package/dist/scope/registry/manifests/mocha.d.ts +17 -0
  49. package/dist/scope/registry/manifests/mocha.d.ts.map +1 -0
  50. package/dist/{factory → scope/registry}/manifests/mocha.js +0 -2
  51. package/dist/scope/registry/manifests/mocha.js.map +1 -0
  52. package/dist/scope/registry/manifests/svelte.d.ts +20 -0
  53. package/dist/scope/registry/manifests/svelte.d.ts.map +1 -0
  54. package/dist/{factory → scope/registry}/manifests/svelte.js +0 -1
  55. package/dist/scope/registry/manifests/svelte.js.map +1 -0
  56. package/dist/scope/registry/manifests/ts.d.ts +17 -0
  57. package/dist/scope/registry/manifests/ts.d.ts.map +1 -0
  58. package/dist/{factory → scope/registry}/manifests/ts.js +0 -2
  59. package/dist/scope/registry/manifests/ts.js.map +1 -0
  60. package/dist/scope/registry/manifests/yml.d.ts +9 -0
  61. package/dist/scope/registry/manifests/yml.d.ts.map +1 -0
  62. package/dist/scope/registry/manifests/yml.js +10 -0
  63. package/dist/scope/registry/manifests/yml.js.map +1 -0
  64. package/dist/scope/tree/index.d.ts +2 -6
  65. package/dist/scope/tree/index.d.ts.map +1 -1
  66. package/dist/scope/tree/index.js +20 -5
  67. package/dist/scope/tree/index.js.map +1 -1
  68. package/package.json +1 -1
  69. package/src/factory/index.ts +24 -14
  70. package/src/factory/model/index.d.ts +2 -0
  71. package/src/factory/model/manifest.d.ts +13 -0
  72. package/src/factory/model/tree.d.ts +8 -0
  73. package/src/index.ts +16 -5
  74. package/src/interface/input/imports.ts +4 -4
  75. package/src/interface/input/index.ts +4 -4
  76. package/src/scope/dependencies/index.ts +2 -2
  77. package/src/scope/dependencies/parsers.ts +1 -1
  78. package/src/scope/dependencies/plugins.ts +1 -1
  79. package/src/scope/index.ts +6 -2
  80. package/src/{factory/register.ts → scope/registry/index.ts} +1 -1
  81. package/src/scope/registry/manifests/css.ts +9 -0
  82. package/src/{factory → scope/registry}/manifests/html.ts +1 -5
  83. package/src/scope/registry/manifests/js.ts +4 -0
  84. package/src/scope/registry/manifests/json.ts +7 -0
  85. package/src/scope/registry/manifests/jsonc.ts +5 -0
  86. package/src/scope/registry/manifests/jsoncc.ts +5 -0
  87. package/src/{factory → scope/registry}/manifests/mocha.ts +1 -5
  88. package/src/{factory → scope/registry}/manifests/svelte.ts +1 -4
  89. package/src/{factory → scope/registry}/manifests/ts.ts +1 -5
  90. package/src/scope/registry/manifests/yml.ts +9 -0
  91. package/src/scope/tree/index.ts +21 -11
  92. package/dist/factory/manifests/css.d.ts +0 -3
  93. package/dist/factory/manifests/css.d.ts.map +0 -1
  94. package/dist/factory/manifests/css.js +0 -13
  95. package/dist/factory/manifests/css.js.map +0 -1
  96. package/dist/factory/manifests/html.d.ts +0 -3
  97. package/dist/factory/manifests/html.d.ts.map +0 -1
  98. package/dist/factory/manifests/html.js.map +0 -1
  99. package/dist/factory/manifests/js.d.ts +0 -3
  100. package/dist/factory/manifests/js.d.ts.map +0 -1
  101. package/dist/factory/manifests/js.js +0 -10
  102. package/dist/factory/manifests/js.js.map +0 -1
  103. package/dist/factory/manifests/json.d.ts +0 -3
  104. package/dist/factory/manifests/json.d.ts.map +0 -1
  105. package/dist/factory/manifests/json.js +0 -12
  106. package/dist/factory/manifests/json.js.map +0 -1
  107. package/dist/factory/manifests/jsonc.d.ts +0 -3
  108. package/dist/factory/manifests/jsonc.d.ts.map +0 -1
  109. package/dist/factory/manifests/jsonc.js +0 -11
  110. package/dist/factory/manifests/jsonc.js.map +0 -1
  111. package/dist/factory/manifests/jsoncc.d.ts +0 -3
  112. package/dist/factory/manifests/jsoncc.d.ts.map +0 -1
  113. package/dist/factory/manifests/jsoncc.js +0 -11
  114. package/dist/factory/manifests/jsoncc.js.map +0 -1
  115. package/dist/factory/manifests/mocha.d.ts +0 -3
  116. package/dist/factory/manifests/mocha.d.ts.map +0 -1
  117. package/dist/factory/manifests/mocha.js.map +0 -1
  118. package/dist/factory/manifests/svelte.d.ts +0 -3
  119. package/dist/factory/manifests/svelte.d.ts.map +0 -1
  120. package/dist/factory/manifests/svelte.js.map +0 -1
  121. package/dist/factory/manifests/ts.d.ts +0 -3
  122. package/dist/factory/manifests/ts.d.ts.map +0 -1
  123. package/dist/factory/manifests/ts.js.map +0 -1
  124. package/dist/factory/manifests/yml.d.ts +0 -3
  125. package/dist/factory/manifests/yml.d.ts.map +0 -1
  126. package/dist/factory/manifests/yml.js +0 -12
  127. package/dist/factory/manifests/yml.js.map +0 -1
  128. package/dist/factory/register.d.ts +0 -13
  129. package/dist/factory/register.d.ts.map +0 -1
  130. package/dist/factory/register.js.map +0 -1
  131. package/src/factory/manifests/css.ts +0 -14
  132. package/src/factory/manifests/js.ts +0 -11
  133. package/src/factory/manifests/json.ts +0 -13
  134. package/src/factory/manifests/jsonc.ts +0 -12
  135. package/src/factory/manifests/jsoncc.ts +0 -12
  136. package/src/factory/manifests/manifest/index.d.ts +0 -24
  137. package/src/factory/manifests/yml.ts +0 -13
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svelte.d.ts","sourceRoot":"","sources":["../../../../src/scope/registry/manifests/svelte.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;CAmBlB,CAAC"}
@@ -1,7 +1,6 @@
1
1
  export const svelte = {
2
2
  languageOptions: {
3
3
  parser: "svelte",
4
- globals: null,
5
4
  },
6
5
  parserOptions: {
7
6
  parser: "ts",
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svelte.js","sourceRoot":"","sources":["../../../../src/scope/registry/manifests/svelte.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,MAAM,EAAE,QAAiB;KAC1B;IACD,aAAa,EAAE;QACb,MAAM,EAAE,IAAa;QACrB,mBAAmB,EAAE,CAAC,SAAS,CAAC;QAChC,YAAY,EAAE;YACZ,GAAG,EAAE,KAAK;YACV,YAAY,EAAE,IAAI;SACnB;QACD,gBAAgB,EAAE,MAAM,CAAC,+DAA+D;QACxF,cAAc,EAAE,IAAI,CAAC,iKAAiK;QACtL,uQAAuQ;QACvQ,kCAAkC,EAAE,KAAK;QACzC,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,IAAI;KAClB;IACD,SAAS,EAAE,eAAe;CAC3B,CAAC"}
@@ -0,0 +1,17 @@
1
+ export declare const ts: {
2
+ languageOptions: {
3
+ parser: "ts";
4
+ };
5
+ parserOptions: {
6
+ ecmaFeatures: {
7
+ jsx: boolean;
8
+ globalReturn: boolean;
9
+ };
10
+ jsDocParsingMode: string;
11
+ projectService: boolean;
12
+ warnOnUnsupportedTypeScriptVersion: boolean;
13
+ sourceType: string;
14
+ ecmaVersion: number;
15
+ };
16
+ };
17
+ //# sourceMappingURL=ts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts.d.ts","sourceRoot":"","sources":["../../../../src/scope/registry/manifests/ts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;CAkBd,CAAC"}
@@ -1,12 +1,10 @@
1
1
  export const ts = {
2
2
  languageOptions: {
3
3
  parser: "ts",
4
- globals: null,
5
4
  },
6
5
  parserOptions: {
7
6
  // DOC: https://typescript-eslint.io/packages/parser/#configuration
8
7
  // DOC:(USE-CASE): https://typescript-eslint.io/getting-started/typed-linting/
9
- parser: null,
10
8
  ecmaFeatures: {
11
9
  jsx: false,
12
10
  globalReturn: true,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts.js","sourceRoot":"","sources":["../../../../src/scope/registry/manifests/ts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,eAAe,EAAE;QACf,MAAM,EAAE,IAAa;KACtB;IACD,aAAa,EAAE;QACb,mEAAmE;QACnE,8EAA8E;QAC9E,YAAY,EAAE;YACZ,GAAG,EAAE,KAAK;YACV,YAAY,EAAE,IAAI;SACnB;QACD,gBAAgB,EAAE,MAAM,CAAC,+DAA+D;QACxF,cAAc,EAAE,IAAI,CAAC,iKAAiK;QACtL,uQAAuQ;QACvQ,kCAAkC,EAAE,KAAK;QACzC,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,IAAI;KAClB;CACF,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const yml: {
2
+ languageOptions: {
3
+ parser: "yml";
4
+ };
5
+ parserOptions: {
6
+ defaultYAMLVersion: string;
7
+ };
8
+ };
9
+ //# sourceMappingURL=yml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yml.d.ts","sourceRoot":"","sources":["../../../../src/scope/registry/manifests/yml.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG;;;;;;;CAQf,CAAC"}
@@ -0,0 +1,10 @@
1
+ export const yml = {
2
+ languageOptions: {
3
+ parser: "yml",
4
+ },
5
+ parserOptions: {
6
+ // DOC: https://github.com/ota-meshi/yaml-eslint-parser?tab=readme-ov-file#advanced-configuration
7
+ defaultYAMLVersion: "1.2" /* @default: "1.2" | "1.1" */,
8
+ },
9
+ };
10
+ //# sourceMappingURL=yml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yml.js","sourceRoot":"","sources":["../../../../src/scope/registry/manifests/yml.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,eAAe,EAAE;QACf,MAAM,EAAE,KAAc;KACvB;IACD,aAAa,EAAE;QACb,iGAAiG;QACjG,kBAAkB,EAAE,KAAK,CAAC,6BAA6B;KACxD;CACF,CAAC"}
@@ -1,6 +1,2 @@
1
- import type { scopes } from "../index.js";
2
- export declare const tree: [
3
- typeof scopes[number],
4
- typeof scopes[number][]
5
- ][];
6
- //# sourceMappingURL=index.d.ts.map
1
+ export declare const tree: (readonly ["jsoncc", readonly ["jsonc"]] | readonly ["jsonc", readonly ["json"]] | readonly ["mocha", readonly ["ts"]] | readonly ["svelte", readonly ["ts"]] | readonly ["ts", readonly ["js"]])[];
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scope/tree/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAEjC,eAAO,MAAM,IAAI,EAAE;IACf,OAAO,MAAM,CAAC,MAAM,CAAC;IACrB,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE;CAC1B,EAMA,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scope/tree/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,qMAqBhB,CAAC"}
@@ -1,8 +1,23 @@
1
1
  export const tree = [
2
- ["jsoncc", ["jsonc"]],
3
- ["jsonc", ["json"]],
4
- ["mocha", ["ts"]],
5
- ["svelte", ["ts"]],
6
- ["ts", ["js"]],
2
+ [
3
+ "jsoncc",
4
+ ["jsonc"],
5
+ ],
6
+ [
7
+ "jsonc",
8
+ ["json"],
9
+ ],
10
+ [
11
+ "mocha",
12
+ ["ts"],
13
+ ],
14
+ [
15
+ "svelte",
16
+ ["ts"],
17
+ ],
18
+ [
19
+ "ts",
20
+ ["js"],
21
+ ],
7
22
  ];
8
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/scope/tree/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAGX;IACJ,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAU;IAC9B,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAU;IAC5B,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAU;IAC1B,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAU;IAC3B,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAU;CACxB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/scope/tree/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB;QACE,QAAQ;QACR,CAAC,OAAO,CAAC;KACD;IACV;QACE,OAAO;QACP,CAAC,MAAM,CAAC;KACA;IACV;QACE,OAAO;QACP,CAAC,IAAI,CAAC;KACE;IACV;QACE,QAAQ;QACR,CAAC,IAAI,CAAC;KACE;IACV;QACE,IAAI;QACJ,CAAC,IAAI,CAAC;KACE;CACX,CAAC"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "$schema": "https://json.schemastore.org/package",
4
4
  "$help": "https://docs.npmjs.com/cli/configuring-npm/package-json",
5
5
  "name": "@eslinted/core",
6
- "version": "19.0.2-rc.0",
6
+ "version": "19.0.3-rc.0",
7
7
  "repository": "github:jimmy-zhening-luo/linted-core",
8
8
  "private": false,
9
9
  "engineStrict": true,
@@ -1,24 +1,24 @@
1
1
  import globals from "globals";
2
- import { Manifests } from "./register";
3
2
  import type { Input } from "../interface";
4
- import type {
5
- scopes,
6
- tree as Tree,
7
- Dependencies,
8
- } from "../scope";
3
+ import type * as Model from "./model";
9
4
 
10
- export class Factory {
5
+ export class Factory<
6
+ Plugin extends string,
7
+ Parser extends string,
8
+ Scope extends string,
9
+ > {
11
10
  public global;
12
11
  public scopes;
13
12
 
14
13
  constructor(
15
- tree: typeof Tree,
16
- public parsers: Input<Dependencies.Plugins, Dependencies.Parsers, typeof scopes[number]>["imports"]["parsers"],
17
- defaults: Input<Dependencies.Plugins, Dependencies.Parsers, typeof scopes[number]>["configuration"]["defaults"],
14
+ tree: Model.ITree<Scope>,
15
+ private readonly registry: Record<Scope, Model.IManifest<Parser>>,
16
+ public parsers: Record<Parser, unknown>,
17
+ defaults: Input<Plugin, Parser, Scope>["configuration"]["defaults"],
18
18
  {
19
19
  "*": globalExtension = {},
20
20
  ...scopeExtensions
21
- }: Input<Dependencies.Plugins, Dependencies.Parsers, typeof scopes[number]>["configuration"]["extensions"] = {},
21
+ }: Input<Plugin, Parser, Scope>["configuration"]["extensions"] = {},
22
22
  ) {
23
23
  const {
24
24
  noInlineConfig = defaults
@@ -33,6 +33,8 @@ export class Factory {
33
33
  ecmaVersion = defaults
34
34
  .settings
35
35
  .ecmaVersion,
36
+ } = globalExtension,
37
+ {
36
38
  ignores = [],
37
39
  override = false,
38
40
  } = globalExtension;
@@ -127,7 +129,7 @@ export class Factory {
127
129
  ] as const;
128
130
  }
129
131
 
130
- public scope(scope: typeof scopes[number]) {
132
+ public scope(scope: Scope) {
131
133
  const {
132
134
  files: {
133
135
  [scope]: files,
@@ -169,7 +171,16 @@ export class Factory {
169
171
  },
170
172
  processor = null,
171
173
  language = null,
172
- } = Manifests[scope];
174
+ } = this.registry[scope];
175
+
176
+ if (
177
+ global !== null
178
+ && !(global in globals)
179
+ )
180
+ throw new ReferenceError(
181
+ "Global does not exist",
182
+ { cause: { global } },
183
+ );
173
184
 
174
185
  return files.length === 0
175
186
  ? []
@@ -183,7 +194,6 @@ export class Factory {
183
194
  languageOptions: {
184
195
  ...languageOptionsStatic,
185
196
  ...global === null
186
- || !(global in globals)
187
197
  ? {}
188
198
  : {
189
199
  globals: globals[global as keyof typeof globals] as Record<string, boolean>,
@@ -0,0 +1,2 @@
1
+ export type { IManifest } from "./manifest";
2
+ export type { ITree } from "./tree";
@@ -0,0 +1,13 @@
1
+ export interface IManifest<Parser> {
2
+ languageOptions: {
3
+ [property: string]: unknown;
4
+ parser?: Parser;
5
+ globals?: string;
6
+ };
7
+ parserOptions: {
8
+ [property: string]: unknown;
9
+ parser?: Parser;
10
+ };
11
+ language?: string;
12
+ processor?: string;
13
+ }
@@ -0,0 +1,8 @@
1
+ export type ITree<
2
+ Scope extends string,
3
+ > = Array<
4
+ readonly [
5
+ Scope,
6
+ readonly Scope[],
7
+ ]
8
+ >;
package/src/index.ts CHANGED
@@ -2,13 +2,19 @@ import { Factory } from "./factory";
2
2
  import {
3
3
  scopes,
4
4
  tree,
5
+ registry,
6
+ } from "./scope";
7
+ import type {
8
+ IPlugin,
9
+ IParser,
5
10
  } from "./scope";
6
- import type { Dependencies } from "./scope";
7
11
  import type {
8
12
  Input,
9
13
  Output,
10
14
  } from "./interface";
11
15
 
16
+ type Scope = typeof scopes[number];
17
+
12
18
  export default function (
13
19
  {
14
20
  imports: {
@@ -20,14 +26,19 @@ export default function (
20
26
  extensions,
21
27
  },
22
28
  }: Input<
23
- Dependencies.Plugins,
24
- Dependencies.Parsers,
25
- typeof scopes[number]
29
+ IPlugin,
30
+ IParser,
31
+ Scope
26
32
  >,
27
33
  ) {
28
34
  try {
29
- const factory = new Factory(
35
+ const factory = new Factory<
36
+ IPlugin,
37
+ IParser,
38
+ Scope
39
+ >(
30
40
  tree,
41
+ registry,
31
42
  parsers,
32
43
  defaults,
33
44
  extensions,
@@ -1,13 +1,13 @@
1
1
  export interface Imports<
2
- Plugins extends string,
3
- Parsers extends string,
2
+ Plugin extends string,
3
+ Parser extends string,
4
4
  > {
5
5
  plugins: Record<
6
- Plugins,
6
+ Plugin,
7
7
  unknown
8
8
  >;
9
9
  parsers: Record<
10
- Parsers,
10
+ Parser,
11
11
  unknown
12
12
  >;
13
13
  }
@@ -2,13 +2,13 @@ import type { Imports } from "./imports";
2
2
  import type { Configuration } from "./configuration";
3
3
 
4
4
  export interface Input<
5
- Plugins extends string,
6
- Parsers extends string,
5
+ Plugin extends string,
6
+ Parser extends string,
7
7
  Scope extends string,
8
8
  > {
9
9
  imports: Imports<
10
- Plugins,
11
- Parsers
10
+ Plugin,
11
+ Parser
12
12
  >;
13
13
  configuration: Configuration<
14
14
  Scope
@@ -1,2 +1,2 @@
1
- export type { Plugins } from "./plugins";
2
- export type { Parsers } from "./parsers";
1
+ export type { IPlugin } from "./plugins";
2
+ export type { IParser } from "./parsers";
@@ -1,4 +1,4 @@
1
- export type Parsers = (
1
+ export type IParser = (
2
2
  | "ts"
3
3
  | "svelte"
4
4
  | "html"
@@ -1,4 +1,4 @@
1
- export type Plugins = (
1
+ export type IPlugin = (
2
2
  | "@stylistic"
3
3
  | "@typescript-eslint"
4
4
  | "mocha"
@@ -1,5 +1,3 @@
1
- export type * as Dependencies from "./dependencies";
2
- export { tree } from "./tree";
3
1
  export const scopes = [
4
2
  "js",
5
3
  "ts",
@@ -12,3 +10,9 @@ export const scopes = [
12
10
  "jsoncc",
13
11
  "yml",
14
12
  ] as const;
13
+ export { tree } from "./tree";
14
+ export { registry } from "./registry";
15
+ export type {
16
+ IPlugin,
17
+ IParser,
18
+ } from "./dependencies";
@@ -9,7 +9,7 @@ import { jsonc } from "./manifests/jsonc";
9
9
  import { jsoncc } from "./manifests/jsoncc";
10
10
  import { yml } from "./manifests/yml";
11
11
 
12
- export const Manifests = {
12
+ export const registry = {
13
13
  js,
14
14
  ts,
15
15
  mocha,
@@ -0,0 +1,9 @@
1
+ export const css = {
2
+ languageOptions: {
3
+ tolerant: false,
4
+ },
5
+ parserOptions: {
6
+ // DOC: https://github.com/ota-meshi/yaml-eslint-parser?tab=readme-ov-file#advanced-configuration
7
+ },
8
+ language: "css/css",
9
+ };
@@ -1,12 +1,8 @@
1
- import type { IManifest } from "./manifest";
2
-
3
- export const html: IManifest = {
1
+ export const html = {
4
2
  languageOptions: {
5
3
  parser: "html" as const,
6
- globals: null,
7
4
  },
8
5
  parserOptions: {
9
- parser: null,
10
6
  frontmatter: true /* DOC: https://github.com/yeonjuan/html-eslint/issues/291#issuecomment-2726307803 */,
11
7
  },
12
8
  language: "@html-eslint/html",
@@ -0,0 +1,4 @@
1
+ export const js = {
2
+ languageOptions: {},
3
+ parserOptions: {},
4
+ };
@@ -0,0 +1,7 @@
1
+ export const json = {
2
+ languageOptions: {
3
+ allowTrailingCommas: true,
4
+ },
5
+ parserOptions: {},
6
+ language: "json/jsonc",
7
+ };
@@ -0,0 +1,5 @@
1
+ export const jsonc = {
2
+ languageOptions: {},
3
+ parserOptions: {},
4
+ language: "json/jsonc",
5
+ };
@@ -0,0 +1,5 @@
1
+ export const jsoncc = {
2
+ languageOptions: {},
3
+ parserOptions: {},
4
+ language: "json/jsonc",
5
+ };
@@ -1,13 +1,9 @@
1
- import type { IManifest } from "./manifest";
2
-
3
- export const mocha: IManifest = {
1
+ export const mocha = {
4
2
  languageOptions: {
5
- parser: null,
6
3
  globals: "mocha" as const,
7
4
  },
8
5
  parserOptions: {
9
6
  // MUST BE IDENTICAL TO TS PARSER OPTIONS (eventually see if can inherit)
10
- parser: null,
11
7
  ecmaFeatures: {
12
8
  jsx: false,
13
9
  globalReturn: true,
@@ -1,9 +1,6 @@
1
- import type { IManifest } from "./manifest";
2
-
3
- export const svelte: IManifest = {
1
+ export const svelte = {
4
2
  languageOptions: {
5
3
  parser: "svelte" as const,
6
- globals: null,
7
4
  },
8
5
  parserOptions: {
9
6
  parser: "ts" as const,
@@ -1,14 +1,10 @@
1
- import type { IManifest } from "./manifest";
2
-
3
- export const ts: IManifest = {
1
+ export const ts = {
4
2
  languageOptions: {
5
3
  parser: "ts" as const,
6
- globals: null,
7
4
  },
8
5
  parserOptions: {
9
6
  // DOC: https://typescript-eslint.io/packages/parser/#configuration
10
7
  // DOC:(USE-CASE): https://typescript-eslint.io/getting-started/typed-linting/
11
- parser: null,
12
8
  ecmaFeatures: {
13
9
  jsx: false,
14
10
  globalReturn: true,
@@ -0,0 +1,9 @@
1
+ export const yml = {
2
+ languageOptions: {
3
+ parser: "yml" as const,
4
+ },
5
+ parserOptions: {
6
+ // DOC: https://github.com/ota-meshi/yaml-eslint-parser?tab=readme-ov-file#advanced-configuration
7
+ defaultYAMLVersion: "1.2" /* @default: "1.2" | "1.1" */,
8
+ },
9
+ };
@@ -1,12 +1,22 @@
1
- import type { scopes } from "..";
2
-
3
- export const tree: [
4
- typeof scopes[number],
5
- typeof scopes[number][],
6
- ][] = [
7
- ["jsoncc", ["jsonc"]] as const,
8
- ["jsonc", ["json"]] as const,
9
- ["mocha", ["ts"]] as const,
10
- ["svelte", ["ts"]] as const,
11
- ["ts", ["js"]] as const,
1
+ export const tree = [
2
+ [
3
+ "jsoncc",
4
+ ["jsonc"],
5
+ ] as const,
6
+ [
7
+ "jsonc",
8
+ ["json"],
9
+ ] as const,
10
+ [
11
+ "mocha",
12
+ ["ts"],
13
+ ] as const,
14
+ [
15
+ "svelte",
16
+ ["ts"],
17
+ ] as const,
18
+ [
19
+ "ts",
20
+ ["js"],
21
+ ] as const,
12
22
  ];
@@ -1,3 +0,0 @@
1
- import type { IManifest } from "./manifest";
2
- export declare const css: IManifest;
3
- //# sourceMappingURL=css.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/factory/manifests/css.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,eAAO,MAAM,GAAG,EAAE,SAWjB,CAAC"}
@@ -1,13 +0,0 @@
1
- export const css = {
2
- languageOptions: {
3
- parser: null,
4
- globals: null,
5
- tolerant: false,
6
- },
7
- parserOptions: {
8
- /* DOC: https://github.com/ota-meshi/yaml-eslint-parser?tab=readme-ov-file#advanced-configuration */
9
- parser: null,
10
- },
11
- language: "css/css",
12
- };
13
- //# sourceMappingURL=css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"css.js","sourceRoot":"","sources":["../../../src/factory/manifests/css.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,GAAG,GAAc;IAC5B,eAAe,EAAE;QACf,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,KAAK;KAChB;IACD,aAAa,EAAE;QACb,oGAAoG;QACpG,MAAM,EAAE,IAAI;KACb;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { IManifest } from "./manifest";
2
- export declare const html: IManifest;
3
- //# sourceMappingURL=html.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../src/factory/manifests/html.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,eAAO,MAAM,IAAI,EAAE,SAUlB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"html.js","sourceRoot":"","sources":["../../../src/factory/manifests/html.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAc;IAC7B,eAAe,EAAE;QACf,MAAM,EAAE,MAAe;QACvB,OAAO,EAAE,IAAI;KACd;IACD,aAAa,EAAE;QACb,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,IAAI,CAAC,qFAAqF;KACxG;IACD,QAAQ,EAAE,mBAAmB;CAC9B,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { IManifest } from "./manifest";
2
- export declare const js: IManifest;
3
- //# sourceMappingURL=js.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"js.d.ts","sourceRoot":"","sources":["../../../src/factory/manifests/js.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,eAAO,MAAM,EAAE,EAAE,SAQhB,CAAC"}
@@ -1,10 +0,0 @@
1
- export const js = {
2
- languageOptions: {
3
- parser: null,
4
- globals: null,
5
- },
6
- parserOptions: {
7
- parser: null,
8
- },
9
- };
10
- //# sourceMappingURL=js.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"js.js","sourceRoot":"","sources":["../../../src/factory/manifests/js.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,EAAE,GAAc;IAC3B,eAAe,EAAE;QACf,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;KACd;IACD,aAAa,EAAE;QACb,MAAM,EAAE,IAAI;KACb;CACF,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { IManifest } from "./manifest";
2
- export declare const json: IManifest;
3
- //# sourceMappingURL=json.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/factory/manifests/json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,eAAO,MAAM,IAAI,EAAE,SAUlB,CAAC"}
@@ -1,12 +0,0 @@
1
- export const json = {
2
- languageOptions: {
3
- parser: null,
4
- globals: null,
5
- allowTrailingCommas: true,
6
- },
7
- parserOptions: {
8
- parser: null,
9
- },
10
- language: "json/jsonc",
11
- };
12
- //# sourceMappingURL=json.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/factory/manifests/json.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAc;IAC7B,eAAe,EAAE;QACf,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;QACb,mBAAmB,EAAE,IAAI;KAC1B;IACD,aAAa,EAAE;QACb,MAAM,EAAE,IAAI;KACb;IACD,QAAQ,EAAE,YAAY;CACvB,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { IManifest } from "./manifest";
2
- export declare const jsonc: IManifest;
3
- //# sourceMappingURL=jsonc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jsonc.d.ts","sourceRoot":"","sources":["../../../src/factory/manifests/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,eAAO,MAAM,KAAK,EAAE,SASnB,CAAC"}