@eslinted/core 0.0.1-rc.3 → 0.0.1-rc.5

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,10 @@
1
+ import type { Scopes } from "./scopes.js";
2
+ import type Plugins from "./plugins.js";
3
+ import type Parsers from "./parsers.js";
1
4
  import type Ruleset from "./rulesets/ruleset/Ruleset.js";
2
5
  export { default as Ruleset } from "./rulesets/ruleset/Ruleset.js";
3
6
  export { Rule } from "./rulesets/ruleset/Ruleset.js";
4
- export default function (plugins: Plugins, parsers: Record<Scope, unknown>, files: Record<Scope, string[]>, rulesets: {
5
- [S in Scope]: Ruleset<S>;
7
+ export default function (plugins: Plugins, parsers: Parsers, files: Record<Scopes, string[]>, rulesets: {
8
+ [S in Scopes]: Ruleset<S>;
6
9
  }): IConfig[];
7
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,EAC/B,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAC9B,QAAQ,EAAE;KAAG,CAAC,IAAI,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC;CAAE,GACrC,OAAO,EAAE,CAqGX"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAC/B,QAAQ,EAAE;KAAG,CAAC,IAAI,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;CAAE,GACtC,OAAO,EAAE,CAqGX"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,OAAO,MAAM,cAAc,CAAC;AAGnC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,MAAM,CAAC,OAAO,WACZ,OAAgB,EAChB,OAA+B,EAC/B,KAA8B,EAC9B,QAAsC;IAEtC,IAAI,CAAC;QACH,MAAM,mBAAmB,GAIrB;YACF,EAAE,EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,OAAO;iBACJ,EAAE,EACL,GAAG,KAAK;iBACL,EAAE,CACN;iBACA,IAAI;YACP,EAAE,EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,OAAO;iBACJ,EAAE,EACL,OAAO;iBACJ,EAAE,EACL,GAAG,KAAK;iBACL,EAAE,CACN;iBACA,IAAI;YACP,MAAM,EAAE,IAAI,OAAO;iBAChB,MAAM,CACL,OAAO;iBACJ,MAAM,EACT,OAAO;iBACJ,MAAM,EACT,OAAO;iBACJ,EAAE,EACL,GAAG,KAAK;iBACL,MAAM,CACV;iBACA,IAAI;YACP,IAAI,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,KAAK,CAAC,MAAM,GAAG,CAAC;YACzC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CACxB,KAAK,CAAC,EAAE;gBACN,OAAO;oBACL,KAAK;oBACL,GAAG,mBAAmB,CAAC,KAAK,CAAC;iBAC9B,CAAC;YACJ,CAAC,CACF;YACD,CAAC,CAAC,EAAE,CACT;aACA,IAAI,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,6BAA6B,EAC7B,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,SAAS,MAAM,wBAAwB,CAAC;;;;;;;;;;AAE/C,wBAQmC"}
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,SAAS,MAAM,wBAAwB,CAAC;;;;;;;;;;AAE/C,wBAQoC"}
@@ -1 +1 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,eAAe;IACb,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,MAAM,EAAE,YAAY;IACpB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,WAAW;IAClB,GAAG,EAAE,SAAS;CACkB,CAAC"}
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,eAAe;IACb,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,MAAM,EAAE,YAAY;IACpB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,WAAW;IAClB,GAAG,EAAE,SAAS;CACmB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { Scopes } from "./scopes.js";
2
+ export default interface Parsers extends Particord<Scopes, unknown> {
3
+ ts: unknown;
4
+ svelte: unknown;
5
+ html: unknown;
6
+ json: unknown;
7
+ jsonc: unknown;
8
+ yml: unknown;
9
+ }
10
+ //# sourceMappingURL=parsers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,CAAC,OAAO,WAAW,OAAQ,SAAQ,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;IACjE,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;CACd"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=parsers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsers.js","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":""}
@@ -0,0 +1,34 @@
1
+ import type { Scopes } from "./scopes.js";
2
+ type PluginPackage = {
3
+ configs: unknown;
4
+ };
5
+ export default interface Plugins extends Record<Scopes, Record<string, {
6
+ configs: unknown;
7
+ }>> {
8
+ js: {
9
+ "@stylistic": PluginPackage;
10
+ };
11
+ ts: {
12
+ "@stylistic": PluginPackage;
13
+ "@typescript-eslint": PluginPackage;
14
+ };
15
+ svelte: {
16
+ "@stylistic": PluginPackage;
17
+ "@typescript-eslint": PluginPackage;
18
+ svelte: PluginPackage;
19
+ };
20
+ html: {
21
+ "@html-eslint": PluginPackage;
22
+ };
23
+ json: {
24
+ jsonc: PluginPackage;
25
+ };
26
+ jsonc: {
27
+ jsonc: PluginPackage;
28
+ };
29
+ yml: {
30
+ yml: PluginPackage;
31
+ };
32
+ }
33
+ export {};
34
+ //# sourceMappingURL=plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,KAAK,aAAa,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1C,MAAM,CAAC,OAAO,WAAW,OAAQ,SAAQ,MAAM,CAC7C,MAAM,EACN,MAAM,CACJ,MAAM,EACN;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CACrB,CACF;IACC,EAAE,EAAE;QAAE,YAAY,EAAE,aAAa,CAAA;KAAE,CAAC;IACpC,EAAE,EAAE;QACF,YAAY,EAAE,aAAa,CAAC;QAC5B,oBAAoB,EAAE,aAAa,CAAC;KACrC,CAAC;IACF,MAAM,EAAE;QACN,YAAY,EAAE,aAAa,CAAC;QAC5B,oBAAoB,EAAE,aAAa,CAAC;QACpC,MAAM,EAAE,aAAa,CAAC;KACvB,CAAC;IACF,IAAI,EAAE;QAAE,cAAc,EAAE,aAAa,CAAA;KAAE,CAAC;IACxC,IAAI,EAAE;QAAE,KAAK,EAAE,aAAa,CAAA;KAAE,CAAC;IAC/B,KAAK,EAAE;QAAE,KAAK,EAAE,aAAa,CAAA;KAAE,CAAC;IAChC,GAAG,EAAE;QAAE,GAAG,EAAE,aAAa,CAAA;KAAE,CAAC;CAC7B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=plugins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":""}
package/dist/scopes.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- declare const scopes: ["js", "ts", "svelte", "html", "json", "jsonc", "yml"];
1
+ export type Scopes = typeof scopes[number];
2
+ declare const scopes: readonly ["js", "ts", "svelte", "html", "json", "jsonc", "yml"];
2
3
  export default scopes;
3
4
  //# sourceMappingURL=scopes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM,wDAQgB,CAAC;AAE7B,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AAE3C,QAAA,MAAM,MAAM,iEAQF,CAAC;AAEX,eAAe,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"scopes.js","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG;IACb,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;CACqB,CAAC;AAE7B,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"scopes.js","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG;IACb,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;CACG,CAAC;AAEX,eAAe,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslinted/core",
3
- "version": "0.0.1-rc.3",
3
+ "version": "0.0.1-rc.5",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -1,18 +1,21 @@
1
1
  import scopes from "./scopes.js";
2
2
  import options from "./options.js";
3
+ import type { Scopes } from "./scopes.js";
4
+ import type Plugins from "./plugins.js";
5
+ import type Parsers from "./parsers.js";
3
6
  import type Ruleset from "./rulesets/ruleset/Ruleset.js";
4
7
 
5
8
  export { default as Ruleset } from "./rulesets/ruleset/Ruleset.js";
6
9
  export { Rule } from "./rulesets/ruleset/Ruleset.js";
7
10
  export default function (
8
11
  plugins: Plugins,
9
- parsers: Record<Scope, unknown>,
10
- files: Record<Scope, string[]>,
11
- rulesets: { [S in Scope]: Ruleset<S> },
12
+ parsers: Parsers,
13
+ files: Record<Scopes, string[]>,
14
+ rulesets: { [S in Scopes]: Ruleset<S> },
12
15
  ): IConfig[] {
13
16
  try {
14
17
  const instantiatedOptions: {
15
- [S in Scope]: InstanceType<
18
+ [S in Scopes]: InstanceType<
16
19
  typeof options[S]
17
20
  >["body"]
18
21
  } = {
package/src/options.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { Scopes } from "./scopes.js";
1
2
  import JsOption from "./options/JsOption.js";
2
3
  import TsOption from "./options/TsOption.js";
3
4
  import SvelteOption from "./options/SvelteOption.js";
@@ -14,4 +15,4 @@ export default {
14
15
  json: JsonOption,
15
16
  jsonc: JsoncOption,
16
17
  yml: YmlOption,
17
- } satisfies Record<Scope, unknown>;
18
+ } satisfies Record<Scopes, unknown>;
package/src/parsers.ts ADDED
@@ -0,0 +1,10 @@
1
+ import type { Scopes } from "./scopes.js";
2
+
3
+ export default interface Parsers extends Particord<Scopes, unknown> {
4
+ ts: unknown;
5
+ svelte: unknown;
6
+ html: unknown;
7
+ json: unknown;
8
+ jsonc: unknown;
9
+ yml: unknown;
10
+ }
@@ -1,7 +1,9 @@
1
+ import type { Scopes } from "./scopes.js";
2
+
1
3
  type PluginPackage = { configs: unknown };
2
4
 
3
- declare interface Plugins extends Record<
4
- Scope,
5
+ export default interface Plugins extends Record<
6
+ Scopes,
5
7
  Record<
6
8
  string,
7
9
  { configs: unknown }
package/src/scopes.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export type Scopes = typeof scopes[number];
2
+
1
3
  const scopes = [
2
4
  "js",
3
5
  "ts",
@@ -6,6 +8,6 @@ const scopes = [
6
8
  "json",
7
9
  "jsonc",
8
10
  "yml",
9
- ] as const satisfies Scope[];
11
+ ] as const;
10
12
 
11
13
  export default scopes;
package/src/Scope.d.ts DELETED
@@ -1,9 +0,0 @@
1
- declare type Scope =
2
- | "js"
3
- | "ts"
4
- | "svelte"
5
- | "html"
6
- | "json"
7
- | "jsonc"
8
- | "yml"
9
- ;