@eslinted/core 13.1.0 → 13.2.0-rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. package/dist/factory/factory.d.ts +42 -42
  2. package/dist/factory/factory.d.ts.map +1 -1
  3. package/dist/factory/factory.js +11 -6
  4. package/dist/factory/factory.js.map +1 -1
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/interface/index.d.ts +1 -2
  10. package/dist/interface/index.d.ts.map +1 -1
  11. package/dist/interface/input.d.ts +5 -15
  12. package/dist/interface/input.d.ts.map +1 -1
  13. package/dist/interface/inputs/imports.d.ts +6 -0
  14. package/dist/interface/inputs/imports.d.ts.map +1 -0
  15. package/dist/interface/inputs/imports.js +2 -0
  16. package/dist/interface/inputs/imports.js.map +1 -0
  17. package/dist/interface/inputs/index.d.ts +3 -0
  18. package/dist/interface/inputs/index.d.ts.map +1 -0
  19. package/dist/interface/{config → inputs}/index.js.map +1 -1
  20. package/dist/interface/inputs/options/defaults.d.ts +8 -0
  21. package/dist/interface/inputs/options/defaults.d.ts.map +1 -0
  22. package/dist/interface/inputs/options/defaults.js +2 -0
  23. package/dist/interface/inputs/options/defaults.js.map +1 -0
  24. package/dist/interface/inputs/options/index.d.ts +13 -0
  25. package/dist/interface/inputs/options/index.d.ts.map +1 -0
  26. package/dist/interface/inputs/options/index.js.map +1 -0
  27. package/dist/interface/output.d.ts +6 -5
  28. package/dist/interface/output.d.ts.map +1 -1
  29. package/dist/interface/outputs/common/ignores.d.ts +5 -0
  30. package/dist/interface/outputs/common/ignores.d.ts.map +1 -0
  31. package/dist/interface/outputs/common/ignores.js.map +1 -0
  32. package/dist/interface/{configs/globals → outputs/common}/index.d.ts +0 -1
  33. package/dist/interface/outputs/common/index.d.ts.map +1 -0
  34. package/dist/interface/outputs/common/index.js.map +1 -0
  35. package/dist/interface/outputs/common/plugins.d.ts +5 -0
  36. package/dist/interface/outputs/common/plugins.d.ts.map +1 -0
  37. package/dist/interface/outputs/common/plugins.js.map +1 -0
  38. package/dist/interface/outputs/common/settings.d.ts +5 -0
  39. package/dist/interface/outputs/common/settings.d.ts.map +1 -0
  40. package/dist/interface/outputs/common/settings.js.map +1 -0
  41. package/dist/interface/{configs → outputs}/index.d.ts +1 -1
  42. package/dist/interface/outputs/index.d.ts.map +1 -0
  43. package/dist/interface/{imports → outputs}/index.js.map +1 -1
  44. package/dist/interface/{configs → outputs}/scoped.d.ts +1 -2
  45. package/dist/interface/outputs/scoped.d.ts.map +1 -0
  46. package/dist/interface/{configs → outputs}/scoped.js.map +1 -1
  47. package/dist/interface/{config → shared/config}/index.d.ts +3 -2
  48. package/dist/interface/shared/config/index.d.ts.map +1 -0
  49. package/dist/interface/shared/config/index.js.map +1 -0
  50. package/dist/interface/shared/config/rule/index.d.ts +7 -0
  51. package/dist/interface/shared/config/rule/index.d.ts.map +1 -0
  52. package/dist/interface/shared/config/rule/index.js +2 -0
  53. package/dist/interface/shared/config/rule/index.js.map +1 -0
  54. package/dist/interface/shared/index.d.ts +2 -0
  55. package/dist/interface/shared/index.d.ts.map +1 -0
  56. package/dist/interface/shared/index.js +2 -0
  57. package/dist/interface/{configs → shared}/index.js.map +1 -1
  58. package/dist/scopes/imports/index.d.ts.map +1 -0
  59. package/dist/scopes/imports/index.js +2 -0
  60. package/dist/scopes/imports/index.js.map +1 -0
  61. package/dist/scopes/imports/parsers.d.ts.map +1 -0
  62. package/dist/scopes/imports/parsers.js.map +1 -0
  63. package/dist/scopes/imports/plugins.d.ts.map +1 -0
  64. package/dist/scopes/imports/plugins.js.map +1 -0
  65. package/dist/scopes/index.d.ts +13 -0
  66. package/dist/scopes/index.d.ts.map +1 -0
  67. package/dist/{scopes.js → scopes/index.js} +1 -1
  68. package/dist/scopes/index.js.map +1 -0
  69. package/dist/scopes/index.spec.d.ts +2 -0
  70. package/dist/scopes/index.spec.d.ts.map +1 -0
  71. package/dist/{scopes.spec.js → scopes/index.spec.js} +2 -2
  72. package/dist/scopes/index.spec.js.map +1 -0
  73. package/package.json +1 -1
  74. package/src/factory/factory.ts +16 -7
  75. package/src/index.ts +2 -2
  76. package/src/interface/index.ts +1 -2
  77. package/src/interface/input.ts +8 -19
  78. package/src/interface/inputs/imports.ts +12 -0
  79. package/src/interface/inputs/index.ts +2 -0
  80. package/src/interface/inputs/options/defaults.ts +8 -0
  81. package/src/interface/inputs/options/index.ts +19 -0
  82. package/src/interface/output.ts +6 -5
  83. package/src/interface/outputs/common/ignores.ts +6 -0
  84. package/src/interface/{configs/globals → outputs/common}/index.ts +0 -1
  85. package/src/interface/outputs/common/plugins.ts +7 -0
  86. package/src/interface/outputs/common/settings.ts +7 -0
  87. package/src/interface/outputs/index.ts +2 -0
  88. package/src/interface/{configs → outputs}/scoped.ts +1 -2
  89. package/src/interface/{config → shared/config}/index.ts +18 -3
  90. package/src/interface/{config/rule.ts → shared/config/rule/index.ts} +3 -3
  91. package/src/interface/shared/index.ts +1 -0
  92. package/src/{scopes.spec.ts → scopes/index.spec.ts} +1 -1
  93. package/src/{scopes.ts → scopes/index.ts} +1 -0
  94. package/dist/factory/ruleset.d.ts +0 -10
  95. package/dist/factory/ruleset.d.ts.map +0 -1
  96. package/dist/factory/ruleset.js +0 -18
  97. package/dist/factory/ruleset.js.map +0 -1
  98. package/dist/interface/config/index.d.ts.map +0 -1
  99. package/dist/interface/config/rule.d.ts +0 -7
  100. package/dist/interface/config/rule.d.ts.map +0 -1
  101. package/dist/interface/config/rule.js +0 -2
  102. package/dist/interface/config/rule.js.map +0 -1
  103. package/dist/interface/configs/globals/ignores.d.ts +0 -6
  104. package/dist/interface/configs/globals/ignores.d.ts.map +0 -1
  105. package/dist/interface/configs/globals/ignores.js.map +0 -1
  106. package/dist/interface/configs/globals/index.d.ts.map +0 -1
  107. package/dist/interface/configs/globals/index.js.map +0 -1
  108. package/dist/interface/configs/globals/only/index.d.ts +0 -2
  109. package/dist/interface/configs/globals/only/index.d.ts.map +0 -1
  110. package/dist/interface/configs/globals/only/index.js.map +0 -1
  111. package/dist/interface/configs/globals/plugins.d.ts +0 -6
  112. package/dist/interface/configs/globals/plugins.d.ts.map +0 -1
  113. package/dist/interface/configs/globals/plugins.js.map +0 -1
  114. package/dist/interface/configs/globals/settings.d.ts +0 -7
  115. package/dist/interface/configs/globals/settings.d.ts.map +0 -1
  116. package/dist/interface/configs/globals/settings.js.map +0 -1
  117. package/dist/interface/configs/index.d.ts.map +0 -1
  118. package/dist/interface/configs/scoped.d.ts.map +0 -1
  119. package/dist/interface/imports/index.d.ts.map +0 -1
  120. package/dist/interface/imports/parsers.d.ts.map +0 -1
  121. package/dist/interface/imports/parsers.js.map +0 -1
  122. package/dist/interface/imports/plugins.d.ts.map +0 -1
  123. package/dist/interface/imports/plugins.js.map +0 -1
  124. package/dist/scopes.d.ts +0 -3
  125. package/dist/scopes.d.ts.map +0 -1
  126. package/dist/scopes.js.map +0 -1
  127. package/dist/scopes.spec.d.ts +0 -2
  128. package/dist/scopes.spec.d.ts.map +0 -1
  129. package/dist/scopes.spec.js.map +0 -1
  130. package/src/factory/ruleset.ts +0 -23
  131. package/src/interface/configs/globals/ignores.ts +0 -10
  132. package/src/interface/configs/globals/only/index.ts +0 -4
  133. package/src/interface/configs/globals/plugins.ts +0 -10
  134. package/src/interface/configs/globals/settings.ts +0 -13
  135. package/src/interface/configs/index.ts +0 -2
  136. /package/dist/interface/{config → inputs}/index.js +0 -0
  137. /package/dist/interface/{configs/globals → inputs/options}/index.js +0 -0
  138. /package/dist/interface/{configs/globals → outputs/common}/ignores.js +0 -0
  139. /package/dist/interface/{configs/globals/only → outputs/common}/index.js +0 -0
  140. /package/dist/interface/{configs/globals → outputs/common}/plugins.js +0 -0
  141. /package/dist/interface/{configs/globals → outputs/common}/settings.js +0 -0
  142. /package/dist/interface/{configs → outputs}/index.js +0 -0
  143. /package/dist/interface/{configs → outputs}/scoped.js +0 -0
  144. /package/dist/interface/{imports → shared/config}/index.js +0 -0
  145. /package/dist/{interface → scopes}/imports/index.d.ts +0 -0
  146. /package/dist/{interface → scopes}/imports/parsers.d.ts +0 -0
  147. /package/dist/{interface → scopes}/imports/parsers.js +0 -0
  148. /package/dist/{interface → scopes}/imports/plugins.d.ts +0 -0
  149. /package/dist/{interface → scopes}/imports/plugins.js +0 -0
  150. /package/src/{interface → scopes}/imports/index.ts +0 -0
  151. /package/src/{interface → scopes}/imports/parsers.ts +0 -0
  152. /package/src/{interface → scopes}/imports/plugins.ts +0 -0
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interface/configs/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interface/shared/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scopes/imports/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/scopes/imports/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../../../src/scopes/imports/parsers.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,CAClB,IAAI,GACJ,QAAQ,GACR,MAAM,GACN,OAAO,GACP,KAAK,CACR,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../../src/scopes/imports/parsers.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../src/scopes/imports/plugins.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,CAClB,YAAY,GACZ,oBAAoB,GACpB,QAAQ,GACR,OAAO,GACP,cAAc,GACd,OAAO,GACP,KAAK,CACR,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../src/scopes/imports/plugins.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ export type * from "./imports/index.js";
2
+ export type Scopes = typeof scopes[number];
3
+ export declare const scopes: readonly [
4
+ "js",
5
+ "ts",
6
+ "svelte",
7
+ "mocha",
8
+ "html",
9
+ "json",
10
+ "jsonc",
11
+ "yml"
12
+ ];
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,WAAW,CAAC;AAC/B,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AAC3C,eAAO,MAAM,MAAM,0EAST,CAAC"}
@@ -8,4 +8,4 @@ export const scopes = [
8
8
  "jsonc",
9
9
  "yml",
10
10
  ];
