@eslinted/core 3.1.11 → 3.1.13-rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. package/.github/workflows/PROD.main.yml +37 -0
  2. package/.github/workflows/dev.yml +37 -0
  3. package/LICENSE +21 -21
  4. package/README.md +3 -3
  5. package/SECURITY.md +9 -9
  6. package/eslint.config.js +3 -3
  7. package/package.json +54 -54
  8. package/src/boundary/index.ts +6 -6
  9. package/src/boundary/input/files/base/index.ts +5 -5
  10. package/src/boundary/input/files/includes/index.ts +5 -5
  11. package/src/boundary/input/files/index.ts +11 -11
  12. package/src/boundary/input/index.ts +23 -23
  13. package/src/boundary/input/parsers/index.ts +5 -5
  14. package/src/boundary/input/plugins/index.ts +5 -5
  15. package/src/boundary/input/rules/index.ts +11 -11
  16. package/src/boundary/input/rules/overrides/index.ts +6 -6
  17. package/src/boundary/input/rules/preset/entry/index.ts +5 -5
  18. package/src/boundary/input/rules/preset/entry/object/index.ts +9 -9
  19. package/src/boundary/input/rules/preset/entry/object/state/index.ts +6 -6
  20. package/src/boundary/input/rules/preset/index.ts +6 -6
  21. package/src/boundary/output/config/index.ts +25 -25
  22. package/src/boundary/output/config/option/index.ts +24 -24
  23. package/src/boundary/output/config/option/language/ecma/index.ts +3 -3
  24. package/src/boundary/output/config/option/language/index.ts +23 -23
  25. package/src/boundary/output/config/option/language/source/index.ts +3 -3
  26. package/src/boundary/output/config/option/linter/index.ts +4 -4
  27. package/src/boundary/output/config/option/plugins/index.ts +3 -3
  28. package/src/boundary/output/index.ts +3 -3
  29. package/src/dependency/globals/index.ts +8 -8
  30. package/src/dependency/index.ts +5 -5
  31. package/src/dependency/parsers/index.ts +13 -13
  32. package/src/dependency/plugins/index.ts +12 -12
  33. package/src/factory/files/index.ts +15 -15
  34. package/src/factory/index.ts +8 -8
  35. package/src/factory/options/index.ts +21 -21
  36. package/src/factory/options/option/html/index.ts +18 -18
  37. package/src/factory/options/option/index.ts +93 -93
  38. package/src/factory/options/option/js/index.ts +13 -13
  39. package/src/factory/options/option/json/index.ts +18 -18
  40. package/src/factory/options/option/jsonc/index.ts +18 -18
  41. package/src/factory/options/option/md/index.ts +18 -18
  42. package/src/factory/options/option/mocha/index.ts +28 -28
  43. package/src/factory/options/option/svelte/index.ts +32 -32
  44. package/src/factory/options/option/ts/index.ts +24 -24
  45. package/src/factory/options/option/yml/index.ts +18 -18
  46. package/src/factory/rulesets/index.ts +16 -16
  47. package/src/factory/rulesets/ruleset/index.ts +40 -40
  48. package/src/factory/rulesets/ruleset/rule/index.ts +8 -8
  49. package/src/index.ts +95 -95
  50. package/src/scopes/index.ts +14 -14
  51. package/tsconfig.json +161 -161
  52. package/types/typioca/literal/number/base32.d.ts +19 -19
  53. package/types/typioca/literal/number/base64.d.ts +35 -35
  54. package/types/typioca/literal/number/binary.d.ts +4 -4
  55. package/types/typioca/literal/number/decimal.d.ts +5 -5
  56. package/types/typioca/literal/number/hex.d.ts +10 -10
  57. package/types/typioca/literal/number/octal.d.ts +7 -7
  58. package/types/typioca/literal/number/quatral.d.ts +4 -4
  59. package/types/typioca/literal/number/ternary.d.ts +4 -4
  60. package/types/typioca/literal/string/base64char.d.ts +13 -13
  61. package/types/typioca/literal/string/digit.d.ts +12 -12
  62. package/types/typioca/literal/string/hexchar.d.ts +9 -9
  63. package/types/typioca/literal/string/letter.d.ts +35 -35
  64. package/types/typioca/safe/Safe.d.ts +2 -2
  65. package/types/typioca/safe/numbers/finite/Finite.d.ts +2 -2
  66. package/types/typioca/safe/numbers/finite.d.ts +1 -1
  67. package/types/typioca/safe/numbers/fint.d.ts +1 -1
  68. package/types/typioca/safe/numbers/int/Int.d.ts +2 -2
  69. package/types/typioca/safe/numbers/int.d.ts +1 -1
  70. package/types/typioca/safe/numbers/numberful.d.ts +1 -1
  71. package/types/typioca/safe/numbers/polarity/Negative.d.ts +4 -4
  72. package/types/typioca/safe/numbers/polarity/Positive.d.ts +4 -4
  73. package/types/typioca/safe/numbers/polarity/pole/Pole.d.ts +18 -18
  74. package/types/typioca/safe/primitive.d.ts +5 -5
  75. package/types/typioca/safe/strings/char.d.ts +1 -1
  76. package/types/typioca/safe/strings/length/PropLength.d.ts +3 -3
  77. package/types/typioca/safe/strings/stringful.d.ts +1 -1
  78. package/types/typioca/utility/interface/construct/Particord.d.ts +1 -1
  79. package/types/typioca/utility/interface/construct/Property.d.ts +8 -8
  80. package/types/typioca/utility/interface/construct/Recordful.d.ts +5 -5
  81. package/types/typioca/utility/interface/construct/Table.d.ts +3 -3
  82. package/types/typioca/utility/interface/construct/properties/Field.d.ts +1 -1
  83. package/types/typioca/utility/interface/construct/properties/Flag.d.ts +1 -1
  84. package/types/typioca/utility/interface/construct/properties/Limit.d.ts +8 -8
  85. package/types/typioca/utility/interface/construct/properties/List.d.ts +1 -1
  86. package/types/typioca/utility/interface/construct/properties/Listish.d.ts +1 -1
  87. package/types/typioca/utility/interface/construct/properties/Scalar.d.ts +1 -1
  88. package/types/typioca/utility/interface/construct/tables/FieldTable.d.ts +1 -1
  89. package/types/typioca/utility/interface/construct/tables/FlagTable.d.ts +1 -1
  90. package/types/typioca/utility/interface/construct/tables/ListTable.d.ts +1 -1
  91. package/types/typioca/utility/interface/construct/tables/ListishTable.d.ts +1 -1
  92. package/types/typioca/utility/interface/construct/tables/ScalarTable.d.ts +1 -1
  93. package/types/typioca/utility/interface/identity/Interface.d.ts +80 -80
  94. package/types/typioca/utility/interface/identity/Keys.d.ts +71 -71
  95. package/types/typioca/utility/interface/transform/Unrequire.d.ts +45 -45
  96. package/types/typioca/utility/iterable/construct/ArrayN.d.ts +12 -12
  97. package/types/typioca/utility/iterable/construct/Tuple.d.ts +27 -27
  98. package/types/typioca/utility/iterable/construct/arrays/Arrays.d.ts +1 -1
  99. package/types/typioca/utility/iterable/construct/tuples/Tuples.d.ts +9 -9
  100. package/types/typioca/utility/iterable/identity/DyadType.d.ts +3 -3
  101. package/types/typioca/utility/iterable/identity/MonadType.d.ts +48 -48
  102. package/types/typioca/utility/iterable/identity/TriadType.d.ts +3 -3
  103. package/types/typioca/utility/iterable/identity/array/ArrayType.d.ts +65 -65
  104. package/types/typioca/utility/iterable/identity/array/length/ArrayLength.d.ts +16 -16
  105. package/types/typioca/utility/iterable/transform/Join.d.ts +19 -19
  106. package/types/typioca/utility/iterable/transform/Unflat.d.ts +3 -3
  107. package/types/typioca/utility/iterable/transform/stringarray/Chain.d.ts +30 -30
  108. package/types/typioca/utility/iterable/transform/stringarray/PathN.d.ts +3 -3
  109. package/types/typioca/utility/iterable/transform/stringarray/stringify/Stringify.d.ts +5 -5
  110. package/types/typioca/utility/length/Length.d.ts +35 -35
  111. package/types/typioca/utility/null/null.d.ts +1 -1
  112. package/types/typioca/utility/null/nullable.d.ts +1 -1
  113. package/types/typioca/utility/primitive/Primeval.d.ts +42 -42
  114. package/types/typioca/utility/primitive/boolean/True.d.ts +30 -30
  115. package/types/typioca/utility/primitive/number/Numbered.d.ts +35 -35
  116. package/types/typioca/utility/primitive/string/literal.d.ts +22 -22
  117. package/types/typioca/utility/primitive/string/literalful.d.ts +28 -28
