@eslinted/core 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,8 @@
1
1
  import type Base from "./base/index.js";
2
2
  import type Includes from "./includes/index.js";
3
- export type { Base, Includes };
3
+ type Files = {
4
+ base: Base;
5
+ includes: Includes;
6
+ };
7
+ export type { Base, Includes, Files, Files as default, };
4
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/boundary/input/files/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/boundary/input/files/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEhD,YAAY,EACV,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,KAAK,IAAI,OAAO,GACjB,CAAC"}
@@ -1,4 +1,8 @@
1
1
  import type Preset from "./preset/index.js";
2
2
  import type Overrides from "./overrides/index.js";
3
- export type { Preset, Overrides };
3
+ type Rules = {
4
+ preset: Preset;
5
+ overrides: Overrides;
6
+ };
7
+ export type { Preset, Overrides, Rules, Rules as default, };
4
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/boundary/input/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAElD,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/boundary/input/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAElD,KAAK,KAAK,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,CAAC;AAEtD,YAAY,EACV,MAAM,EACN,SAAS,EACT,KAAK,EACL,KAAK,IAAI,OAAO,GACjB,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import type { Scope } from "../../scopes/index.js";
2
2
  import type { Input } from "../../boundary/index.js";
3
3
  export default class Files {
4
- private readonly base;
5
- private readonly includes;
6
- constructor(base: Input.Files.Base, includes: Input.Files.Includes);
4
+ private readonly input;
5
+ constructor(input: Input.Files.Files);
7
6
  files(scope: Scope): readonly string[];
8
7
  }
