@eslinted/core 13.1.0 → 13.2.0-rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. package/dist/factory/factory.d.ts +47 -46
  2. package/dist/factory/factory.d.ts.map +1 -1
  3. package/dist/factory/factory.js.map +1 -1
  4. package/dist/factory/ruleset.d.ts +4 -4
  5. package/dist/factory/ruleset.d.ts.map +1 -1
  6. package/dist/factory/ruleset.js.map +1 -1
  7. package/dist/index.d.ts +3 -2
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +1 -1
  10. package/dist/index.js.map +1 -1
  11. package/dist/interface/index.d.ts +1 -2
  12. package/dist/interface/index.d.ts.map +1 -1
  13. package/dist/interface/input.d.ts +5 -16
  14. package/dist/interface/input.d.ts.map +1 -1
  15. package/dist/interface/inputs/imports.d.ts +6 -0
  16. package/dist/interface/inputs/imports.d.ts.map +1 -0
  17. package/dist/interface/inputs/imports.js +2 -0
  18. package/dist/interface/inputs/imports.js.map +1 -0
  19. package/dist/interface/inputs/index.d.ts +3 -0
  20. package/dist/interface/inputs/index.d.ts.map +1 -0
  21. package/dist/interface/{config → inputs}/index.js.map +1 -1
  22. package/dist/interface/inputs/options/defaults.d.ts +8 -0
  23. package/dist/interface/inputs/options/defaults.d.ts.map +1 -0
  24. package/dist/interface/inputs/options/defaults.js +2 -0
  25. package/dist/interface/inputs/options/defaults.js.map +1 -0
  26. package/dist/interface/inputs/options/index.d.ts +13 -0
  27. package/dist/interface/inputs/options/index.d.ts.map +1 -0
  28. package/dist/interface/inputs/options/index.js.map +1 -0
  29. package/dist/interface/output.d.ts +6 -6
  30. package/dist/interface/output.d.ts.map +1 -1
  31. package/dist/interface/outputs/common/ignores.d.ts +5 -0
  32. package/dist/interface/outputs/common/ignores.d.ts.map +1 -0
  33. package/dist/interface/outputs/common/ignores.js.map +1 -0
  34. package/dist/interface/{configs/globals → outputs/common}/index.d.ts +0 -1
  35. package/dist/interface/outputs/common/index.d.ts.map +1 -0
  36. package/dist/interface/outputs/common/index.js.map +1 -0
  37. package/dist/interface/outputs/common/plugins.d.ts +5 -0
  38. package/dist/interface/outputs/common/plugins.d.ts.map +1 -0
  39. package/dist/interface/outputs/common/plugins.js.map +1 -0
  40. package/dist/interface/outputs/common/settings.d.ts +5 -0
  41. package/dist/interface/outputs/common/settings.d.ts.map +1 -0
  42. package/dist/interface/outputs/common/settings.js.map +1 -0
  43. package/dist/interface/{configs → outputs}/index.d.ts +1 -1
  44. package/dist/interface/outputs/index.d.ts.map +1 -0
  45. package/dist/interface/{imports → outputs}/index.js.map +1 -1
  46. package/dist/interface/{configs → outputs}/scoped.d.ts +1 -2
  47. package/dist/interface/outputs/scoped.d.ts.map +1 -0
  48. package/dist/interface/{configs → outputs}/scoped.js.map +1 -1
  49. package/dist/interface/{config → shared/config}/index.d.ts +3 -2
  50. package/dist/interface/shared/config/index.d.ts.map +1 -0
  51. package/dist/interface/shared/config/index.js.map +1 -0
  52. package/dist/interface/shared/config/rule/index.d.ts +7 -0
  53. package/dist/interface/shared/config/rule/index.d.ts.map +1 -0
  54. package/dist/interface/shared/config/rule/index.js +2 -0
  55. package/dist/interface/shared/config/rule/index.js.map +1 -0
  56. package/dist/interface/shared/index.d.ts +2 -0
  57. package/dist/interface/shared/index.d.ts.map +1 -0
  58. package/dist/interface/shared/index.js +2 -0
  59. package/dist/interface/{configs → shared}/index.js.map +1 -1
  60. package/dist/scopes/imports/index.d.ts.map +1 -0
  61. package/dist/scopes/imports/index.js +2 -0
  62. package/dist/scopes/imports/index.js.map +1 -0
  63. package/dist/scopes/imports/parsers.d.ts.map +1 -0
  64. package/dist/scopes/imports/parsers.js.map +1 -0
  65. package/dist/scopes/imports/plugins.d.ts.map +1 -0
  66. package/dist/scopes/imports/plugins.js.map +1 -0
  67. package/dist/scopes/index.d.ts +13 -0
  68. package/dist/scopes/index.d.ts.map +1 -0
  69. package/dist/{scopes.js → scopes/index.js} +1 -1
  70. package/dist/scopes/index.js.map +1 -0
  71. package/dist/scopes/index.spec.d.ts +2 -0
  72. package/dist/scopes/index.spec.d.ts.map +1 -0
  73. package/dist/{scopes.spec.js → scopes/index.spec.js} +2 -2
  74. package/dist/scopes/index.spec.js.map +1 -0
  75. package/package.json +1 -1
  76. package/src/factory/factory.ts +7 -6
  77. package/src/factory/ruleset.ts +6 -6
  78. package/src/index.ts +4 -3
  79. package/src/interface/index.ts +1 -2
  80. package/src/interface/input.ts +12 -20
  81. package/src/interface/inputs/imports.ts +12 -0
  82. package/src/interface/inputs/index.ts +2 -0
  83. package/src/interface/inputs/options/defaults.ts +8 -0
  84. package/src/interface/inputs/options/index.ts +19 -0
  85. package/src/interface/output.ts +9 -6
  86. package/src/interface/outputs/common/ignores.ts +6 -0
  87. package/src/interface/{configs/globals → outputs/common}/index.ts +0 -1
  88. package/src/interface/outputs/common/plugins.ts +7 -0
  89. package/src/interface/outputs/common/settings.ts +7 -0
  90. package/src/interface/outputs/index.ts +2 -0
  91. package/src/interface/{configs → outputs}/scoped.ts +1 -2
  92. package/src/interface/{config → shared/config}/index.ts +18 -3
  93. package/src/interface/{config/rule.ts → shared/config/rule/index.ts} +3 -3
  94. package/src/interface/shared/index.ts +1 -0
  95. package/src/{scopes.spec.ts → scopes/index.spec.ts} +1 -1
  96. package/src/{scopes.ts → scopes/index.ts} +1 -0
  97. package/dist/interface/config/index.d.ts.map +0 -1
  98. package/dist/interface/config/rule.d.ts +0 -7
  99. package/dist/interface/config/rule.d.ts.map +0 -1
  100. package/dist/interface/config/rule.js +0 -2
  101. package/dist/interface/config/rule.js.map +0 -1
  102. package/dist/interface/configs/globals/ignores.d.ts +0 -6
  103. package/dist/interface/configs/globals/ignores.d.ts.map +0 -1
  104. package/dist/interface/configs/globals/ignores.js.map +0 -1
  105. package/dist/interface/configs/globals/index.d.ts.map +0 -1
  106. package/dist/interface/configs/globals/index.js.map +0 -1
  107. package/dist/interface/configs/globals/only/index.d.ts +0 -2
  108. package/dist/interface/configs/globals/only/index.d.ts.map +0 -1
  109. package/dist/interface/configs/globals/only/index.js.map +0 -1
  110. package/dist/interface/configs/globals/plugins.d.ts +0 -6
  111. package/dist/interface/configs/globals/plugins.d.ts.map +0 -1
  112. package/dist/interface/configs/globals/plugins.js.map +0 -1
  113. package/dist/interface/configs/globals/settings.d.ts +0 -7
  114. package/dist/interface/configs/globals/settings.d.ts.map +0 -1
  115. package/dist/interface/configs/globals/settings.js.map +0 -1
  116. package/dist/interface/configs/index.d.ts.map +0 -1
  117. package/dist/interface/configs/scoped.d.ts.map +0 -1
  118. package/dist/interface/imports/index.d.ts.map +0 -1
  119. package/dist/interface/imports/parsers.d.ts.map +0 -1
  120. package/dist/interface/imports/parsers.js.map +0 -1
  121. package/dist/interface/imports/plugins.d.ts.map +0 -1
  122. package/dist/interface/imports/plugins.js.map +0 -1
  123. package/dist/scopes.d.ts +0 -3
  124. package/dist/scopes.d.ts.map +0 -1
  125. package/dist/scopes.js.map +0 -1
  126. package/dist/scopes.spec.d.ts +0 -2
  127. package/dist/scopes.spec.d.ts.map +0 -1
  128. package/dist/scopes.spec.js.map +0 -1
  129. package/src/interface/configs/globals/ignores.ts +0 -10
  130. package/src/interface/configs/globals/only/index.ts +0 -4
  131. package/src/interface/configs/globals/plugins.ts +0 -10
  132. package/src/interface/configs/globals/settings.ts +0 -13
  133. package/src/interface/configs/index.ts +0 -2
  134. /package/dist/interface/{config → inputs}/index.js +0 -0
  135. /package/dist/interface/{configs/globals → inputs/options}/index.js +0 -0
  136. /package/dist/interface/{configs/globals → outputs/common}/ignores.js +0 -0
  137. /package/dist/interface/{configs/globals/only → outputs/common}/index.js +0 -0
  138. /package/dist/interface/{configs/globals → outputs/common}/plugins.js +0 -0
  139. /package/dist/interface/{configs/globals → outputs/common}/settings.js +0 -0
  140. /package/dist/interface/{configs → outputs}/index.js +0 -0
  141. /package/dist/interface/{configs → outputs}/scoped.js +0 -0
  142. /package/dist/interface/{imports → shared/config}/index.js +0 -0
  143. /package/dist/{interface → scopes}/imports/index.d.ts +0 -0
  144. /package/dist/{interface → scopes}/imports/parsers.d.ts +0 -0
  145. /package/dist/{interface → scopes}/imports/parsers.js +0 -0
  146. /package/dist/{interface → scopes}/imports/plugins.d.ts +0 -0
  147. /package/dist/{interface → scopes}/imports/plugins.js +0 -0
  148. /package/src/{interface → scopes}/imports/index.ts +0 -0
  149. /package/src/{interface → scopes}/imports/parsers.ts +0 -0
  150. /package/src/{interface → scopes}/imports/plugins.ts +0 -0
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/interface/shared/config/rule/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type * from "./config/index.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interface/shared/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,UAAU,CAAC"}
@@ -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.0",
5
5
  "description": "Core ESLint flat config factory npm package `linted`.",