11
- //# sourceMappingURL=scopes.js.map
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;CACG,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../../src/scopes/index.spec.ts"],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import { expect } from "chai";
2
- import { scopes } from "./scopes.js";
2
+ import { scopes } from "./index.js";
3
3
  describe("Scopes", function () {
4
4
  describe("shape", function () {
5
5
  it("is a non-empty array", function () {
@@ -34,4 +34,4 @@ describe("Scopes", function () {
34
34
  });
35
35
  });
36
36
  });
37
- //# sourceMappingURL=scopes.spec.js.map
37
+ //# sourceMappingURL=index.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../src/scopes/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;AAE3B,QAAQ,CAAC,QAAQ,EAAE;IACjB,QAAQ,CAAC,OAAO,EAAE;QAChB,EAAE,CAAC,sBAAsB,EAAE;YACzB,MAAM,CAAC,MAAM,CAAC;iBACX,EAAE,CAAC,OAAO,CAAC;iBACX,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,OAAO,EAAE;QAChB,EAAE,CAAC,cAAc,EAAE;YACjB,MAAM,CAAC,MAAM,CAAC;iBACX,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;YACvC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;iBAC5B,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,SAAS,EAAE;YACZ,MAAM,CAAC,MAAM,CAAC;iBACX,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;YAClC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;iBACzB,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,YAAY,EAAE;YACf,MAAM,CAAC,MAAM,CAAC;iBACX,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;iBAC5B,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,aAAa,EAAE;YAChB,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;YAClD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;iBAC7B,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_schemaVersion": "22.11.0",
3
3
  "name": "@eslinted/core",
4
- "version": "13.1.0",
4
+ "version": "13.2.0-rc.1",
5
5
  "description": "Core ESLint flat config factory npm package `linted`.",
6
6
  "keywords": [],
7
7
  "repository": "github:jimmy-zhening-luo/linted-core",
@@ -1,5 +1,4 @@
1
- import type { Scopes, Input } from "..";
2
- import { Ruleset } from "./ruleset";
1
+ import type { Scopes, Rule, Input } from "..";
3
2
  import type Options from "./settings";
4
3
 
5
4
  export class Factory {
@@ -56,6 +55,19 @@ export class Factory {
56
55
  }
57
56
 
58
57
  public scope<S extends Scopes>(scope: S, settings: InstanceType<typeof Options[S]>) {
58
+ function Ruleset<Scopes extends string>(
59
+ scope: Scopes,
60
+ defaults: readonly Rule.NamedBag[],
61
+ override?: Rule.Bag,
62
+ ) {
63
+ return [
64
+ ...defaults.map(([id, rules]: Rule.NamedBag) => ({ id: `${scope}:${id}`, rules } as const)),
65
+ ...typeof override === "undefined"
66
+ ? [] as const
67
+ : [{ id: `${scope}:override`, rules: override } as const] as const,
68
+ ] as const;
69
+ }
70
+
59
71
  const {
60
72
  defaults: {
61
73
  files: { [scope]: defaultFiles },
@@ -71,14 +83,11 @@ export class Factory {
71
83
  } = scopeExtension,
72
84
  files = [...defaultFiles, ...extendFiles] as const,
73
85
  ignores = [...defaultIgnores, ...extendIgnores] as const,
74
- ruleset = new Ruleset(scope, defaultRules, extendRules);
75
-
76
- if (ruleset.scope !== settings.scope)
77
- throw new TypeError(`Scope mismatch between config "${settings.scope} and inner ruleset "${ruleset.scope}"`);
86
+ ruleset = Ruleset<Scopes>(scope, defaultRules, extendRules);
78
87
 
79
88
  return files.length < 1
80
89
  ? [] as const
81
- : ruleset.ruleset.map(({ id, rules }) => ({
90
+ : ruleset.map(({ id, rules }) => ({
82
91
  name: `linted/${id}`,
83
92
  files,
84
93
  ignores,
package/src/index.ts CHANGED
@@ -1,9 +1,9 @@
1
+ import type { Input, Output } from "./interface";
1
2
  import { scopes } from "./scopes";
2
3
  import { Factory, Options } from "./factory";
3
- import type { Input, Output } from "./interface";
4
4
 
5
- export type { Scopes } from "./scopes";
6
5
  export type * from "./interface";
6
+ export type * from "./scopes";
7
7
  export default function ({
8
8
  imports: { plugins, parsers },
9
9
  defaults,
@@ -1,4 +1,3 @@
1
- export type * as Imports from "./imports";
2
- export type * from "./config";
3
1
  export type * from "./input";
4
2
  export type * from "./output";
3
+ export type * from "./shared";
@@ -1,22 +1,11 @@
1
- import type { Config, Rule, Imports } from ".";
2
- import type { Scopes } from "..";
1
+ import type { Scopes, Plugins, Parsers } from "../scopes";
2
+ import type * as Inputs from "./inputs";
3
3
 
4
4
  export interface Input {
5
- readonly imports: {
6
- readonly plugins: Config<Imports.Plugins>["plugins"];
7
- readonly parsers: Readonly<Record<
8
- Imports.Parsers,
9
- unknown
10
- >>;
11
- };
12
- readonly defaults: {
13
- readonly settings: Config["linterOptions"] & Pick<Config["languageOptions"], "ecmaVersion" | "sourceType">;
14
- readonly files: Readonly<Record<"*" | Scopes, readonly string[]>>;
15
- readonly ignores: Input["defaults"]["files"];
16
- readonly rules: Readonly<Record<Scopes, readonly Rule.Entry[]>>;
17
- };
18
- readonly extensions: Readonly<Partial<
19
- & Record<"*", Partial<Input["defaults"]["settings"] & Pick<Config, "ignores"> & { readonly override?: boolean }>>
20
- & Record<Scopes, Partial<Pick<Config, "files" | "ignores" | "rules">>>
21
- >>;
5
+ readonly imports: Inputs.Imports<
6
+ Plugins,
7
+ Parsers
8
+ >;
9
+ readonly defaults: Inputs.Defaults<Scopes>;
10
+ readonly extensions: Inputs.Extensions<Scopes>;
22
11
  }
@@ -0,0 +1,12 @@
1
+ import type { Config } from "../shared";
2
+
3
+ export interface Imports<
4
+ Plugins extends string,
5
+ Parsers extends string,
6
+ > {
7
+ readonly plugins: Config<Plugins>["plugins"];
8
+ readonly parsers: Readonly<Record<
9
+ Parsers,
10
+ unknown
11
+ >>;
12
+ }
@@ -0,0 +1,2 @@
1
+ export type * from "./imports";
2
+ export type * from "./options";
@@ -0,0 +1,8 @@
1
+ import type { Config, Rule } from "../../shared";
2
+
3
+ export interface Defaults<Scopes extends string> {
4
+ readonly settings: Config["linterOptions"] & Config["languageOptions"];
5
+ readonly files: Readonly<Record<"*" | Scopes, readonly string[]>>;
6
+ readonly ignores: Defaults<Scopes>["files"];
7
+ readonly rules: Readonly<Record<Scopes, readonly Rule.NamedBag[]>>;
8
+ }
@@ -0,0 +1,19 @@
1
+ import type { Defaults } from "./defaults";
2
+
3
+ export type * from "./defaults";
4
+ export type Extensions<Scopes extends string> = (
5
+ & {
6
+ readonly "*"?: Partial<Defaults<Scopes>["settings"]> & {
7
+ readonly override?: boolean;
8
+ readonly ignores?: Defaults<Scopes>["ignores"]["*"];
9
+ };
10
+ }
11
+ & Partial<Record<
12
+ Scopes,
13
+ {
14
+ readonly files?: Defaults<Scopes>["files"][Scopes];
15
+ readonly ignores?: Defaults<Scopes>["ignores"][Scopes];
16
+ readonly rules?: Defaults<Scopes>["rules"][Scopes][number][1];
17
+ }
18
+ >>
19
+ );
@@ -1,9 +1,10 @@
1
- import type * as Configs from "./configs";
1
+ import type { Scopes, Plugins } from "../scopes";
2
+ import type * as Configs from "./outputs";
2
3
 
3
4
  export type { Configs };
4
5
  export type Output = readonly [
5
- Configs.Globals.Plugins,
6
- Configs.Globals.Settings,
7
- Configs.Globals.Ignores,
8
- ...readonly Configs.Scoped[],
6
+ Configs.Common.Plugins<Plugins>,
7
+ Configs.Common.Settings,
8
+ Configs.Common.Ignores,
9
+ ...readonly Configs.Scoped<Scopes>[],
9
10
  ];
@@ -0,0 +1,6 @@
1
+ import type { PartialConfig } from "../../shared";
2
+
3
+ export type Ignores = PartialConfig<
4
+ { readonly name: "linted/*/ignores" },
5
+ "ignores"
6
+ >;
@@ -1,4 +1,3 @@
1
1
  export type * from "./plugins";
2
2
  export type * from "./settings";
3
3
  export type * from "./ignores";
4
- export type * from "./only";
@@ -0,0 +1,7 @@
1
+ import type { PartialConfig } from "../../shared";
2
+
3
+ export type Plugins<Plugins extends string> = PartialConfig<
4
+ { readonly name: `linted/*/plugins` },
5
+ "plugins",
6
+ Plugins
7
+ >;
@@ -0,0 +1,7 @@
1
+ import type { PartialConfig } from "../../shared";
2
+
3
+ export type Settings = PartialConfig<
4
+ { readonly name: `linted/*/settings` },
5
+ | "linterOptions"
6
+ | "languageOptions"
7
+ >;
@@ -0,0 +1,2 @@
1
+ export type * as Common from "./common";
2
+ export type * from "./scoped";
@@ -1,7 +1,6 @@
1
1
  import type { Config } from "..";
2
- import type { Scopes } from "../..";
3
2
 
4
- export type Scoped = {
3
+ export type Scoped<Scopes extends string> = {
5
4
  readonly name: `linted/${Scopes}:${string}`;
6
5
  readonly languageOptions: Omit<Config["languageOptions"], "sourceType" | "ecmaVersion">;
7
6
  } & Pick<Config, "files" | "ignores" | "rules" | "processor" | "language" | "settings">;
@@ -3,10 +3,13 @@ import type * as Rule from "./rule";
3
3
  export type { Rule };
4
4
  export interface Config<Plugins extends string = string> {
5
5
  readonly name: `linted/${string}`;
6
- readonly plugins: Readonly<Record<Plugins, { readonly configs: unknown }>>;
6
+ readonly plugins: Readonly<Record<
7
+ Plugins,
8
+ { readonly configs: unknown }
9
+ >>;
7
10
  readonly files: readonly string[];
8
11
  readonly ignores: readonly string[];
9
- readonly rules: Rule.Config;
12
+ readonly rules: Rule.Bag;
10
13
  readonly linterOptions: {
11
14
  readonly noInlineConfig: boolean;
12
15
  readonly reportUnusedDisableDirectives:
@@ -35,8 +38,20 @@ export interface Config<Plugins extends string = string> {
35
38
  | 2023
36
39
  | 2024
37
40
  ;
38
- };
41
+ } /* common language options -- not including extra language options for each scope */;
39
42
  readonly processor?: string;
40
43
  readonly language?: string;
41
44
  readonly settings?: Readonly<Record<string, unknown>>;
42
45
  }
46
+ export type PartialConfig<
47
+ This extends object,
48
+ Picks extends Exclude<keyof Config, keyof This>,
49
+ Plugins extends string = string,
50
+ > = (
51
+ & This
52
+ & Pick<Config<Plugins>, Picks>
53
+ & Readonly<Partial<Record<
54
+ Exclude<keyof Config, Picks | keyof This>,
55
+ never
56
+ >>>
57
+ );
@@ -1,8 +1,8 @@
1
- export type Entry = readonly [
1
+ export type NamedBag = readonly [
2
2
  string,
3
- Config,
3
+ Bag,
4
4
  ];
5
- export type Config = Readonly<Record<
5
+ export type Bag = Readonly<Record<
6
6
  string,
7
7
  | State
8
8
  | readonly [State, ...readonly unknown[]]
@@ -0,0 +1 @@
1
+ export type * from "./config";
@@ -1,5 +1,5 @@
1
1
  import { expect } from "chai";
2
- import { scopes } from "./scopes";
2
+ import { scopes } from ".";
3
3
 
4
4
  describe("Scopes", function () {
5
5
  describe("shape", function () {
@@ -1,3 +1,4 @@
1
+ export type * from "./imports";
1
2
  export type Scopes = typeof scopes[number];
2
3
  export const scopes = [
3
4
  "js",
@@ -1,10 +0,0 @@
1
- import type { Scopes, Rule } from "../index.js";
2
- export declare class Ruleset {
3
- readonly scope: Scopes;
4
- readonly ruleset: {
5
- id: `${Scopes}:${string}`;
6
- rules: Rule.Config;
7
- }[];
8
- constructor(scope: Scopes, defaults: readonly Rule.Entry[], override?: Rule.Config);
9
- }
10
- //# sourceMappingURL=ruleset.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ruleset.d.ts","sourceRoot":"","sources":["../../src/factory/ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAEvC,qBAAa,OAAO;aAIA,KAAK,EAAE,MAAM;IAH/B,SAAgB,OAAO,EAAE;QAAE,EAAE,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;QAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAA;KAAE,EAAE,CAAC;gBAG3D,KAAK,EAAE,MAAM,EAC7B,QAAQ,EAAE,SAAS,IAAI,CAAC,KAAK,EAAE,EAC/B,QAAQ,CAAC,EAAE,IAAI,CAAC,MAAM;CAczB"}
@@ -1,18 +0,0 @@
1
- export class Ruleset {
2
- scope;
3
- ruleset;
4
- constructor(scope, defaults, override) {
5
- this.scope = scope;
6
- const map = ([id, rules]) => ({
7
- id: `${scope}:${id}`,
8
- rules,
9
- });
10
- this.ruleset = [
11
- ...defaults.map(rule => map(rule)),
12
- ...typeof override === "undefined"
13
- ? []
14
- : [map([`${scope}:override`, override])],
15
- ];
16
- }
17
- }
18
- //# sourceMappingURL=ruleset.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ruleset.js","sourceRoot":"","sources":["../../src/factory/ruleset.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,OAAO;IAIA;IAHF,OAAO,CAAsD;IAE7E,YACkB,KAAa,EAC7B,QAA+B,EAC/B,QAAsB;QAFN,UAAK,GAAL,KAAK,CAAQ;QAI7B,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,CAAa,EAAE,EAAE,CAAC,CAAC;YACxC,EAAE,EAAE,GAAG,KAAK,IAAI,EAAE,EAAE;YACpB,KAAK;SACI,CAAA,CAAC;QAEZ,IAAI,CAAC,OAAO,GAAG;YACb,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAClC,GAAG,OAAO,QAAQ,KAAK,WAAW;gBAChC,CAAC,CAAC,EAAW;gBACb,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAU;SAC3C,CAAC;IACb,CAAC;CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interface/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,IAAI,MAAM,QAAQ,CAAC;AAEpC,YAAY,EAAE,IAAI,EAAE,CAAC;AACrB,MAAM,WAAW,MAAM,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;IACrD,QAAQ,CAAC,IAAI,EAAE,UAAU,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;IAC3E,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE;QACtB,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;QACjC,QAAQ,CAAC,6BAA6B,EAClC,OAAO,GACP,MAAM,GACN,KAAK,CACR;KACF,CAAC;IACF,QAAQ,CAAC,eAAe,EAAE;QACxB,QAAQ,CAAC,UAAU,EACf,QAAQ,GACR,QAAQ,CACX;QACD,QAAQ,CAAC,WAAW,EAChB,QAAQ,GACR,CAAC,GACD,CAAC,GACD,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CACP;KACF,CAAC;IACF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACvD"}
@@ -1,7 +0,0 @@
1
- export type Entry = readonly [
2
- string,
3
- Config
4
- ];
5
- export type Config = Readonly<Record<string, State | readonly [State, ...readonly unknown[]]>>;
6
- export type State = ("error" | "warn" | "off");
7
- //# sourceMappingURL=rule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../../src/interface/config/rule.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG,SAAS;IAC3B,MAAM;IACN,MAAM;CACP,CAAC;AACF,MAAM,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAClC,MAAM,EACJ,KAAK,GACL,SAAS,CAAC,KAAK,EAAE,GAAG,SAAS,OAAO,EAAE,CAAC,CAC1C,CAAC,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAChB,OAAO,GACP,MAAM,GACN,KAAK,CACR,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=rule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rule.js","sourceRoot":"","sources":["../../../src/interface/config/rule.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- import type { Config } from "../../index.js";
2
- import type { Only } from "./only/index.js";
3
- export type Ignores = Only<Config, ({
4
- readonly name: `linted/*/ignores`;
5
- } & Pick<Config, "ignores">)>;
6
- //# sourceMappingURL=ignores.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ignores.d.ts","sourceRoot":"","sources":["../../../../src/interface/configs/globals/ignores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,MAAM,OAAO,GAAG,IAAI,CACxB,MAAM,EACN,CACI;IAAE,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAA;CAAE,GACrC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAC1B,CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ignores.js","sourceRoot":"","sources":["../../../../src/interface/configs/globals/ignores.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/configs/globals/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,YAAY,CAAC;AAChC,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,QAAQ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interface/configs/globals/index.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export type Only<Base extends object, This extends object> = This & Readonly<Partial<Record<Exclude<keyof Base, keyof This>, never>>>;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/interface/configs/globals/only/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,CACd,IAAI,SAAS,MAAM,EACnB,IAAI,SAAS,MAAM,IACjB,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,MAAM,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/interface/configs/globals/only/index.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- import type { Config, Imports } from "../../index.js";
2
- import type { Only } from "./only/index.js";
3
- export type Plugins = Only<Config, ({
4
- readonly name: `linted/*/plugins`;
5
- } & Pick<Config<Imports.Plugins>, "plugins">)>;
6
- //# sourceMappingURL=plugins.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../../src/interface/configs/globals/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,MAAM,OAAO,GAAG,IAAI,CACxB,MAAM,EACN,CACI;IAAE,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAA;CAAE,GACrC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAC3C,CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../../src/interface/configs/globals/plugins.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import type { Config } from "../../index.js";
2
- import type { Only } from "./only/index.js";
3
- export type Settings = Only<Config, ({
4
- readonly name: `linted/*/settings`;
5
- readonly languageOptions: Pick<Config["languageOptions"], "ecmaVersion" | "sourceType">;
6
- } & Pick<Config, "linterOptions">)>;
7
- //# sourceMappingURL=settings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/interface/configs/globals/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,MAAM,QAAQ,GAAG,IAAI,CACzB,MAAM,EACN,CACI;IACA,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC,CAAC;CACzF,GACC,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC,CAChC,CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../src/interface/configs/globals/settings.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interface/configs/index.ts"],"names":[],"mappings":"AAAA,YAAY,KAAK,OAAO,MAAM,WAAW,CAAC;AAC1C,mBAAmB,UAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"scoped.d.ts","sourceRoot":"","sources":["../../../src/interface/configs/scoped.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEpC,MAAM,MAAM,MAAM,GAAG;IACnB,QAAQ,CAAC,IAAI,EAAE,UAAU,MAAM,IAAI,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,YAAY,GAAG,aAAa,CAAC,CAAC;CACzF,GAAG,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interface/imports/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,WAAW,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../../../src/interface/imports/parsers.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,CAClB,IAAI,GACJ,QAAQ,GACR,MAAM,GACN,OAAO,GACP,KAAK,CACR,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../../src/interface/imports/parsers.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../src/interface/imports/plugins.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,CAClB,YAAY,GACZ,oBAAoB,GACpB,QAAQ,GACR,OAAO,GACP,cAAc,GACd,OAAO,GACP,KAAK,CACR,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../src/interface/imports/plugins.ts"],"names":[],"mappings":""}
package/dist/scopes.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export type Scopes = typeof scopes[number];
2
- export declare const scopes: readonly ["js", "ts", "svelte", "mocha", "html", "json", "jsonc", "yml"];
3
- //# sourceMappingURL=scopes.d.ts.map
@@ -1 +0,0 @@
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;AAC3C,eAAO,MAAM,MAAM,0EAST,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"scopes.js","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;CACG,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=scopes.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scopes.spec.d.ts","sourceRoot":"","sources":["../src/scopes.spec.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"scopes.spec.js","sourceRoot":"","sources":["../src/scopes.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAQ,CAAC,QAAQ,EAAE;IACjB,QAAQ,CAAC,OAAO,EAAE;QAChB,EAAE,CAAC,sBAAsB,EAAE;YACzB,MAAM,CAAC,MAAM,CAAC;iBACX,EAAE,CAAC,OAAO,CAAC;iBACX,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,OAAO,EAAE;QAChB,EAAE,CAAC,cAAc,EAAE;YACjB,MAAM,CAAC,MAAM,CAAC;iBACX,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;YACvC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;iBAC5B,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,SAAS,EAAE;YACZ,MAAM,CAAC,MAAM,CAAC;iBACX,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;YAClC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;iBACzB,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,YAAY,EAAE;YACf,MAAM,CAAC,MAAM,CAAC;iBACX,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;iBAC5B,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,aAAa,EAAE;YAChB,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;YAClD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;iBAC7B,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,23 +0,0 @@
1
- import type { Scopes, Rule } from "..";
2
-
3
- export class Ruleset {
4
- public readonly ruleset: { id: `${Scopes}:${string}`; rules: Rule.Config }[];
5
-
6
- constructor(
7
- public readonly scope: Scopes,
8
- defaults: readonly Rule.Entry[],
9
- override?: Rule.Config,
10
- ) {
11
- const map = ([id, rules]: Rule.Entry) => ({
12
- id: `${scope}:${id}`,
13
- rules,
14
- } as const);
15
-
16
- this.ruleset = [
17
- ...defaults.map(rule => map(rule)),
18
- ...typeof override === "undefined"
19
- ? [] as const
20
- : [map([`${scope}:override`, override])] as const,
21
- ] as const;
22
- }
23
- }
@@ -1,10 +0,0 @@
1
- import type { Config } from "../..";
2
- import type { Only } from "./only";
3
-
4
- export type Ignores = Only<
5
- Config,
6
- (
7
- & { readonly name: `linted/*/ignores` }
8
- & Pick<Config, "ignores">
9
- )
10
- >;
@@ -1,4 +0,0 @@
1
- export type Only<
2
- Base extends object,
3
- This extends object,
4
- > = This & Readonly<Partial<Record<Exclude<keyof Base, keyof This>, never>>>;