9
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/factory/files/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,CAAC,OAAO,OAAO,KAAK;IAEtB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBADR,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EACtB,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ;IAG1C,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,MAAM,EAAE;CAM9C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/factory/files/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,CAAC,OAAO,OAAO,KAAK;IACZ,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK;IAE9C,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,MAAM,EAAE;CAQ9C"}
@@ -1,13 +1,12 @@
1
1
  export default class Files {
2
- base;
3
- includes;
4
- constructor(base, includes) {
5
- this.base = base;
6
- this.includes = includes;
2
+ input;
3
+ constructor(input) {
4
+ this.input = input;
7
5
  }
8
6
  files(scope) {
9
7
  try {
10
- return [...this.base[scope], ...this.includes[scope] ?? []];
8
+ const { base, includes } = this.input;
9
+ return [...base[scope], ...includes[scope] ?? []];
11
10
  }
12
11
  catch (e) {
13
12
  throw new Error(`linted.factory.Files/scope:${scope}`, { cause: e });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/factory/files/index.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,OAAO,KAAK;IAEL;IACA;IAFnB,YACmB,IAAsB,EACtB,QAA8B;QAD9B,SAAI,GAAJ,IAAI,CAAkB;QACtB,aAAQ,GAAR,QAAQ,CAAsB;IAC9C,CAAC;IAEG,KAAK,CAAC,KAAY;QACvB,IAAI,CAAC;YACH,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,8BAA8B,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAAC,CAAC;IACrF,CAAC;CACF"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/factory/files/index.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,OAAO,KAAK;IACK;IAA7B,YAA6B,KAAwB;QAAxB,UAAK,GAAL,KAAK,CAAmB;IAAG,CAAC;IAElD,KAAK,CAAC,KAAY;QACvB,IAAI,CAAC;YACH,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YAEtC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QACpD,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,8BAA8B,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAAC,CAAC;IACrF,CAAC;CACF"}
@@ -39,9 +39,9 @@ export default class Option {
39
39
  try {
40
40
  const { plugins, linterOptions, languageOptions, processor, } = this;
41
41
  return {
42
+ plugins,
42
43
  linterOptions,
43
44
  languageOptions,
44
- plugins,
45
45
  ...processor,
46
46
  };
47
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/factory/options/option/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAM9B,MAAM,CAAC,OAAO,OAAgB,MAAM;IAmBhB;IACA;IACA;IACA;IAbD,aAAa,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,6BAA6B,EAAE,OAAO,EAAW,CAAC;IAS3G,YACkB,KAAwB,EACxB,OAAmB,EACnB,OAA4B,EAC5B,MAAmC;QAHnC,UAAK,GAAL,KAAK,CAAmB;QACxB,YAAO,GAAP,OAAO,CAAY;QACnB,YAAO,GAAP,OAAO,CAAqB;QAC5B,WAAM,GAAN,MAAM,CAA6B;IAClD,CAAC;IAEJ,IAAW,OAAO;QAChB,IAAI,CAAC;YACH,MAAM,EACJ,KAAK,EACL,OAAO,EACP,KAA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CAAC;YACL,CAAC;QACH,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,CAAC,KAAK,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAAC,CAAC;IACpG,CAAC;IAED,IAAY,MAAM;QAChB,IAAI,CAAC;YACH,MAAM,EACJ,OAAO,EACP,aAAa,EACb,eAAe,EACf,SAAS,GACV,GAAG,IAAI,CAAC;YAET,OAAO;gBACL,OAAO;gBACP,aAAa;gBACb,eAAe;gBACf,GAAG,SAAS;aAOb,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,CAAC,KAAK,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAAC,CAAC;IACnG,CAAC;IAIS,OAAO,CAAC,IAAiB;QACjC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;CACF"}
@@ -2,9 +2,8 @@ import Ruleset from "./ruleset/index.js";
2
2
  import type { Input } from "../../boundary/index.js";
3
3
  import type { Scope } from "../../scopes/index.js";
4
4
  export default class {
5
- private readonly preset;
6
- private readonly overrides;
7
- constructor(preset: Input.Rules.Preset, overrides: Input.Rules.Overrides);
5
+ private readonly input;
6
+ constructor(input: Input.Rules.Rules);
8
7
  ruleset<S extends Scope>(scope: literalful<S>): Ruleset<S>;
9
8
  }
10
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/factory/rulesets/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAiB,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,CAAC,OAAO;IAEV,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBADT,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAC1B,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS;IAG5C,OAAO,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAOlE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/factory/rulesets/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAiB,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,CAAC,OAAO;IACA,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK;IAE9C,OAAO,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAQlE"}
@@ -1,15 +1,13 @@
1
1
  import Ruleset, { Rule } from "./ruleset/index.js";
2
2
  export default class {
3
- preset;
4
- overrides;
5
- constructor(preset, overrides) {
6
- this.preset = preset;
7
- this.overrides = overrides;
3
+ input;
4
+ constructor(input) {
5
+ this.input = input;
8
6
  }
9
7
  ruleset(scope) {
10
8
  try {
11
- return new Ruleset(scope, ...this.preset[scope].map(args => new Rule(...args)))
12
- .override(this.overrides[scope]);
9
+ const { preset, overrides } = this.input;
10
+ return new Ruleset(scope, ...preset[scope].map(args => new Rule(...args))).override(overrides[scope]);
13
11
  }
14
12
  catch (e) {
15
13
  throw new Error(`linted.factory.Rulesets/ruleset/scope:${scope}`, { cause: e });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/factory/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AC,KAAK,CAAC,CAAC,CAAC;QAC3G,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,yCAAyC,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAAC,CAAC;IAChG,CAAC;CACF"}
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import scopes, {} from "./scopes/index.js";
2
2
  import { Options, Files, Rulesets } from "./factory/index.js";
3
3
  export default function (plugins, parsers, files, rules) {
4
4
  try {
5
- const F = new Files(files.base, files.includes), R = new Rulesets(rules.preset, rules.overrides), Pa = {
5
+ const F = new Files(files), R = new Rulesets(rules), Pa = {
6
6
  js: [],
7
7
  ts: [parsers.ts],
8
8
  svelte: [parsers.svelte, parsers.ts],
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAc,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9D,MAAM,CAAC,OAAO,WACZ,OAA+B,EAC/B,OAA+B,EAC/B,KAGC,EACD,KAGC;IAED,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,EAC/C,CAAC,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,EAC/C,EAAE,GAAkE;YAClE,EAAE,EAAE,EAAW;YACf,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAU;YACzB,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAU;YAC7C,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,CAAU;YAC5B,IAAI,EAAE,CAAC,OAAO,CAAC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AC,CAAC,OAAO,CAAC,MAAM,CAAC,EACjB,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,EACxB,EAAE,CAAC,IAAI,CACR,CAAC,OAAO;YACX,KAAK,EAAE,IAAI,OAAO;iBACf,KAAK,CACJ,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,EAChB,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAClB,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,EACxB,EAAE,CAAC,KAAK,CACT,CAAC,OAAO;YACX,GAAG,EAAE,IAAI,OAAO;iBACb,GAAG,CACF,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EACd,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAChB,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EACpB,EAAE,CAAC,GAAG,CACP,CAAC,OAAO;YACX,EAAE,EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EACb,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EACf,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,EACtC,EAAE,CAAC,EAAE,CACN,CAAC,OAAO;SACZ,CAAC;QAEF,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QAAC,MAAM,IAAI,KAAK,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAAC,CAAC;AAC7D,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_schemaVersion": "20.15.0",
3
3
  "name": "@eslinted/core",
4
- "version": "3.1.1",
4
+ "version": "3.1.2",
5
5
  "description": "Core ESLint flat config factory npm package `linted`.",
6
6
  "keywords": [],
7
7
  "license": "MIT",
@@ -1,4 +1,11 @@
1
1
  import type Base from "./base/index.js";
2
2
  import type Includes from "./includes/index.js";
3
3
 
4
- export type { Base, Includes };
4
+ type Files = { base: Base; includes: Includes };
5
+
6
+ export type {
7
+ Base,
8
+ Includes,
9
+ Files,
10
+ Files as default,
11
+ };
@@ -1,4 +1,11 @@
1
1
  import type Preset from "./preset/index.js";
2
2
  import type Overrides from "./overrides/index.js";
3
3
 
4
- export type { Preset, Overrides };
4
+ type Rules = { preset: Preset; overrides: Overrides };
5
+
6
+ export type {
7
+ Preset,
8
+ Overrides,
9
+ Rules,
10
+ Rules as default,
11
+ };
@@ -2,14 +2,13 @@ import type { Scope } from "../../scopes/index.js";
2
2
  import type { Input } from "../../boundary/index.js";
3
3
 
4
4
  export default class Files {
5
- constructor(
6
- private readonly base: Input.Files.Base,
7
- private readonly includes: Input.Files.Includes,
8
- ) {}
5
+ constructor(private readonly input: Input.Files.Files) {}
9
6
 
10
7
  public files(scope: Scope): readonly string[] {
11
8
  try {
12
- return [...this.base[scope], ...this.includes[scope] ?? []];
9
+ const { base, includes } = this.input;
10
+
11
+ return [...base[scope], ...includes[scope] ?? []];
13
12
  }
14
13
  catch (e) { throw new Error(`linted.factory.Files/scope:${scope}`, { cause: e }); }
15
14
  }
@@ -70,9 +70,9 @@ export default abstract class Option<
70
70
  } = this;
71
71
 
72
72
  return {
73
+ plugins,
73
74
  linterOptions,
74
75
  languageOptions,
75
- plugins,
76
76
  ...processor,
77
77
  } satisfies IOption<
78
78
  PluginId,
@@ -3,15 +3,13 @@ import type { Input } from "../../boundary/index.js";
3
3
  import type { Scope } from "../../scopes/index.js";
4
4
 
5
5
  export default class {
6
- constructor(
7
- private readonly preset: Input.Rules.Preset,
8
- private readonly overrides: Input.Rules.Overrides,
9
- ) {}
6
+ constructor(private readonly input: Input.Rules.Rules) {}
10
7
 
11
8
  public ruleset<S extends Scope>(scope: literalful<S>): Ruleset<S> {
12
9
  try {
13
- return new Ruleset<S>(scope, ...this.preset[scope].map(args => new Rule(...args)))
14
- .override(this.overrides[scope]);
10
+ const { preset, overrides } = this.input;
11
+
12
+ return new Ruleset<S>(scope, ...preset[scope].map(args => new Rule(...args))).override(overrides[scope]);
15
13
  }
16
14
  catch (e) { throw new Error(`linted.factory.Rulesets/ruleset/scope:${scope}`, { cause: e }); }
17
15
  }
package/src/index.ts CHANGED
@@ -16,8 +16,8 @@ export default function (
16
16
  },
17
17
  ): Boundary.Output[] {
18
18
  try {
19
- const F = new Files(files.base, files.includes),
20
- R = new Rulesets(rules.preset, rules.overrides),
19
+ const F = new Files(files),
20
+ R = new Rulesets(rules),
21
21
  Pa: { [S in Scope]: ConstructorParameters<typeof Options[S]>[3] } = {
22
22
  js: [] as const,
23
23
  ts: [parsers.ts] as const,