@@ -1,32 +1,32 @@
1
- import Option from "../index.js";
2
- import type Ts from "../ts/index.js";
3
-
4
- export default class Svelte extends Option<
5
- "svelte",
6
- "svelte" | keyof Ts["option"]["plugins"],
7
- true,
8
- { parser: unknown } & { extraFileExtensions: readonly [".svelte"] } & Ts["option"]["languageOptions"]["parserOptions"],
9
- 2,
10
- never,
11
- { processor: "svelte/svelte" }
12
- > {
13
- public readonly scope = "svelte";
14
- public readonly processor = { processor: "svelte/svelte" } as const;
15
-
16
- public get languageOptions() {
17
- const [parser, tsParser] = this.parser;
18
-
19
- return {
20
- ecmaVersion: "latest",
21
- sourceType: "module",
22
- parser,
23
- parserOptions: {
24
- parser: tsParser,
25
- extraFileExtensions: [".svelte"] as const,
26
- project: "tsconfig.json",
27
- ecmaVersion: "latest",
28
- sourceType: "module",
29
- },
30
- } as const;
31
- }
32
- }
1
+ import Option from "../index.js";
2
+ import type Ts from "../ts/index.js";
3
+
4
+ export default class Svelte extends Option<
5
+ "svelte",
6
+ "svelte" | keyof Ts["option"]["plugins"],
7
+ true,
8
+ { parser: unknown } & { extraFileExtensions: readonly [".svelte"] } & Ts["option"]["languageOptions"]["parserOptions"],
9
+ 2,
10
+ never,
11
+ { processor: "svelte/svelte" }
12
+ > {
13
+ public readonly scope = "svelte";
14
+ public readonly processor = { processor: "svelte/svelte" } as const;
15
+
16
+ public get languageOptions() {
17
+ const [parser, tsParser] = this.parser;
18
+
19
+ return {
20
+ ecmaVersion: "latest",
21
+ sourceType: "module",
22
+ parser,
23
+ parserOptions: {
24
+ parser: tsParser,
25
+ extraFileExtensions: [".svelte"] as const,
26
+ project: "tsconfig.json",
27
+ ecmaVersion: "latest",
28
+ sourceType: "module",
29
+ },
30
+ } as const;
31
+ }
32
+ }
@@ -1,24 +1,24 @@
1
- import Option from "../index.js";
2
- import type Js from "../js/index.js";
3
-
4
- export default class Ts extends Option<
5
- "ts",
6
- "@typescript-eslint" | keyof Js["option"]["plugins"],
7
- true,
8
- { project: "tsconfig.json" } & Js["option"]["languageOptions"],
9
- 1
10
- > {
11
- public readonly scope = "ts";
12
- public readonly processor = {} as const;
13
-
14
- public get languageOptions() {
15
- const [parser] = this.parser;
16
-
17
- return {
18
- ecmaVersion: "latest",
19
- sourceType: "module",
20
- parser,
21
- parserOptions: { project: "tsconfig.json", ecmaVersion: "latest", sourceType: "module" },
22
- } as const;
23
- }
24
- }
1
+ import Option from "../index.js";
2
+ import type Js from "../js/index.js";
3
+
4
+ export default class Ts extends Option<
5
+ "ts",
6
+ "@typescript-eslint" | keyof Js["option"]["plugins"],
7
+ true,
8
+ { project: "tsconfig.json" } & Js["option"]["languageOptions"],
9
+ 1
10
+ > {
11
+ public readonly scope = "ts";
12
+ public readonly processor = {} as const;
13
+
14
+ public get languageOptions() {
15
+ const [parser] = this.parser;
16
+
17
+ return {
18
+ ecmaVersion: "latest",
19
+ sourceType: "module",
20
+ parser,
21
+ parserOptions: { project: "tsconfig.json", ecmaVersion: "latest", sourceType: "module" },
22
+ } as const;
23
+ }
24
+ }
@@ -1,18 +1,18 @@
1
- import Option from "../index.js";
2
-
3
- export default class Yml extends Option<
4
- "yml",
5
- "yml",
6
- false,
7
- true,
8
- 1
9
- > {
10
- public readonly scope = "yml";
11
- public readonly processor = {} as const;
12
-
13
- public get languageOptions() {
14
- const [parser] = this.parser;
15
-
16
- return { parser } as const;
17
- }
18
- }
1
+ import Option from "../index.js";
2
+
3
+ export default class Yml extends Option<
4
+ "yml",
5
+ "yml",
6
+ false,
7
+ true,
8
+ 1
9
+ > {
10
+ public readonly scope = "yml";
11
+ public readonly processor = {} as const;
12
+
13
+ public get languageOptions() {
14
+ const [parser] = this.parser;
15
+
16
+ return { parser } as const;
17
+ }
18
+ }
@@ -1,16 +1,16 @@
1
- import Ruleset, { Rule } from "./ruleset/index.js";
2
- import type { Input } from "../../boundary/index.js";
3
- import type { Scope } from "../../scopes/index.js";
4
-
5
- export default class {
6
- constructor(private readonly input: Input.Rules.Rules) {}
7
-
8
- public ruleset<S extends Scope>(scope: literalful<S>): Ruleset<S> {
9
- try {
10
- const { preset, overrides } = this.input;
11
-
12
- return new Ruleset<S>(scope, ...preset[scope].map(args => new Rule(...args))).override(overrides[scope]);
13
- }
14
- catch (e) { throw new Error(`linted.factory.Rulesets/ruleset/scope:${scope}`, { cause: e }); }
15
- }
16
- }
1
+ import Ruleset, { Rule } from "./ruleset/index.js";
2
+ import type { Input } from "../../boundary/index.js";
3
+ import type { Scope } from "../../scopes/index.js";
4
+
5
+ export default class {
6
+ constructor(private readonly input: Input.Rules.Rules) {}
7
+
8
+ public ruleset<S extends Scope>(scope: literalful<S>): Ruleset<S> {
9
+ try {
10
+ const { preset, overrides } = this.input;
11
+
12
+ return new Ruleset<S>(scope, ...preset[scope].map(args => new Rule(...args))).override(overrides[scope]);
13
+ }
14
+ catch (e) { throw new Error(`linted.factory.Rulesets/ruleset/scope:${scope}`, { cause: e }); }
15
+ }
16
+ }
@@ -1,40 +1,40 @@
1
- import type { Scope } from "../../../scopes/index.js";
2
- import Rule from "./rule/index.js";
3
-
4
- export { Rule };
5
- export default class Ruleset<S extends Scope> {
6
- public readonly ruleset: readonly Rule[];
7
- public overrides: Null<Rule> = null;
8
-
9
- constructor(private readonly scope: literalful<S>, ...rules: readonly Rule[]) {
10
- try {
11
- this.ruleset = [...rules];
12
- }
13
- catch (e) { throw new Error(`linted.factory.Ruleset`, { cause: e }); }
14
- }
15
-
16
- public get id() {
17
- const { scope } = this;
18
-
19
- return scope;
20
- }
21
-
22
- public get records() {
23
- try {
24
- const { ruleset, overrides } = this;
25
-
26
- return [
27
- ...ruleset.map(rules => [rules.id, rules.rules] as const),
28
- ...overrides === null ? [] : [[overrides.id, overrides.rules] as const] as const,
29
- ];
30
- }
31
- catch (e) { throw new Error(`linted.factory.Ruleset: records`, { cause: e }); }
32
- }
33
-
34
- public override(overrides: undefined | Rule["rules"]) {
35
- if (typeof overrides !== "undefined")
36
- this.overrides = new Rule("override", overrides);
37
-
38
- return this;
39
- }
40
- }
1
+ import type { Scope } from "../../../scopes/index.js";
2
+ import Rule from "./rule/index.js";
3
+
4
+ export { Rule };
5
+ export default class Ruleset<S extends Scope> {
6
+ public readonly ruleset: readonly Rule[];
7
+ public overrides: Null<Rule> = null;
8
+
9
+ constructor(private readonly scope: literalful<S>, ...rules: readonly Rule[]) {
10
+ try {
11
+ this.ruleset = [...rules];
12
+ }
13
+ catch (e) { throw new Error(`linted.factory.Ruleset`, { cause: e }); }
14
+ }
15
+
16
+ public get id() {
17
+ const { scope } = this;
18
+
19
+ return scope;
20
+ }
21
+
22
+ public get records() {
23
+ try {
24
+ const { ruleset, overrides } = this;
25
+
26
+ return [
27
+ ...ruleset.map(rules => [rules.id, rules.rules] as const),
28
+ ...overrides === null ? [] : [[overrides.id, overrides.rules] as const] as const,
29
+ ];
30
+ }
31
+ catch (e) { throw new Error(`linted.factory.Ruleset: records`, { cause: e }); }
32
+ }
33
+
34
+ public override(overrides: undefined | Rule["rules"]) {
35
+ if (typeof overrides !== "undefined")
36
+ this.overrides = new Rule("override", overrides);
37
+
38
+ return this;
39
+ }
40
+ }
@@ -1,8 +1,8 @@
1
- import type { Input } from "../../../../boundary/index.js";
2
-
3
- export default class {
4
- constructor(
5
- public readonly id: string,
6
- public readonly rules: Input.Rules.Preset.Entry.Object,
7
- ) {}
8
- }
1
+ import type { Input } from "../../../../boundary/index.js";
2
+
3
+ export default class {
4
+ constructor(
5
+ public readonly id: string,
6
+ public readonly rules: Input.Rules.Preset.Entry.Object,
7
+ ) {}
8
+ }
package/src/index.ts CHANGED
@@ -1,95 +1,95 @@
1
- import scopes, { type Scope } from "./scopes/index.js";
2
- import type * as Boundary from "./boundary/index.js";
3
- import { Options, Files, Rulesets } from "./factory/index.js";
4
-
5
- export type { Boundary };
6
- export default function (
7
- plugins: Boundary.Input.Plugins,
8
- parsers: Boundary.Input.Parsers,
9
- files: Boundary.Input.Files,
10
- rules: Boundary.Input.Rules,
11
- ): Boundary.Output[] {
12
- try {
13
- const F = new Files(files),
14
- R = new Rulesets(rules),
15
- Pa: { [S in Scope]: ConstructorParameters<typeof Options[S]>[3] } = {
16
- js: [] as const,
17
- ts: [parsers.ts] as const,
18
- svelte: [parsers.svelte, parsers.ts] as const,
19
- mocha: [parsers.ts] as const,
20
- html: [parsers.html] as const,
21
- json: [parsers.jsonc] as const,
22
- jsonc: [parsers.jsonc] as const,
23
- yml: [parsers.yml] as const,
24
- md: [parsers.md] as const,
25
- } as const,
26
- options: { [S in Scope]: InstanceType<typeof Options[S]>["configs"] } = {
27
- js: new Options
28
- .js(
29
- F.files("js"),
30
- R.ruleset("js"),
31
- { "@stylistic": plugins["@stylistic"] },
32
- Pa.js,
33
- ).configs,
34
- ts: new Options
35
- .ts(
36
- F.files("ts"),
37
- R.ruleset("ts"),
38
- { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"] },
39
- Pa.ts,
40
- ).configs,
41
- svelte: new Options
42
- .svelte(
43
- F.files("svelte"),
44
- R.ruleset("svelte"),
45
- { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"], svelte: plugins.svelte },
46
- Pa.svelte,
47
- ).configs,
48
- mocha: new Options
49
- .mocha(
50
- F.files("mocha"),
51
- R.ruleset("mocha"),
52
- { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"], mocha: plugins.mocha },
53
- Pa.mocha,
54
- ).configs,
55
- html: new Options
56
- .html(
57
- F.files("html"),
58
- R.ruleset("html"),
59
- { "@html-eslint": plugins["@html-eslint"] },
60
- Pa.html,
61
- ).configs,
62
- json: new Options
63
- .json(
64
- F.files("json"),
65
- R.ruleset("json"),
66
- { jsonc: plugins.jsonc },
67
- Pa.json,
68
- ).configs,
69
- jsonc: new Options
70
- .jsonc(
71
- F.files("jsonc"),
72
- R.ruleset("jsonc"),
73
- { jsonc: plugins.jsonc },
74
- Pa.jsonc,
75
- ).configs,
76
- yml: new Options
77
- .yml(
78
- F.files("yml"),
79
- R.ruleset("yml"),
80
- { yml: plugins.yml },
81
- Pa.yml,
82
- ).configs,
83
- md: new Options
84
- .md(
85
- F.files("md"),
86
- R.ruleset("md"),
87
- { markdownlint: plugins.markdownlint },
88
- Pa.md,
89
- ).configs,
90
- };
91
-
92
- return scopes.flatMap(scope => options[scope]);
93
- }
94
- catch (e) { throw new Error(`linted-core`, { cause: e }); }
95
- }
1
+ import scopes, { type Scope } from "./scopes/index.js";
2
+ import type * as Boundary from "./boundary/index.js";
3
+ import { Options, Files, Rulesets } from "./factory/index.js";
4
+
5
+ export type { Boundary };
6
+ export default function (
7
+ plugins: Boundary.Input.Plugins,
8
+ parsers: Boundary.Input.Parsers,
9
+ files: Boundary.Input.Files,
10
+ rules: Boundary.Input.Rules,
11
+ ): Boundary.Output[] {
12
+ try {
13
+ const F = new Files(files),
14
+ R = new Rulesets(rules),
15
+ Pa: { [S in Scope]: ConstructorParameters<typeof Options[S]>[3] } = {
16
+ js: [] as const,
17
+ ts: [parsers.ts] as const,
18
+ svelte: [parsers.svelte, parsers.ts] as const,
19
+ mocha: [parsers.ts] as const,
20
+ html: [parsers.html] as const,
21
+ json: [parsers.jsonc] as const,
22
+ jsonc: [parsers.jsonc] as const,
23
+ yml: [parsers.yml] as const,
24
+ md: [parsers.md] as const,
25
+ } as const,
26
+ options: { [S in Scope]: InstanceType<typeof Options[S]>["configs"] } = {
27
+ js: new Options
28
+ .js(
29
+ F.files("js"),
30
+ R.ruleset("js"),
31
+ { "@stylistic": plugins["@stylistic"] },
32
+ Pa.js,
33
+ ).configs,
34
+ ts: new Options
35
+ .ts(
36
+ F.files("ts"),
37
+ R.ruleset("ts"),
38
+ { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"] },
39
+ Pa.ts,
40
+ ).configs,
41
+ svelte: new Options
42
+ .svelte(
43
+ F.files("svelte"),
44
+ R.ruleset("svelte"),
45
+ { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"], svelte: plugins.svelte },
46
+ Pa.svelte,
47
+ ).configs,
48
+ mocha: new Options
49
+ .mocha(
50
+ F.files("mocha"),
51
+ R.ruleset("mocha"),
52
+ { "@stylistic": plugins["@stylistic"], "@typescript-eslint": plugins["@typescript-eslint"], mocha: plugins.mocha },
53
+ Pa.mocha,
54
+ ).configs,
55
+ html: new Options
56
+ .html(
57
+ F.files("html"),
58
+ R.ruleset("html"),
59
+ { "@html-eslint": plugins["@html-eslint"] },
60
+ Pa.html,
61
+ ).configs,
62
+ json: new Options
63
+ .json(
64
+ F.files("json"),
65
+ R.ruleset("json"),
66
+ { jsonc: plugins.jsonc },
67
+ Pa.json,
68
+ ).configs,
69
+ jsonc: new Options
70
+ .jsonc(
71
+ F.files("jsonc"),
72
+ R.ruleset("jsonc"),
73
+ { jsonc: plugins.jsonc },
74
+ Pa.jsonc,
75
+ ).configs,
76
+ yml: new Options
77
+ .yml(
78
+ F.files("yml"),
79
+ R.ruleset("yml"),
80
+ { yml: plugins.yml },
81
+ Pa.yml,
82
+ ).configs,
83
+ md: new Options
84
+ .md(
85
+ F.files("md"),
86
+ R.ruleset("md"),
87
+ { markdownlint: plugins.markdownlint },
88
+ Pa.md,
89
+ ).configs,
90
+ };
91
+
92
+ return scopes.flatMap(scope => options[scope]);
93
+ }
94
+ catch (e) { throw new Error(`linted-core`, { cause: e }); }
95
+ }
@@ -1,14 +1,14 @@
1
- const scopes = [
2
- "js",
3
- "ts",
4
- "svelte",
5
- "mocha",
6
- "html",
7
- "json",
8
- "jsonc",
9
- "yml",
10
- "md",
11
- ] as const;
12
-
13
- export default scopes;
14
- export type Scope = (typeof scopes)[number];
1
+ const scopes = [
2
+ "js",
3
+ "ts",
4
+ "svelte",
5
+ "mocha",
6
+ "html",
7
+ "json",
8
+ "jsonc",
9
+ "yml",
10
+ "md",
11
+ ] as const;
12
+
13
+ export default scopes;
14
+ export type Scope = (typeof scopes)[number];