@eslinted/core 13.2.0 → 13.3.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/factory/factory.d.ts +62 -108
  2. package/dist/factory/factory.d.ts.map +1 -1
  3. package/dist/factory/factory.js +29 -30
  4. package/dist/factory/factory.js.map +1 -1
  5. package/dist/factory/index.d.ts +1 -2
  6. package/dist/factory/index.d.ts.map +1 -1
  7. package/dist/factory/index.js +1 -2
  8. package/dist/factory/index.js.map +1 -1
  9. package/dist/factory/settings/index.d.ts +1 -2
  10. package/dist/factory/settings/index.d.ts.map +1 -1
  11. package/dist/factory/settings/index.js +1 -1
  12. package/dist/factory/settings/index.js.map +1 -1
  13. package/dist/index.js +11 -11
  14. package/dist/index.js.map +1 -1
  15. package/dist/interface/index.d.ts +2 -2
  16. package/dist/interface/input/imports.d.ts.map +1 -0
  17. package/dist/interface/input/imports.js.map +1 -0
  18. package/dist/interface/input/index.d.ts +9 -0
  19. package/dist/interface/input/index.d.ts.map +1 -0
  20. package/dist/interface/{inputs → input}/index.js.map +1 -1
  21. package/dist/interface/{inputs/options → input/scopes}/defaults.d.ts +2 -2
  22. package/dist/interface/input/scopes/defaults.d.ts.map +1 -0
  23. package/dist/interface/input/scopes/defaults.js.map +1 -0
  24. package/dist/interface/{inputs/options/index.d.ts → input/scopes/extensions.d.ts} +1 -2
  25. package/dist/interface/input/scopes/extensions.d.ts.map +1 -0
  26. package/dist/interface/input/scopes/extensions.js +2 -0
  27. package/dist/interface/input/scopes/extensions.js.map +1 -0
  28. package/dist/interface/input/scopes/index.d.ts +3 -0
  29. package/dist/interface/input/scopes/index.d.ts.map +1 -0
  30. package/dist/interface/input/scopes/index.js.map +1 -0
  31. package/dist/interface/{outputs → output}/common/ignores.d.ts +1 -1
  32. package/dist/interface/output/common/ignores.d.ts.map +1 -0
  33. package/dist/interface/output/common/ignores.js.map +1 -0
  34. package/dist/interface/output/common/index.d.ts.map +1 -0
  35. package/dist/interface/output/common/index.js.map +1 -0
  36. package/dist/interface/{outputs → output}/common/plugins.d.ts +1 -1
  37. package/dist/interface/output/common/plugins.d.ts.map +1 -0
  38. package/dist/interface/output/common/plugins.js.map +1 -0
  39. package/dist/interface/{outputs → output}/common/settings.d.ts +1 -1
  40. package/dist/interface/output/common/settings.d.ts.map +1 -0
  41. package/dist/interface/output/common/settings.js.map +1 -0
  42. package/dist/interface/output/index.d.ts +10 -0
  43. package/dist/interface/output/index.d.ts.map +1 -0
  44. package/dist/interface/{outputs → output}/index.js.map +1 -1
  45. package/dist/interface/{outputs/scoped.d.ts → output/scope.d.ts} +3 -3
  46. package/dist/interface/output/scope.d.ts.map +1 -0
  47. package/dist/interface/output/scope.js +2 -0
  48. package/dist/interface/output/scope.js.map +1 -0
  49. package/dist/scopes/index.d.ts +1 -0
  50. package/dist/scopes/index.d.ts.map +1 -1
  51. package/dist/scopes/index.js +2 -1
  52. package/dist/scopes/index.js.map +1 -1
  53. package/dist/scopes/tree.d.ts +11 -0
  54. package/dist/scopes/tree.d.ts.map +1 -0
  55. package/dist/scopes/tree.js +11 -0
  56. package/dist/scopes/tree.js.map +1 -0
  57. package/package.json +1 -1
  58. package/src/factory/factory.ts +56 -71
  59. package/src/factory/index.ts +1 -3
  60. package/src/factory/settings/index.ts +1 -1
  61. package/src/index.ts +12 -12
  62. package/src/interface/input/index.ts +12 -0
  63. package/src/interface/{inputs/options → input/scopes}/defaults.ts +2 -2
  64. package/src/interface/{inputs/options/index.ts → input/scopes/extensions.ts} +0 -1
  65. package/src/interface/input/scopes/index.ts +2 -0
  66. package/src/interface/{outputs → output}/common/ignores.ts +1 -1
  67. package/src/interface/{outputs → output}/common/plugins.ts +1 -1
  68. package/src/interface/{outputs → output}/common/settings.ts +1 -1
  69. package/src/interface/output/index.ts +14 -0
  70. package/src/interface/{outputs/scoped.ts → output/scope.ts} +2 -2
  71. package/src/scopes/index.ts +1 -0
  72. package/src/scopes/tree.ts +10 -0
  73. package/dist/interface/input.d.ts +0 -8
  74. package/dist/interface/input.d.ts.map +0 -1
  75. package/dist/interface/input.js +0 -2
  76. package/dist/interface/input.js.map +0 -1
  77. package/dist/interface/inputs/imports.d.ts.map +0 -1
  78. package/dist/interface/inputs/imports.js.map +0 -1
  79. package/dist/interface/inputs/index.d.ts +0 -3
  80. package/dist/interface/inputs/index.d.ts.map +0 -1
  81. package/dist/interface/inputs/options/defaults.d.ts.map +0 -1
  82. package/dist/interface/inputs/options/defaults.js.map +0 -1
  83. package/dist/interface/inputs/options/index.d.ts.map +0 -1
  84. package/dist/interface/inputs/options/index.js.map +0 -1
  85. package/dist/interface/output.d.ts +0 -10
  86. package/dist/interface/output.d.ts.map +0 -1
  87. package/dist/interface/output.js +0 -2
  88. package/dist/interface/output.js.map +0 -1
  89. package/dist/interface/outputs/common/ignores.d.ts.map +0 -1
  90. package/dist/interface/outputs/common/ignores.js.map +0 -1
  91. package/dist/interface/outputs/common/index.d.ts.map +0 -1
  92. package/dist/interface/outputs/common/index.js.map +0 -1
  93. package/dist/interface/outputs/common/plugins.d.ts.map +0 -1
  94. package/dist/interface/outputs/common/plugins.js.map +0 -1
  95. package/dist/interface/outputs/common/settings.d.ts.map +0 -1
  96. package/dist/interface/outputs/common/settings.js.map +0 -1
  97. package/dist/interface/outputs/index.d.ts +0 -3
  98. package/dist/interface/outputs/index.d.ts.map +0 -1
  99. package/dist/interface/outputs/scoped.d.ts.map +0 -1
  100. package/dist/interface/outputs/scoped.js +0 -2
  101. package/dist/interface/outputs/scoped.js.map +0 -1
  102. package/src/interface/input.ts +0 -11
  103. package/src/interface/inputs/index.ts +0 -2
  104. package/src/interface/output.ts +0 -10
  105. package/src/interface/outputs/index.ts +0 -2
  106. /package/dist/interface/{inputs → input}/imports.d.ts +0 -0
  107. /package/dist/interface/{inputs → input}/imports.js +0 -0
  108. /package/dist/interface/{inputs → input}/index.js +0 -0
  109. /package/dist/interface/{inputs/options → input/scopes}/defaults.js +0 -0
  110. /package/dist/interface/{inputs/options → input/scopes}/index.js +0 -0
  111. /package/dist/interface/{outputs → output}/common/ignores.js +0 -0
  112. /package/dist/interface/{outputs → output}/common/index.d.ts +0 -0
  113. /package/dist/interface/{outputs → output}/common/index.js +0 -0
  114. /package/dist/interface/{outputs → output}/common/plugins.js +0 -0
  115. /package/dist/interface/{outputs → output}/common/settings.js +0 -0
  116. /package/dist/interface/{outputs → output}/index.js +0 -0
  117. /package/src/interface/{inputs → input}/imports.ts +0 -0
  118. /package/src/interface/{outputs → output}/common/index.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interface/output/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,MAAM,GAAG,SAAS;IAC5B,aAAa,CAAC,OAAO,CAAC;IACtB,cAAc;IACd,aAAa;IACb,GAAG,SAAS,KAAK,CAAC,MAAM,CAAC,EAAE;CAC5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interface/outputs/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interface/output/index.ts"],"names":[],"mappings":""}
