@eslinted/core 2.0.0-rc.1 → 2.0.0-rc.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. package/dist/boundary/input/files/base/base.d.ts +5 -0
  2. package/dist/boundary/input/files/base/base.d.ts.map +1 -0
  3. package/dist/boundary/input/files/base/base.js +2 -0
  4. package/dist/boundary/input/files/base/base.js.map +1 -0
  5. package/dist/boundary/input/files/base/list/list.d.ts +3 -0
  6. package/dist/boundary/input/files/base/list/list.d.ts.map +1 -0
  7. package/dist/boundary/input/files/base/list/list.js +2 -0
  8. package/dist/boundary/input/files/base/list/list.js.map +1 -0
  9. package/dist/boundary/input/files/files.d.ts +3 -4
  10. package/dist/boundary/input/files/files.d.ts.map +1 -1
  11. package/dist/boundary/input/files/includes/includes.d.ts +4 -0
  12. package/dist/boundary/input/files/includes/includes.d.ts.map +1 -0
  13. package/dist/boundary/input/files/includes/includes.js +2 -0
  14. package/dist/boundary/input/files/includes/includes.js.map +1 -0
  15. package/dist/boundary/input/input.d.ts +3 -4
  16. package/dist/boundary/input/input.d.ts.map +1 -1
  17. package/dist/boundary/input/rules/overrides/overrides.d.ts +5 -0
  18. package/dist/boundary/input/rules/overrides/overrides.d.ts.map +1 -0
  19. package/dist/boundary/input/rules/overrides/overrides.js +2 -0
  20. package/dist/boundary/input/rules/overrides/overrides.js.map +1 -0
  21. package/dist/boundary/input/rules/preset/entry/entry.d.ts +4 -0
  22. package/dist/boundary/input/rules/preset/entry/entry.d.ts.map +1 -0
  23. package/dist/boundary/input/rules/preset/entry/entry.js +2 -0
  24. package/dist/boundary/input/rules/preset/entry/entry.js.map +1 -0
  25. package/dist/boundary/input/rules/preset/entry/object/object.d.ts +4 -0
  26. package/dist/boundary/input/rules/preset/entry/object/object.d.ts.map +1 -0
  27. package/dist/boundary/input/rules/preset/entry/object/object.js +2 -0
  28. package/dist/boundary/input/rules/preset/entry/object/object.js.map +1 -0
  29. package/dist/boundary/input/rules/preset/entry/object/state/level.d.ts +3 -0
  30. package/dist/boundary/input/rules/preset/entry/object/state/level.d.ts.map +1 -0
  31. package/dist/boundary/input/rules/preset/entry/object/state/level.js +2 -0
  32. package/dist/boundary/input/rules/preset/entry/object/state/level.js.map +1 -0
  33. package/dist/boundary/input/rules/preset/preset.d.ts +5 -0
  34. package/dist/boundary/input/rules/preset/preset.d.ts.map +1 -0
  35. package/dist/boundary/input/rules/preset/preset.js +2 -0
  36. package/dist/boundary/input/rules/preset/preset.js.map +1 -0
  37. package/dist/boundary/input/rules/rules.d.ts +3 -4
  38. package/dist/boundary/input/rules/rules.d.ts.map +1 -1
  39. package/dist/boundary/output/config/config.d.ts +1 -1
  40. package/dist/boundary/output/config/config.d.ts.map +1 -1
  41. package/dist/factory/files/Files.d.ts +1 -1
  42. package/dist/factory/files/Files.d.ts.map +1 -1
  43. package/dist/factory/files/Files.js.map +1 -1
  44. package/dist/factory/ruleset/Ruleset.d.ts +1 -1
  45. package/dist/factory/ruleset/Ruleset.d.ts.map +1 -1
  46. package/dist/factory/ruleset/rule/Rule.d.ts +2 -2
  47. package/dist/factory/ruleset/rule/Rule.d.ts.map +1 -1
  48. package/dist/factory/ruleset/rule/Rule.js.map +1 -1
  49. package/dist/index.d.ts +8 -3
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +17 -17
  52. package/dist/index.js.map +1 -1
  53. package/package.json +1 -1
  54. package/src/boundary/input/files/base/base.ts +9 -0
  55. package/src/boundary/input/files/files.ts +4 -6
  56. package/src/boundary/input/files/includes/includes.ts +8 -0
  57. package/src/boundary/input/input.ts +2 -6
  58. package/src/boundary/input/rules/overrides/overrides.ts +9 -0
  59. package/src/boundary/input/rules/preset/preset.ts +9 -0
  60. package/src/boundary/input/rules/rules.ts +4 -6
  61. package/src/boundary/output/config/config.ts +1 -1
  62. package/src/factory/files/Files.ts +2 -2
  63. package/src/factory/ruleset/rule/Rule.ts +1 -1
  64. package/src/index.ts +28 -27
  65. package/src/boundary/input/overrides/overrides.ts +0 -9
  66. /package/src/boundary/input/files/{list → base/list}/list.ts +0 -0
  67. /package/src/boundary/input/rules/{entry → preset/entry}/entry.ts +0 -0
  68. /package/src/boundary/input/rules/{entry → preset/entry}/object/object.ts +0 -0
  69. /package/src/boundary/input/rules/{entry → preset/entry}/object/state/level.ts +0 -0