6
6
  "keywords": [],
7
7
  "repository": "github:jimmy-zhening-luo/linted-core",
@@ -1,16 +1,17 @@
1
- import type { Scopes, Input } from "..";
1
+ import type { Scopes } from "..";
2
+ import type Core from "..";
2
3
  import { Ruleset } from "./ruleset";
3
4
  import type Options from "./settings";
4
5
 
5
6
  export class Factory {
6
7
  public readonly extensions: {
7
- readonly global: NonNullable<Input["extensions"]["*"]>;
8
- readonly scopes: Omit<Input["extensions"], "*">;
8
+ readonly global: NonNullable<Parameters<typeof Core>[0]["extensions"]["*"]>;
9
+ readonly scopes: Omit<Parameters<typeof Core>[0]["extensions"], "*">;
9
10
  };
10
11
 
11
12
  constructor(
12
- public readonly defaults: Input["defaults"],
13
- { "*": global = {}, ...scopes }: Input["extensions"] = {} as const,
13
+ public readonly defaults: Parameters<typeof Core>[0]["defaults"],
14
+ { "*": global = {}, ...scopes }: Parameters<typeof Core>[0]["extensions"] = {} as const,
14
15
  ) {
15
16
  this.extensions = { global, scopes } as const;
16
17
  }
@@ -71,7 +72,7 @@ export class Factory {
71
72
  } = scopeExtension,
72
73
  files = [...defaultFiles, ...extendFiles] as const,
73
74
  ignores = [...defaultIgnores, ...extendIgnores] as const,
74
- ruleset = new Ruleset(scope, defaultRules, extendRules);
75
+ ruleset = new Ruleset<Scopes>(scope, defaultRules, extendRules);
75
76
 
76
77
  if (ruleset.scope !== settings.scope)
77
78
  throw new TypeError(`Scope mismatch between config "${settings.scope} and inner ruleset "${ruleset.scope}"`);
@@ -1,14 +1,14 @@
1
- import type { Scopes, Rule } from "..";
1
+ import type { Rule } from "..";
2
2
 
3
- export class Ruleset {
4
- public readonly ruleset: { id: `${Scopes}:${string}`; rules: Rule.Config }[];
3
+ export class Ruleset<Scopes extends string> {
4
+ public readonly ruleset: { id: `${Scopes}:${string}`; rules: Rule.Bag }[];
5
5
 
6
6
  constructor(
7
7
  public readonly scope: Scopes,
8
- defaults: readonly Rule.Entry[],
9
- override?: Rule.Config,
8
+ defaults: readonly Rule.NamedBag[],
9
+ override?: Rule.Bag,
10
10
  ) {
11
- const map = ([id, rules]: Rule.Entry) => ({
11
+ const map = ([id, rules]: Rule.NamedBag) => ({
12
12
  id: `${scope}:${id}`,
13
13
  rules,
14
14
  } as const);
package/src/index.ts CHANGED
@@ -1,14 +1,15 @@
1
+ import type { Input, Output } from "./interface";
2
+ import type { Scopes, Plugins, Parsers } from "./scopes";
1
3
  import { scopes } from "./scopes";
2
4
  import { Factory, Options } from "./factory";
3
- import type { Input, Output } from "./interface";
4
5
 
5
- export type { Scopes } from "./scopes";
6
6
  export type * from "./interface";
7
+ export type * from "./scopes";
7
8
  export default function ({
8
9
  imports: { plugins, parsers },
9
10
  defaults,
10
11
  extensions,
11
- }: Input): Output {
12
+ }: Input<Scopes, Plugins, Parsers>): Output<Scopes, Plugins> {
12
13
  try {
13
14
  const factory = new Factory(defaults, extensions),
14
15
  options: { readonly [S in typeof scopes[number]]: InstanceType<typeof Options[S]> } = {
@@ -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,14 @@
1
- import type { Config, Rule, Imports } from ".";
2
- import type { Scopes } from "..";
1
+ import type * as Inputs from "./inputs";
3
2
 
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
- >>;
3
+ export interface Input<
4
+ Scopes extends string,
5
+ Plugins extends string,
6
+ Parsers extends string,
7
+ > {
8
+ readonly imports: Inputs.Imports<
9
+ Plugins,
10
+ Parsers
11
+ >;
12
+ readonly defaults: Inputs.Defaults<Scopes>;
13
+ readonly extensions: Inputs.Extensions<Scopes>;
22
14
  }
@@ -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,12 @@
1
- import type * as Configs from "./configs";
1
+ import type * as Configs from "./outputs";
2
2
 
3
3
  export type { Configs };
4
- export type Output = readonly [
5
- Configs.Globals.Plugins,
6
- Configs.Globals.Settings,
7
- Configs.Globals.Ignores,
8
- ...readonly Configs.Scoped[],
4
+ export type Output<
5
+ Scopes extends string,
6
+ Plugins extends string,
7
+ > = readonly [
8
+ Configs.Common.Plugins<Plugins>,
9
+ Configs.Common.Settings,
10
+ Configs.Common.Ignores,
11
+ ...readonly Configs.Scoped<Scopes>[],
9
12
  ];
@@ -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 +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,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>>>;
@@ -1,10 +0,0 @@
1
- import type { Config, Imports } from "../..";
2
- import type { Only } from "./only";
3
-
4
- export type Plugins = Only<
5
- Config,
6
- (
7
- & { readonly name: `linted/*/plugins` }
8
- & Pick<Config<Imports.Plugins>, "plugins">
9
- )
10
- >;