@@ -1,6 +1,6 @@
1
- import type { Config } from "../index.js";
2
- export type Scoped<Scopes extends string> = {
1
+ import type { Config } from "../shared/index.js";
2
+ export type Scope<Scopes extends string> = {
3
3
  readonly name: `linted/${Scopes}:${string}`;
4
4
  readonly languageOptions: Omit<Config["languageOptions"], "sourceType" | "ecmaVersion">;
5
5
  } & Pick<Config, "files" | "ignores" | "rules" | "processor" | "language" | "settings">;
6
- //# sourceMappingURL=scoped.d.ts.map
6
+ //# sourceMappingURL=scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../../src/interface/output/scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,MAAM,KAAK,CAAC,MAAM,SAAS,MAAM,IAAI;IACzC,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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope.js","sourceRoot":"","sources":["../../../src/interface/output/scope.ts"],"names":[],"mappings":""}
@@ -1,4 +1,5 @@
1
1
  export type * from "./imports/index.js";
2
+ export * from "./tree.js";
2
3
  export type Scopes = typeof scopes[number];
3
4
  export declare const scopes: readonly [
4
5
  "js",
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,WAAW,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AAC3C,eAAO,MAAM,MAAM,0EAST,CAAC"}
@@ -1,3 +1,4 @@
1
+ export * from "./tree.js";
1
2
  export const scopes = [
2
3
  "js",
3
4
  "ts",
@@ -8,4 +9,4 @@ export const scopes = [
8
9
  "jsonc",
9
10
  "yml",
10
11
  ];
11
- //# sourceMappingURL=index.js.map
12
+ //# sourceMappingURL=index.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AAEvB,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,11 @@
1
+ export declare const tree: {
2
+ readonly js: readonly [];
3
+ readonly ts: readonly ["js"];
4
+ readonly svelte: readonly ["ts"];
5
+ readonly mocha: readonly ["ts"];
6
+ readonly html: readonly [];
7
+ readonly json: readonly [];
8
+ readonly jsonc: readonly ["json"];
9
+ readonly yml: readonly [];
10
+ };
11
+ //# sourceMappingURL=tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/scopes/tree.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;CASP,CAAC"}
@@ -0,0 +1,11 @@
1
+ export const tree = {
2
+ js: [],
3
+ ts: ["js"],
4
+ svelte: ["ts"],
5
+ mocha: ["ts"],
6
+ html: [],
7
+ json: [],
8
+ jsonc: ["json"],
9
+ yml: [],
10
+ };
11
+ //# sourceMappingURL=tree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../src/scopes/tree.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,CAAC,IAAI,CAAC;IACV,MAAM,EAAE,CAAC,IAAI,CAAC;IACd,KAAK,EAAE,CAAC,IAAI,CAAC;IACb,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,CAAC,MAAM,CAAC;IACf,GAAG,EAAE,EAAE;CACC,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.2.0",
4
+ "version": "13.3.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,89 +1,74 @@
1
- import type { Scopes, Rule, Input } from "..";
2
- import type Options from "./settings";
1
+ import type { ScopeSettings } from "./settings";
2
+ import type { Input } from "../interface/input";
3
3
 
4
4
  export class Factory {
5
- public readonly extensions: {
6
- readonly global: NonNullable<Input["extensions"]["*"]>;
7
- readonly scopes: Omit<Input["extensions"], "*">;
8
- };
5
+ public readonly common;
6
+ public readonly scopes;
9
7
 
10
8
  constructor(
11
- public readonly defaults: Input["defaults"],
12
- { "*": global = {}, ...scopes }: Input["extensions"] = {} as const,
9
+ {
10
+ settings: defaultSettings,
11
+ files: defaultFiles,
12
+ ignores: defaultIgnores,
13
+ rules: defaultRules,
14
+ }: Input["defaults"],
15
+ { "*": commonExtension = {}, ...scopeExtensions }: Input["extensions"] = {} as const,
13
16
  ) {
14
- this.extensions = { global, scopes } as const;
15
- }
16
-
17
- public get settings() {
18
17
  const {
19
- defaults: { settings },
20
- extensions: {
21
- global: {
22
- noInlineConfig = settings.noInlineConfig,
23
- reportUnusedDisableDirectives = settings.reportUnusedDisableDirectives,
24
- sourceType = settings.sourceType,
25
- ecmaVersion = settings.ecmaVersion,
26
- },
27
- },
28
- } = this;
18
+ noInlineConfig = defaultSettings.noInlineConfig,
19
+ reportUnusedDisableDirectives = defaultSettings.reportUnusedDisableDirectives,
20
+ sourceType = defaultSettings.sourceType,
21
+ ecmaVersion = defaultSettings.ecmaVersion,
22
+ ignores = [] as const,
23
+ override = false,
24
+ } = commonExtension;
29
25
 
30
- return {
31
- name: "linted/*/settings",
32
- linterOptions: { noInlineConfig, reportUnusedDisableDirectives } as const,
33
- languageOptions: { sourceType, ecmaVersion } as const,
26
+ this.common = {
27
+ settings: {
28
+ name: "linted/*/settings",
29
+ linterOptions: { noInlineConfig, reportUnusedDisableDirectives } as const,
30
+ languageOptions: { sourceType, ecmaVersion } as const,
31
+ } as const,
32
+ ignores: {
33
+ name: "linted/*/ignores",
34
+ ignores: [
35
+ ...override ? [] as const : defaultIgnores["*"],
36
+ ...ignores,
37
+ ] as const,
38
+ } as const,
39
+ } as const;
40
+ this.scopes = {
41
+ files: defaultFiles,
42
+ ignores: defaultIgnores,
43
+ rules: defaultRules,
34
44
  } as const;
35
- }
36
45
 
37
- public get ignores() {
38
- const {
39
- defaults: { ignores: { "*": defaults } },
40
- extensions: {
41
- global: {
42
- ignores = [] as const,
43
- override = false,
44
- },
45
- },
46
- } = this;
46
+ for (const s in scopeExtensions) {
47
+ const {
48
+ [s as keyof typeof scopeExtensions]: {
49
+ files: moreFiles = [],
50
+ ignores: moreIgnores = [],
51
+ rules: moreRules = null,
52
+ } = {} as const,
53
+ } = scopeExtensions;
47
54
 
48
- return {
49
- name: "linted/*/ignores",
50
- ignores: [
51
- ...override ? [] as const : defaults,
52
- ...ignores,
53
- ] as const,
54
- } as const;
55
- }
55
+ this.scopes.files[s as keyof typeof scopeExtensions].push(...moreFiles);
56
+ this.scopes.ignores[s as keyof typeof scopeExtensions].push(...moreIgnores);
56
57
 
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;
58
+ if (moreRules !== null)
59
+ this.scopes.rules[s as keyof typeof scopeExtensions].push([`${s}:override`, moreRules]);
69
60
  }
61
+ }
70
62
 
63
+ public scope<S extends keyof typeof ScopeSettings>(scope: S, settings: InstanceType<typeof ScopeSettings[S]>) {
71
64
  const {
72
- defaults: {
73
- files: { [scope]: defaultFiles },
74
- ignores: { [scope]: defaultIgnores },
75
- rules: { [scope]: defaultRules },
65
+ files: {
66
+ [scope]: files,
76
67
  },
77
- extensions: { scopes: { [scope]: scopeExtension = {} as const } },
78
- } = this,
79
- {
80
- files: extendFiles = [] as const,
81
- ignores: extendIgnores = [] as const,
82
- rules: extendRules,
83
- } = scopeExtension,
84
- files = [...defaultFiles, ...extendFiles] as const,
85
- ignores = [...defaultIgnores, ...extendIgnores] as const,
86
- ruleset = Ruleset<Scopes>(scope, defaultRules, extendRules);
68
+ ignores: { [scope]: ignores },
69
+ rules: { [scope]: rules },
70
+ } = this.scopes,
71
+ ruleset = rules.map(([id, rules]) => ({ id: `${scope}:${id}`, rules } as const));
87
72
 
88
73
  return files.length < 1
89
74
  ? [] as const
@@ -1,4 +1,2 @@
1
1
  export * from "./factory";
2
- import Options from "./settings";
3
-
4
- export { Options };
2
+ export * from "./settings";
@@ -8,7 +8,7 @@ import jsonc from "./scopes/jsonc";
8
8
  import yml from "./scopes/yml";
9
9
 
10
10
  export type * from "./setting";
11
- export default {
11
+ export const ScopeSettings = {
12
12
  js,
13
13
  ts,
14
14
  svelte,
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Input, Output } from "./interface";
2
2
  import { scopes } from "./scopes";
3
- import { Factory, Options } from "./factory";
3
+ import { Factory, ScopeSettings } from "./factory";
4
4
 
5
5
  export type * from "./interface";
6
6
  export type * from "./scopes";
@@ -11,21 +11,21 @@ export default function ({
11
11
  }: Input): Output {
12
12
  try {
13
13
  const factory = new Factory(defaults, extensions),
14
- options: { readonly [S in typeof scopes[number]]: InstanceType<typeof Options[S]> } = {
15
- js: new Options.js([] as const),
16
- ts: new Options.ts([parsers.ts] as const),
17
- svelte: new Options.svelte([parsers.svelte, parsers.ts] as const),
18
- mocha: new Options.mocha([parsers.ts] as const),
19
- html: new Options.html([parsers.html] as const),
20
- json: new Options.json([parsers.jsonc] as const),
21
- jsonc: new Options.jsonc([parsers.jsonc] as const),
22
- yml: new Options.yml([parsers.yml] as const),
14
+ options: { readonly [S in typeof scopes[number]]: InstanceType<typeof ScopeSettings[S]> } = {
15
+ js: new ScopeSettings.js([] as const),
16
+ ts: new ScopeSettings.ts([parsers.ts] as const),
17
+ svelte: new ScopeSettings.svelte([parsers.svelte, parsers.ts] as const),
18
+ mocha: new ScopeSettings.mocha([parsers.ts] as const),
19
+ html: new ScopeSettings.html([parsers.html] as const),
20
+ json: new ScopeSettings.json([parsers.jsonc] as const),
21
+ jsonc: new ScopeSettings.jsonc([parsers.jsonc] as const),
22
+ yml: new ScopeSettings.yml([parsers.yml] as const),
23
23
  } as const;
24
24
 
25
25
  return [
26
26
  { name: `linted/*/plugins`, plugins } as const,
27
- factory.settings,
28
- factory.ignores,
27
+ factory.common.settings,
28
+ factory.common.ignores,
29
29
  ...scopes.flatMap(scope => factory.scope(scope, options[scope])),
30
30
  ] as const;
31
31
  }
@@ -0,0 +1,12 @@
1
+ import type { Imports } from "./imports";
2
+ import type { Defaults, Extensions } from "./scopes";
3
+ import type { Plugins, Parsers, Scopes } from "../../scopes";
4
+
5
+ export interface Input {
6
+ readonly imports: Imports<
7
+ Plugins,
8
+ Parsers
9
+ >;
10
+ readonly defaults: Defaults<Scopes>;
11
+ readonly extensions: Extensions<Scopes>;
12
+ }
@@ -2,7 +2,7 @@ import type { Config, Rule } from "../../shared";
2
2
 
3
3
  export interface Defaults<Scopes extends string> {
4
4
  readonly settings: Config["linterOptions"] & Config["languageOptions"];
5
- readonly files: Readonly<Record<"*" | Scopes, readonly string[]>>;
5
+ readonly files: Readonly<Record<"*" | Scopes, string[]>>;
6
6
  readonly ignores: Defaults<Scopes>["files"];
7
- readonly rules: Readonly<Record<Scopes, readonly Rule.NamedBag[]>>;
7
+ readonly rules: Readonly<Record<Scopes, Rule.NamedBag[]>>;
8
8
  }
@@ -1,6 +1,5 @@
1
1
  import type { Defaults } from "./defaults";
2
2
 
3
- export type * from "./defaults";
4
3
  export type Extensions<Scopes extends string> = (
5
4
  & {
6
5
  readonly "*"?: Partial<Defaults<Scopes>["settings"]> & {
@@ -0,0 +1,2 @@
1
+ export type * from "./defaults";
2
+ export type * from "./extensions";
@@ -1,6 +1,6 @@
1
1
  import type { PartialConfig } from "../../shared";
2
2
 
3
- export type Ignores = PartialConfig<
3
+ export type CommonIgnores = PartialConfig<
4
4
  { readonly name: "linted/*/ignores" },
5
5
  "ignores"
6
6
  >;
@@ -1,6 +1,6 @@
1
1
  import type { PartialConfig } from "../../shared";
2
2
 
3
- export type Plugins<Plugins extends string> = PartialConfig<
3
+ export type CommonPlugins<Plugins extends string> = PartialConfig<
4
4
  { readonly name: `linted/*/plugins` },
5
5
  "plugins",
6
6
  Plugins
@@ -1,6 +1,6 @@
1
1
  import type { PartialConfig } from "../../shared";
2
2
 
3
- export type Settings = PartialConfig<
3
+ export type CommonSettings = PartialConfig<
4
4
  { readonly name: `linted/*/settings` },
5
5
  | "linterOptions"
6
6
  | "languageOptions"
@@ -0,0 +1,14 @@
1
+ import type {
2
+ CommonPlugins,
3
+ CommonSettings,
4
+ CommonIgnores,
5
+ } from "./common";
6
+ import type { Scope } from "./scope";
7
+ import type { Plugins, Scopes } from "../../scopes";
8
+
9
+ export type Output = readonly [
10
+ CommonPlugins<Plugins>,
11
+ CommonSettings,
12
+ CommonIgnores,
13
+ ...readonly Scope<Scopes>[],
14
+ ];
@@ -1,6 +1,6 @@
1
- import type { Config } from "..";
1
+ import type { Config } from "../shared";
2
2
 
3
- export type Scoped<Scopes extends string> = {
3
+ export type Scope<Scopes extends string> = {
4
4
  readonly name: `linted/${Scopes}:${string}`;
5
5
  readonly languageOptions: Omit<Config["languageOptions"], "sourceType" | "ecmaVersion">;
6
6
  } & Pick<Config, "files" | "ignores" | "rules" | "processor" | "language" | "settings">;
@@ -1,4 +1,5 @@
1
1
  export type * from "./imports";
2
+ export * from "./tree";
2
3
  export type Scopes = typeof scopes[number];
3
4
  export const scopes = [
4
5
  "js",
@@ -0,0 +1,10 @@
1
+ export const tree = {
2
+ js: [],
3
+ ts: ["js"],
4
+ svelte: ["ts"],
5
+ mocha: ["ts"],
6
+ html: [],
7
+ json: [],
8
+ jsonc: ["json"],
9
+ yml: [],
10
+ } as const;
@@ -1,8 +0,0 @@
1
- import type { Scopes, Plugins, Parsers } from "../scopes/index.js";
2
- import type * as Inputs from "./inputs/index.js";
3
- export interface Input {
4
- readonly imports: Inputs.Imports<Plugins, Parsers>;
5
- readonly defaults: Inputs.Defaults<Scopes>;
6
- readonly extensions: Inputs.Extensions<Scopes>;
7
- }
8
- //# sourceMappingURL=input.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/interface/input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,KAAK,KAAK,MAAM,MAAM,UAAU,CAAC;AAExC,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAC9B,OAAO,EACP,OAAO,CACR,CAAC;IACF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;CAChD"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/interface/input.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../../../src/interface/inputs/imports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,WAAW,OAAO,CACtB,OAAO,SAAS,MAAM,EACtB,OAAO,SAAS,MAAM;IAEtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAC/B,OAAO,EACP,OAAO,CACR,CAAC,CAAC;CACJ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"imports.js","sourceRoot":"","sources":["../../../src/interface/inputs/imports.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export type * from "./imports.js";
2
- export type * from "./options/index.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interface/inputs/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,WAAW,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../../src/interface/inputs/options/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,WAAW,QAAQ,CAAC,MAAM,SAAS,MAAM;IAC7C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACvE,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,GAAG,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;IAClE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;CACpE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../../src/interface/inputs/options/defaults.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/inputs/options/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,mBAAmB,YAAY,CAAC;AAChC,MAAM,MAAM,UAAU,CAAC,MAAM,SAAS,MAAM,IAAI,CAC5C;IACA,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC,GAAG;QACrD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC;KACrD,CAAC;CACH,GACC,OAAO,CAAC,MAAM,CACd,MAAM,EACN;IACE,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;IACnD,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;IACvD,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/D,CACF,CAAC,CACH,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interface/inputs/options/index.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- import type { Scopes, Plugins } from "../scopes/index.js";
2
- import type * as Configs from "./outputs/index.js";
3
- export type { Configs };
4
- export type Output = readonly [
5
- Configs.Common.Plugins<Plugins>,
6
- Configs.Common.Settings,
7
- Configs.Common.Ignores,
8
- ...readonly Configs.Scoped<Scopes>[]
9
- ];
10
- //# sourceMappingURL=output.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/interface/output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,KAAK,OAAO,MAAM,WAAW,CAAC;AAE1C,YAAY,EAAE,OAAO,EAAE,CAAC;AACxB,MAAM,MAAM,MAAM,GAAG,SAAS;IAC5B,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;IAC/B,OAAO,CAAC,MAAM,CAAC,QAAQ;IACvB,OAAO,CAAC,MAAM,CAAC,OAAO;IACtB,GAAG,SAAS,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;CACrC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=output.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/interface/output.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ignores.d.ts","sourceRoot":"","sources":["../../../../src/interface/outputs/common/ignores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,OAAO,GAAG,aAAa,CACjC;IAAE,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAA;CAAE,EACrC,SAAS,CACV,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ignores.js","sourceRoot":"","sources":["../../../../src/interface/outputs/common/ignores.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/outputs/common/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,YAAY,CAAC;AAChC,mBAAmB,WAAW,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interface/outputs/common/index.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../../src/interface/outputs/common/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,OAAO,CAAC,OAAO,SAAS,MAAM,IAAI,aAAa,CACzD;IAAE,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAA;CAAE,EACrC,SAAS,EACT,OAAO,CACR,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../../src/interface/outputs/common/plugins.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/interface/outputs/common/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,QAAQ,GAAG,aAAa,CAClC;IAAE,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAA;CAAE,EACpC,eAAe,GACf,iBAAiB,CACpB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../src/interface/outputs/common/settings.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export type * as Common from "./common/index.js";
2
- export type * from "./scoped.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interface/outputs/index.ts"],"names":[],"mappings":"AAAA,YAAY,KAAK,MAAM,MAAM,UAAU,CAAC;AACxC,mBAAmB,UAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"scoped.d.ts","sourceRoot":"","sources":["../../../src/interface/outputs/scoped.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAEjC,MAAM,MAAM,MAAM,CAAC,MAAM,SAAS,MAAM,IAAI;IAC1C,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,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=scoped.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scoped.js","sourceRoot":"","sources":["../../../src/interface/outputs/scoped.ts"],"names":[],"mappings":""}
@@ -1,11 +0,0 @@
1
- import type { Scopes, Plugins, Parsers } from "../scopes";
2
- import type * as Inputs from "./inputs";
3
-
4
- export interface Input {
5
- readonly imports: Inputs.Imports<
6
- Plugins,
7
- Parsers
8
- >;
9
- readonly defaults: Inputs.Defaults<Scopes>;
10
- readonly extensions: Inputs.Extensions<Scopes>;
11
- }
@@ -1,2 +0,0 @@
1
- export type * from "./imports";
2
- export type * from "./options";
@@ -1,10 +0,0 @@
1
- import type { Scopes, Plugins } from "../scopes";
2
- import type * as Configs from "./outputs";
3
-
4
- export type { Configs };
5
- export type Output = readonly [
6
- Configs.Common.Plugins<Plugins>,
7
- Configs.Common.Settings,
8
- Configs.Common.Ignores,
9
- ...readonly Configs.Scoped<Scopes>[],
10
- ];
@@ -1,2 +0,0 @@
1
- export type * as Common from "./common";
2
- export type * from "./scoped";
File without changes
File without changes
File without changes
File without changes
File without changes