@@ -0,0 +1,5 @@
1
+ import type { Scope } from "../../../../scopes/Scopes.js";
2
+ import type * as Base from "./list/list.js";
3
+ type Base = Readonly<Record<Scope, Base.List>>;
4
+ export type { Base as default, Base, };
5
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/boundary/input/files/base/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAE5C,KAAK,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAE/C,YAAY,EACV,IAAI,IAAI,OAAO,EACf,IAAI,GACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../src/boundary/input/files/base/base.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ type List = readonly string[];
2
+ export type { List as default, List, };
3
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../../src/boundary/input/files/base/list/list.ts"],"names":[],"mappings":"AAAA,KAAK,IAAI,GAAG,SAAS,MAAM,EAAE,CAAC;AAE9B,YAAY,EACV,IAAI,IAAI,OAAO,EACf,IAAI,GACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../../src/boundary/input/files/base/list/list.ts"],"names":[],"mappings":""}
@@ -1,5 +1,4 @@
1
- import type { Scope } from "../../../scopes/Scopes.js";
2
- import type * as Files from "./list/list.js";
3
- type Files = Readonly<Record<Scope, Files.List>>;
4
- export type { Files as default, Files, };
1
+ import type Base from "./base/base.js";
2
+ import type Includes from "./includes/includes.js";
3
+ export type { Base, Includes, };
5
4
  //# sourceMappingURL=files.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../../src/boundary/input/files/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAE7C,KAAK,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAEjD,YAAY,EACV,KAAK,IAAI,OAAO,EAChB,KAAK,GACN,CAAC"}
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../../src/boundary/input/files/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AAEnD,YAAY,EACV,IAAI,EACJ,QAAQ,GACT,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type * as Includes from "../base/base.ts";
2
+ type Includes = Partial<Includes.Base>;
3
+ export type { Includes as default, Includes, };
4
+ //# sourceMappingURL=includes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"includes.d.ts","sourceRoot":"","sources":["../../../../../src/boundary/input/files/includes/includes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAEjD,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAEvC,YAAY,EACV,QAAQ,IAAI,OAAO,EACnB,QAAQ,GACT,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=includes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"includes.js","sourceRoot":"","sources":["../../../../../src/boundary/input/files/includes/includes.ts"],"names":[],"mappings":""}
@@ -1,7 +1,6 @@
1
1
  import type Plugins from "./plugins/plugins.js";
2
2
  import type Parsers from "./parsers/parsers.js";
3
- import type Files from "./files/files.js";
4
- import type Rules from "./rules/rules.js";
5
- import type Overrides from "./overrides/overrides.js";
6
- export type { Plugins, Parsers, Files, Rules, Overrides, };
3
+ export type { Plugins, Parsers, };
4
+ export type * as Files from "./files/files.js";
5
+ export type * as Rules from "./rules/rules.js";
7
6
  //# sourceMappingURL=input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/boundary/input/input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AAEtD,YAAY,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,KAAK,EACL,SAAS,GACV,CAAC"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/boundary/input/input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAEhD,YAAY,EACV,OAAO,EACP,OAAO,GACR,CAAC;AACF,YAAY,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC/C,YAAY,KAAK,KAAK,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Scope } from "../../../../scopes/Scopes.js";
2
+ import type * as Overrides from "../preset/preset.js";
3
+ type Overrides = Readonly<Particord<Scope, Overrides.Preset.Entry.Object>>;
4
+ export type { Overrides as default, Overrides, };
5
+ //# sourceMappingURL=overrides.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overrides.d.ts","sourceRoot":"","sources":["../../../../../src/boundary/input/rules/overrides/overrides.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,KAAK,SAAS,MAAM,qBAAqB,CAAC;AAEtD,KAAK,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAE3E,YAAY,EACV,SAAS,IAAI,OAAO,EACpB,SAAS,GACV,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=overrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overrides.js","sourceRoot":"","sources":["../../../../../src/boundary/input/rules/overrides/overrides.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type * as Entry from "./object/object.js";
2
+ type Entry = readonly [string, Entry.Object];
3
+ export type { Entry as default, Entry, };
4
+ //# sourceMappingURL=entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../../../../../../src/boundary/input/rules/preset/entry/entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,oBAAoB,CAAC;AAEjD,KAAK,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;AAE7C,YAAY,EACV,KAAK,IAAI,OAAO,EAChB,KAAK,GACN,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry.js","sourceRoot":"","sources":["../../../../../../src/boundary/input/rules/preset/entry/entry.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type * as Object from "./state/level.js";
2
+ type Object = Readonly<Record<string, Object.Level | readonly [Object.Level, ...unknown[]]>>;
3
+ export type { Object as default, Object, };
4
+ //# sourceMappingURL=object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../../../../../src/boundary/input/rules/preset/entry/object/object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAEhD,KAAK,MAAM,GAAG,QAAQ,CAAC,MAAM,CAC3B,MAAM,EACJ,MAAM,CAAC,KAAK,GACZ,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CACxC,CAAC,CAAC;AAEH,YAAY,EACV,MAAM,IAAI,OAAO,EACjB,MAAM,GACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.js","sourceRoot":"","sources":["../../../../../../../src/boundary/input/rules/preset/entry/object/object.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ type Level = "error" | "warn" | "off";
2
+ export type { Level as default, Level, };
3
+ //# sourceMappingURL=level.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"level.d.ts","sourceRoot":"","sources":["../../../../../../../../src/boundary/input/rules/preset/entry/object/state/level.ts"],"names":[],"mappings":"AAAA,KAAK,KAAK,GACN,OAAO,GACP,MAAM,GACN,KAAK,CAAC;AAEV,YAAY,EACV,KAAK,IAAI,OAAO,EAChB,KAAK,GACN,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=level.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"level.js","sourceRoot":"","sources":["../../../../../../../../src/boundary/input/rules/preset/entry/object/state/level.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { Scope } from "../../../../scopes/Scopes.js";
2
+ import type * as Preset from "./entry/entry.js";
3
+ type Preset = Readonly<Record<Scope, readonly Preset.Entry[]>>;
4
+ export type { Preset as default, Preset, };
5
+ //# sourceMappingURL=preset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../../../../src/boundary/input/rules/preset/preset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAEhD,KAAK,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AAE/D,YAAY,EACV,MAAM,IAAI,OAAO,EACjB,MAAM,GACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=preset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preset.js","sourceRoot":"","sources":["../../../../../src/boundary/input/rules/preset/preset.ts"],"names":[],"mappings":""}
@@ -1,5 +1,4 @@
1
- import type { Scope } from "../../../scopes/Scopes.js";
2
- import type * as Rules from "./entry/entry.js";
3
- type Rules = Readonly<Record<Scope, readonly Rules.Entry[]>>;
4
- export type { Rules as default, Rules, };
1
+ import type Preset from "./preset/preset.js";
2
+ import type Overrides from "./overrides/overrides.js";
3
+ export type { Preset, Overrides, };
5
4
  //# sourceMappingURL=rules.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/boundary/input/rules/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAE/C,KAAK,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AAE7D,YAAY,EACV,KAAK,IAAI,OAAO,EAChB,KAAK,GACN,CAAC"}
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/boundary/input/rules/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AAEtD,YAAY,EACV,MAAM,EACN,SAAS,GACV,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { Rules } from "../../input/input.js";
2
2
  export default interface Config {
3
3
  name: `linted/scope:${string}/rule:${string}+${string}`;
4
- rules: Rules.Entry.Object;
4
+ rules: Rules.Preset.Entry.Object;
5
5
  files: readonly string[];
6
6
  linterOptions: {
7
7
  noInlineConfig: true;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/boundary/output/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,CAAC,OAAO,WAAW,MAAM;IAC7B,IAAI,EAAE,gBAAgB,MAAM,SAAS,MAAM,IAAI,MAAM,EAAE,CAAC;IACxD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;IAC1B,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
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/boundary/output/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,CAAC,OAAO,WAAW,MAAM;IAC7B,IAAI,EAAE,gBAAgB,MAAM,SAAS,MAAM,IAAI,MAAM,EAAE,CAAC;IACxD,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;IACjC,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"}
@@ -3,7 +3,7 @@ import type { Input } from "../../boundary/boundary.js";
3
3
  export default class Files {
4
4
  private readonly base;
5
5
  private readonly includes;
6
- constructor(base: Input.Files, includes: Partial<Input.Files>);
6
+ constructor(base: Input.Files.Base, includes: Input.Files.Includes);
7
7
  files(scope: Scope): readonly string[];
8
8
  }
9
9
  //# sourceMappingURL=Files.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Files.d.ts","sourceRoot":"","sources":["../../../src/factory/files/Files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,MAAM,CAAC,OAAO,OAAO,KAAK;IAEtB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBADR,IAAI,EAAE,KAAK,CAAC,KAAK,EACjB,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;IAG1C,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,MAAM,EAAE;CAc9C"}
1
+ {"version":3,"file":"Files.d.ts","sourceRoot":"","sources":["../../../src/factory/files/Files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,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;CAc9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Files.js","sourceRoot":"","sources":["../../../src/factory/files/Files.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,OAAO,KAAK;IAEL;IACA;IAFnB,YACmB,IAAiB,EACjB,QAA8B;QAD9B,SAAI,GAAJ,IAAI,CAAa;QACjB,aAAQ,GAAR,QAAQ,CAAsB;IAC9C,CAAC;IAEG,KAAK,CAAC,KAAY;QACvB,IAAI,CAAC;YACH,OAAO;gBACL,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;gBACnB,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE;aAC9B,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CACb,8BAA8B,KAAK,EAAE,EACrC,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
1
+ {"version":3,"file":"Files.js","sourceRoot":"","sources":["../../../src/factory/files/Files.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;gBACL,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;gBACnB,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE;aAC9B,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CACb,8BAA8B,KAAK,EAAE,EACrC,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
@@ -7,7 +7,7 @@ export default class Ruleset<S extends Scope> {
7
7
  overrides: Null<Rule>;
8
8
  constructor(scope: literalful<S>, ...rules: readonly Rule[]);
9
9
  get id(): literalful<S>;
10
- get records(): (readonly [string, Readonly<Record<string, import("../../boundary/input/rules/entry/object/state/level.js").default | readonly [import("../../boundary/input/rules/entry/object/state/level.js").default, ...unknown[]]>>])[];
10
+ get records(): (readonly [string, Readonly<Record<string, import("../../boundary/input/rules/preset/entry/object/state/level.js").default | readonly [import("../../boundary/input/rules/preset/entry/object/state/level.js").default, ...unknown[]]>>])[];
11
11
  override(overrides: undefined | Rule["rules"]): this;
12
12
  }
13
13
  //# sourceMappingURL=Ruleset.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Ruleset.d.ts","sourceRoot":"","sources":["../../../src/factory/ruleset/Ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,MAAM,CAAC,OAAO,OAAO,OAAO,CAAC,CAAC,SAAS,KAAK;IAKxC,OAAO,CAAC,QAAQ,CAAC,KAAK;IAJxB,SAAgB,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC;IAClC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAQ;gBAGjB,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EACrC,GAAG,KAAK,EAAE,SAAS,IAAI,EAAE;IAa3B,IAAW,EAAE,kBAYZ;IAED,IAAW,OAAO,kOAejB;IAEM,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC;CAiBrD"}
1
+ {"version":3,"file":"Ruleset.d.ts","sourceRoot":"","sources":["../../../src/factory/ruleset/Ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,MAAM,CAAC,OAAO,OAAO,OAAO,CAAC,CAAC,SAAS,KAAK;IAKxC,OAAO,CAAC,QAAQ,CAAC,KAAK;IAJxB,SAAgB,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC;IAClC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAQ;gBAGjB,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EACrC,GAAG,KAAK,EAAE,SAAS,IAAI,EAAE;IAa3B,IAAW,EAAE,kBAYZ;IAED,IAAW,OAAO,gPAejB;IAEM,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC;CAiBrD"}
@@ -1,7 +1,7 @@
1
1
  import type { Input } from "../../../boundary/boundary.js";
2
2
  export default class {
3
3
  readonly id: string;
4
- readonly rules: Input.Rules.Entry.Object;
5
- constructor(id: string, rules: Input.Rules.Entry.Object);
4
+ readonly rules: Input.Rules.Preset.Entry.Object;
5
+ constructor(id: string, rules: Input.Rules.Preset.Entry.Object);
6
6
  }
7
7
  //# sourceMappingURL=Rule.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Rule.d.ts","sourceRoot":"","sources":["../../../../src/factory/ruleset/rule/Rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,OAAO;aAEM,EAAE,EAAE,MAAM;aACV,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM;gBAD/B,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM;CAElD"}
1
+ {"version":3,"file":"Rule.d.ts","sourceRoot":"","sources":["../../../../src/factory/ruleset/rule/Rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,OAAO;aAEM,EAAE,EAAE,MAAM;aACV,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM;gBADtC,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM;CAEzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../../src/factory/ruleset/rule/Rule.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO;IAEM;IACA;IAFlB,YACkB,EAAU,EACV,KAA+B;QAD/B,OAAE,GAAF,EAAE,CAAQ;QACV,UAAK,GAAL,KAAK,CAA0B;IAC9C,CAAC;CACL"}
1
+ {"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../../src/factory/ruleset/rule/Rule.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO;IAEM;IACA;IAFlB,YACkB,EAAU,EACV,KAAsC;QADtC,OAAE,GAAF,EAAE,CAAQ;QACV,UAAK,GAAL,KAAK,CAAiC;IACrD,CAAC;CACL"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,10 @@
1
- import { type Scope } from "./scopes/Scopes.js";
2
1
  import type * as Boundary from "./boundary/boundary.js";
3
- export type { Scope, Boundary, };
4
- export default function (plugins: Boundary.Input.Plugins, parsers: Boundary.Input.Parsers, base: Boundary.Input.Files, includes: Partial<Boundary.Input.Files>, rules: Boundary.Input.Rules, overrides: Boundary.Input.Overrides): Boundary.Output[];
2
+ export type { Boundary };
3
+ export default function (plugins: Boundary.Input.Plugins, parsers: Boundary.Input.Parsers, files: {
4
+ base: Boundary.Input.Files.Base;
5
+ includes: Boundary.Input.Files.Includes;
6
+ }, rules: {
7
+ preset: Boundary.Input.Rules.Preset;
8
+ overrides: Boundary.Input.Rules.Overrides;
9
+ }): Boundary.Output[];
5
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAe,EAAE,KAAK,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AAQxD,YAAY,EACV,KAAK,EACL,QAAQ,GACT,CAAC;AACF,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,EAC/B,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,EAC/B,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,EAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EACvC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,EAC3B,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,SAAS,GAClC,QAAQ,CAAC,MAAM,EAAE,CAqInB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AASxD,YAAY,EAAE,QAAQ,EAAE,CAAC;AACzB,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,EAC/B,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,EAC/B,KAAK,EAAE;IACL,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;IAChC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;CACzC,EACD,KAAK,EAAE;IACL,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;IACpC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC;CAC3C,GACA,QAAQ,CAAC,MAAM,EAAE,CAqInB"}
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import scopes, {} from "./scopes/Scopes.js";
2
2
  import { Options, Files, Ruleset, Rule, } from "./factory/factory.js";
3
- export default function (plugins, parsers, base, includes, rules, overrides) {
3
+ export default function (plugins, parsers, files, rules) {
4
4
  try {
5
- const files = new Files(base, includes), rulesets = {
6
- js: new Ruleset("js", ...rules.js.map(args => new Rule(...args))),
7
- ts: new Ruleset("ts", ...rules.ts.map(args => new Rule(...args))),
8
- svelte: new Ruleset("svelte", ...rules.svelte.map(args => new Rule(...args))),
9
- html: new Ruleset("html", ...rules.html.map(args => new Rule(...args))),
10
- json: new Ruleset("json", ...rules.json.map(args => new Rule(...args))),
11
- jsonc: new Ruleset("jsonc", ...rules.jsonc.map(args => new Rule(...args))),
12
- yml: new Ruleset("yml", ...rules.yml.map(args => new Rule(...args))),
5
+ const f = new Files(files.base, files.includes), rulesets = {
6
+ js: new Ruleset("js", ...rules.preset.js.map(args => new Rule(...args))),
7
+ ts: new Ruleset("ts", ...rules.preset.ts.map(args => new Rule(...args))),
8
+ svelte: new Ruleset("svelte", ...rules.preset.svelte.map(args => new Rule(...args))),
9
+ html: new Ruleset("html", ...rules.preset.html.map(args => new Rule(...args))),
10
+ json: new Ruleset("json", ...rules.preset.json.map(args => new Rule(...args))),
11
+ jsonc: new Ruleset("jsonc", ...rules.preset.jsonc.map(args => new Rule(...args))),
12
+ yml: new Ruleset("yml", ...rules.preset.yml.map(args => new Rule(...args))),
13
13
  }, scopedParsers = {
14
14
  js: [],
15
15
  ts: [parsers.ts],
@@ -20,37 +20,37 @@ export default function (plugins, parsers, base, includes, rules, overrides) {
20
20
  yml: [parsers.yml],
21
21
  };
22
22
  for (const scope of scopes)
23
- rulesets[scope].override(overrides[scope]);
23
+ rulesets[scope].override(rules.overrides[scope]);
24
24
  const options = {
25
25
  js: new Options
26
- .js(files.files("js"), rulesets.js, {
26
+ .js(f.files("js"), rulesets.js, {
27
27
  "@stylistic": plugins["@stylistic"],
28
28
  }, scopedParsers.js)
29
29
  .configs,
30
30
  ts: new Options
31
- .ts(files.files("ts"), rulesets.ts, {
31
+ .ts(f.files("ts"), rulesets.ts, {
32
32
  "@stylistic": plugins["@stylistic"],
33
33
  "@typescript-eslint": plugins["@typescript-eslint"],
34
34
  }, scopedParsers.ts)
35
35
  .configs,
36
36
  svelte: new Options
37
- .svelte(files.files("svelte"), rulesets.svelte, {
37
+ .svelte(f.files("svelte"), rulesets.svelte, {
38
38
  "@stylistic": plugins["@stylistic"],
39
39
  "@typescript-eslint": plugins["@typescript-eslint"],
40
40
  svelte: plugins.svelte,
41
41
  }, scopedParsers.svelte)
42
42
  .configs,
43
43
  html: new Options
44
- .html(files.files("html"), rulesets.html, { "@html-eslint": plugins["@html-eslint"] }, scopedParsers.html)
44
+ .html(f.files("html"), rulesets.html, { "@html-eslint": plugins["@html-eslint"] }, scopedParsers.html)
45
45
  .configs,
46
46
  json: new Options
47
- .json(files.files("json"), rulesets.json, { jsonc: plugins.jsonc }, scopedParsers.json)
47
+ .json(f.files("json"), rulesets.json, { jsonc: plugins.jsonc }, scopedParsers.json)
48
48
  .configs,
49
49
  jsonc: new Options
50
- .jsonc(files.files("jsonc"), rulesets.jsonc, { jsonc: plugins.jsonc }, scopedParsers.jsonc)
50
+ .jsonc(f.files("jsonc"), rulesets.jsonc, { jsonc: plugins.jsonc }, scopedParsers.jsonc)
51
51
  .configs,
52
52
  yml: new Options
53
- .yml(files.files("yml"), rulesets.yml, { yml: plugins.yml }, scopedParsers.yml)
53
+ .yml(f.files("yml"), rulesets.yml, { yml: plugins.yml }, scopedParsers.yml)
54
54
  .configs,
55
55
  };
56
56
  return scopes
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,oBAAoB,CAAC;AAExD,OAAO,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,GACL,MAAM,sBAAsB,CAAC;AAM9B,MAAM,CAAC,OAAO,WACZ,OAA+B,EAC/B,OAA+B,EAC/B,IAA0B,EAC1B,QAAuC,EACvC,KAA2B,EAC3B,SAAmC;IAEnC,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,KAAK,CACrB,IAAI,EACJ,QAAQ,CACT,EACD,QAAQ,GAAG;YACT,EAAE,EAAE,IAAI,OAAO,CACb,IAAI,EACJ,GAAG,KAAK,CAAC,EAAE,CAA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4
- "version": "2.0.0-rc.1",
4
+ "version": "2.0.0-rc.2",
5
5
  "description": "Core ESLint flat config factory npm package `linted`.",
6
6
  "keywords": [],
7
7
  "license": "MIT",
@@ -0,0 +1,9 @@
1
+ import type { Scope } from "../../../../scopes/Scopes.js";
2
+ import type * as Base from "./list/list.js";
3
+
4
+ type Base = Readonly<Record<Scope, Base.List>>;
5
+
6
+ export type {
7
+ Base as default,
8
+ Base,
9
+ };
@@ -1,9 +1,7 @@
1
- import type { Scope } from "../../../scopes/Scopes.js";
2
- import type * as Files from "./list/list.js";
3
-
4
- type Files = Readonly<Record<Scope, Files.List>>;
1
+ import type Base from "./base/base.js";
2
+ import type Includes from "./includes/includes.js";
5
3
 
6
4
  export type {
7
- Files as default,
8
- Files,
5
+ Base,
6
+ Includes,
9
7
  };
@@ -0,0 +1,8 @@
1
+ import type * as Includes from "../base/base.ts";
2
+
3
+ type Includes = Partial<Includes.Base>;
4
+
5
+ export type {
6
+ Includes as default,
7
+ Includes,
8
+ };
@@ -1,13 +1,9 @@
1
1
  import type Plugins from "./plugins/plugins.js";
2
2
  import type Parsers from "./parsers/parsers.js";
3
- import type Files from "./files/files.js";
4
- import type Rules from "./rules/rules.js";
5
- import type Overrides from "./overrides/overrides.js";
6
3
 
7
4
  export type {
8
5
  Plugins,
9
6
  Parsers,
10
- Files,
11
- Rules,
12
- Overrides,
13
7
  };
8
+ export type * as Files from "./files/files.js";
9
+ export type * as Rules from "./rules/rules.js";
@@ -0,0 +1,9 @@
1
+ import type { Scope } from "../../../../scopes/Scopes.js";
2
+ import type * as Overrides from "../preset/preset.js";
3
+
4
+ type Overrides = Readonly<Particord<Scope, Overrides.Preset.Entry.Object>>;
5
+
6
+ export type {
7
+ Overrides as default,
8
+ Overrides,
9
+ };
@@ -0,0 +1,9 @@
1
+ import type { Scope } from "../../../../scopes/Scopes.js";
2
+ import type * as Preset from "./entry/entry.js";
3
+
4
+ type Preset = Readonly<Record<Scope, readonly Preset.Entry[]>>;
5
+
6
+ export type {
7
+ Preset as default,
8
+ Preset,
9
+ };
@@ -1,9 +1,7 @@
1
- import type { Scope } from "../../../scopes/Scopes.js";
2
- import type * as Rules from "./entry/entry.js";
3
-
4
- type Rules = Readonly<Record<Scope, readonly Rules.Entry[]>>;
1
+ import type Preset from "./preset/preset.js";
2
+ import type Overrides from "./overrides/overrides.js";
5
3
 
6
4
  export type {
7
- Rules as default,
8
- Rules,
5
+ Preset,
6
+ Overrides,
9
7
  };
@@ -2,7 +2,7 @@ import type { Rules } from "../../input/input.js";
2
2
 
3
3
  export default interface Config {
4
4
  name: `linted/scope:${string}/rule:${string}+${string}`;
5
- rules: Rules.Entry.Object;
5
+ rules: Rules.Preset.Entry.Object;
6
6
  files: readonly string[];
7
7
  linterOptions: {
8
8
  noInlineConfig: true;
@@ -3,8 +3,8 @@ import type { Input } from "../../boundary/boundary.js";
3
3
 
4
4
  export default class Files {
5
5
  constructor(
6
- private readonly base: Input.Files,
7
- private readonly includes: Partial<Input.Files>,
6
+ private readonly base: Input.Files.Base,
7
+ private readonly includes: Input.Files.Includes,
8
8
  ) {}
9
9
 
10
10
  public files(scope: Scope): readonly string[] {
@@ -3,6 +3,6 @@ import type { Input } from "../../../boundary/boundary.js";
3
3
  export default class {
4
4
  constructor(
5
5
  public readonly id: string,
6
- public readonly rules: Input.Rules.Entry.Object,
6
+ public readonly rules: Input.Rules.Preset.Entry.Object,
7
7
  ) {}
8
8
  }
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- import scopes, { type Scope } from "./scopes/Scopes.js";
2
1
  import type * as Boundary from "./boundary/boundary.js";
2
+ import scopes, { type Scope } from "./scopes/Scopes.js";
3
3
  import {
4
4
  Options,
5
5
  Files,
@@ -7,51 +7,52 @@ import {
7
7
  Rule,
8
8
  } from "./factory/factory.js";
9
9
 
10
- export type {
11
- Scope,
12
- Boundary,
13
- };
10
+ export type { Boundary };
14
11
  export default function (
15
12
  plugins: Boundary.Input.Plugins,
16
13
  parsers: Boundary.Input.Parsers,
17
- base: Boundary.Input.Files,
18
- includes: Partial<Boundary.Input.Files>,
19
- rules: Boundary.Input.Rules,
20
- overrides: Boundary.Input.Overrides,
14
+ files: {
15
+ base: Boundary.Input.Files.Base;
16
+ includes: Boundary.Input.Files.Includes;
17
+ },
18
+ rules: {
19
+ preset: Boundary.Input.Rules.Preset;
20
+ overrides: Boundary.Input.Rules.Overrides;
21
+ },
21
22
  ): Boundary.Output[] {
22
23
  try {
23
- const files = new Files(
24
- base,
25
- includes,
24
+ const f = new Files(
25
+ files.base,
26
+ files.includes,
26
27
  ),
27
28
  rulesets = {
28
29
  js: new Ruleset(
29
30
  "js",
30
- ...rules.js.map(args => new Rule(...args)),
31
+ ...rules.preset.js.map(args => new Rule(...args)),
31
32
  ),
32
33
  ts: new Ruleset(
33
34
  "ts",
34
- ...rules.ts.map(args => new Rule(...args)),
35
+ ...rules.preset.ts.map(args => new Rule(...args)),
35
36
  ),
36
37
  svelte: new Ruleset(
37
38
  "svelte",
38
- ...rules.svelte.map(args => new Rule(...args)),
39
+ ...rules.preset.svelte.map(args => new Rule(...args)),
39
40
  ),
40
41
  html: new Ruleset(
41
42
  "html",
42
- ...rules.html.map(args => new Rule(...args)),
43
+ ...rules.preset.html.map(args => new Rule(...args)),
43
44
  ),
44
45
  json: new Ruleset(
45
46
  "json",
46
- ...rules.json.map(args => new Rule(...args)),
47
+ ...rules.preset.json.map(args => new Rule(...args)),
47
48
  ),
48
49
  jsonc: new Ruleset(
49
50
  "jsonc",
50
- ...rules.jsonc.map(args => new Rule(...args)),
51
+ ...rules.preset.jsonc.map(args => new Rule(...args)),
51
52
  ),
52
53
  yml: new Ruleset(
53
54
  "yml",
54
- ...rules.yml.map(args => new Rule(...args)),
55
+ ...rules.preset.yml.map(args => new Rule(...args)),
55
56
  ),
56
57
  },
57
58
  scopedParsers: {
@@ -67,7 +68,7 @@ export default function (
67
68
  } as const;
68
69
 
69
70
  for (const scope of scopes)
70
- rulesets[scope].override(overrides[scope]);
71
+ rulesets[scope].override(rules.overrides[scope]);
71
72
 
72
73
  const options: {
73
74
  [S in Scope]: InstanceType<
@@ -76,7 +77,7 @@ export default function (
76
77
  } = {
77
78
  js: new Options
78
79
  .js(
79
- files.files("js"),
80
+ f.files("js"),
80
81
  rulesets.js,
81
82
  {
82
83
  "@stylistic": plugins["@stylistic"],
@@ -86,7 +87,7 @@ export default function (
86
87
  .configs,
87
88
  ts: new Options
88
89
  .ts(
89
- files.files("ts"),
90
+ f.files("ts"),
90
91
  rulesets.ts,
91
92
  {
92
93
  "@stylistic": plugins["@stylistic"],
@@ -97,7 +98,7 @@ export default function (
97
98
  .configs,
98
99
  svelte: new Options
99
100
  .svelte(
100
- files.files("svelte"),
101
+ f.files("svelte"),
101
102
  rulesets.svelte,
102
103
  {
103
104
  "@stylistic": plugins["@stylistic"],
@@ -109,7 +110,7 @@ export default function (
109
110
  .configs,
110
111
  html: new Options
111
112
  .html(
112
- files.files("html"),
113
+ f.files("html"),
113
114
  rulesets.html,
114
115
  { "@html-eslint": plugins["@html-eslint"] },
115
116
  scopedParsers.html,
@@ -117,7 +118,7 @@ export default function (
117
118
  .configs,
118
119
  json: new Options
119
120
  .json(
120
- files.files("json"),
121
+ f.files("json"),
121
122
  rulesets.json,
122
123
  { jsonc: plugins.jsonc },
123
124
  scopedParsers.json,
@@ -125,7 +126,7 @@ export default function (
125
126
  .configs,
126
127
  jsonc: new Options
127
128
  .jsonc(
128
- files.files("jsonc"),
129
+ f.files("jsonc"),
129
130
  rulesets.jsonc,
130
131
  { jsonc: plugins.jsonc },
131
132
  scopedParsers.jsonc,
@@ -133,7 +134,7 @@ export default function (
133
134
  .configs,
134
135
  yml: new Options
135
136
  .yml(
136
- files.files("yml"),
137
+ f.files("yml"),
137
138
  rulesets.yml,
138
139
  { yml: plugins.yml },
139
140
  scopedParsers.yml,
@@ -1,9 +0,0 @@
1
- import type { Scope } from "../../../scopes/Scopes.js";
2
- import type { Rules } from "../input.js";
3
-
4
- type Overrides = Readonly<Particord<Scope, Rules.Entry.Object>>;
5
-
6
- export type {
7
- Overrides as default,
8
- Overrides,
9
- };