@eslinted/core 3.1.12 → 3.1.13-rc.0

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 (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,3 +1,3 @@
1
- type Source = "module" | "script";
2
-
3
- export type { Source, Source as default };
1
+ type Source = "module" | "script";
2
+
3
+ export type { Source, Source as default };
@@ -1,4 +1,4 @@
1
- export default interface Linter {
2
- noInlineConfig: true;
3
- reportUnusedDisableDirectives: "error";
4
- }
1
+ export default interface Linter {
2
+ noInlineConfig: true;
3
+ reportUnusedDisableDirectives: "error";
4
+ }
@@ -1,3 +1,3 @@
1
- type Plugins<PluginId extends string> = Record<literalful<PluginId>, { configs: unknown }>;
2
-
3
- export type { Plugins, Plugins as default };
1
+ type Plugins<PluginId extends string> = Record<literalful<PluginId>, { configs: unknown }>;
2
+
3
+ export type { Plugins, Plugins as default };
@@ -1,3 +1,3 @@
1
- import type Config from "./config/index.js";
2
-
3
- export type { Config, Config as default };
1
+ import type Config from "./config/index.js";
2
+
3
+ export type { Config, Config as default };
@@ -1,8 +1,8 @@
1
- import type globals from "globals";
2
-
3
- type Globals =
4
- | "mocha"
5
- & keyof typeof globals
6
- ;
7
-
8
- export type { Globals as default };
1
+ import type globals from "globals";
2
+
3
+ type Globals =
4
+ | "mocha"
5
+ & keyof typeof globals
6
+ ;
7
+
8
+ export type { Globals as default };
@@ -1,5 +1,5 @@
1
- import type Plugins from "./plugins/index.js";
2
- import type Parsers from "./parsers/index.js";
3
- import type Globals from "./globals/index.js";
4
-
5
- export type { Plugins, Parsers, Globals };
1
+ import type Plugins from "./plugins/index.js";
2
+ import type Parsers from "./parsers/index.js";
3
+ import type Globals from "./globals/index.js";
4
+
5
+ export type { Plugins, Parsers, Globals };
@@ -1,13 +1,13 @@
1
- import type { Scope } from "../../scopes/index.js";
2
-
3
- type Parsers =
4
- | "ts"
5
- | "svelte"
6
- | "html"
7
- | "jsonc"
8
- | "yml"
9
- | "md"
10
- & Scope
11
- ;
12
-
13
- export type { Parsers as default };
1
+ import type { Scope } from "../../scopes/index.js";
2
+
3
+ type Parsers =
4
+ | "ts"
5
+ | "svelte"
6
+ | "html"
7
+ | "jsonc"
8
+ | "yml"
9
+ | "md"
10
+ & Scope
11
+ ;
12
+
13
+ export type { Parsers as default };
@@ -1,12 +1,12 @@
1
- type Plugins =
2
- | "@stylistic"
3
- | "@typescript-eslint"
4
- | "svelte"
5
- | "mocha"
6
- | "@html-eslint"
7
- | "jsonc"
8
- | "yml"
9
- | "markdownlint"
10
- ;
11
-
12
- export type { Plugins as default };
1
+ type Plugins =
2
+ | "@stylistic"
3
+ | "@typescript-eslint"
4
+ | "svelte"
5
+ | "mocha"
6
+ | "@html-eslint"
7
+ | "jsonc"
8
+ | "yml"
9
+ | "markdownlint"
10
+ ;
11
+
12
+ export type { Plugins as default };
@@ -1,15 +1,15 @@
1
- import type { Scope } from "../../scopes/index.js";
2
- import type { Input } from "../../boundary/index.js";
3
-
4
- export default class Files {
5
- constructor(private readonly input: Input.Files.Files) {}
6
-
7
- public files(scope: Scope): readonly string[] {
8
- try {
9
- const { base, includes } = this.input;
10
-
11
- return [...base[scope], ...includes[scope] ?? []];
12
- }
13
- catch (e) { throw new Error(`linted.factory.Files/scope:${scope}`, { cause: e }); }
14
- }
15
- }
1
+ import type { Scope } from "../../scopes/index.js";
2
+ import type { Input } from "../../boundary/index.js";
3
+
4
+ export default class Files {
5
+ constructor(private readonly input: Input.Files.Files) {}
6
+
7
+ public files(scope: Scope): readonly string[] {
8
+ try {
9
+ const { base, includes } = this.input;
10
+
11
+ return [...base[scope], ...includes[scope] ?? []];
12
+ }
13
+ catch (e) { throw new Error(`linted.factory.Files/scope:${scope}`, { cause: e }); }
14
+ }
15
+ }
@@ -1,8 +1,8 @@
1
- import Rulesets from "./rulesets/index.js";
2
- import Files from "./files/index.js";
3
- import Options from "./options/index.js";
4
-
5
- export class Factory {
6
-
7
- }
8
- export { Options, Files, Rulesets };
1
+ import Rulesets from "./rulesets/index.js";
2
+ import Files from "./files/index.js";
3
+ import Options from "./options/index.js";
4
+
5
+ export class Factory {
6
+
7
+ }
8
+ export { Options, Files, Rulesets };
@@ -1,21 +1,21 @@
1
- import js from "./option/js/index.js";
2
- import ts from "./option/ts/index.js";
3
- import svelte from "./option/svelte/index.js";
4
- import mocha from "./option/mocha/index.js";
5
- import html from "./option/html/index.js";
6
- import json from "./option/json/index.js";
7
- import jsonc from "./option/jsonc/index.js";
8
- import yml from "./option/yml/index.js";
9
- import md from "./option/md/index.js";
10
-
11
- export default {
12
- js,
13
- ts,
14
- svelte,
15
- mocha,
16
- html,
17
- json,
18
- jsonc,
19
- yml,
20
- md,
21
- } as const;
1
+ import js from "./option/js/index.js";
2
+ import ts from "./option/ts/index.js";
3
+ import svelte from "./option/svelte/index.js";
4
+ import mocha from "./option/mocha/index.js";
5
+ import html from "./option/html/index.js";
6
+ import json from "./option/json/index.js";
7
+ import jsonc from "./option/jsonc/index.js";
8
+ import yml from "./option/yml/index.js";
9
+ import md from "./option/md/index.js";
10
+
11
+ export default {
12
+ js,
13
+ ts,
14
+ svelte,
15
+ mocha,
16
+ html,
17
+ json,
18
+ jsonc,
19
+ yml,
20
+ md,
21
+ } as const;
@@ -1,18 +1,18 @@
1
- import Option from "../index.js";
2
-
3
- export default class Html extends Option<
4
- "html",
5
- "@html-eslint",
6
- false,
7
- true,
8
- 1
9
- > {
10
- public readonly scope = "html";
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 Html extends Option<
4
+ "html",
5
+ "@html-eslint",
6
+ false,
7
+ true,
8
+ 1
9
+ > {
10
+ public readonly scope = "html";
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,93 +1,93 @@
1
- import globals from "globals";
2
- import type { Scope } from "../../../scopes/index.js";
3
- import type Ruleset from "../../rulesets/ruleset/index.js";
4
- import type { Plugins } from "../../../dependency/index.js";
5
- import type { Output } from "../../../boundary/index.js";
6
-
7
- export default abstract class Option<
8
- S extends Scope,
9
- PluginId extends Plugins,
10
- IsEcma extends boolean = true,
11
- ParserOptions extends object | boolean = false,
12
- ParserCount extends 0 | 1 | 2 = 0,
13
- GlobalTypes extends keyof typeof globals = never,
14
- Processor extends object = never,
15
- > {
16
- private readonly linterOptions = { noInlineConfig: true, reportUnusedDisableDirectives: "error" } as const;
17
-
18
- public abstract readonly scope: literalful<S>;
19
- public abstract readonly processor: Interface<Processor> extends never
20
- ? object
21
- : Interface<Processor> extends Readonly<Record<"processor", string>>
22
- ? Interface<Processor>
23
- : object;
24
-
25
- constructor(
26
- public readonly files: readonly string[],
27
- public readonly ruleset: Ruleset<S>,
28
- public readonly plugins: Output.Config.Plugins<PluginId>,
29
- public readonly parser: Tuple<unknown, ParserCount>,
30
- ) {}
31
-
32
- public get configs(): Output[] {
33
- try {
34
- const {
35
- scope,
36
- ruleset,
37
- files,
38
- option,
39
- } = this;
40
-
41
- if (ruleset.id !== scope)
42
- throw new TypeError(`Option and Ruleset scope mismatch`, { cause: { option: scope, ruleset: ruleset.id } });
43
- else if (files.length < 1)
44
- return [];
45
- else {
46
- const baseName = `linted/scope:${scope}/rule:${ruleset.id}` as const;
47
-
48
- return ruleset.records.map(([ruleId, rules]) => {
49
- const name = `${baseName}+${ruleId}` as const;
50
-
51
- return {
52
- name,
53
- files,
54
- rules,
55
- ...option,
56
- };
57
- });
58
- }
59
- }
60
- catch (e) { throw new Error(`linted.factory.Option/scope:${this.scope}: configs`, { cause: e }); }
61
- }
62
-
63
- private get option() {
64
- try {
65
- const {
66
- plugins,
67
- linterOptions,
68
- languageOptions,
69
- processor,
70
- } = this;
71
-
72
- return {
73
- plugins,
74
- linterOptions,
75
- languageOptions,
76
- ...processor,
77
- } satisfies Output.Config.IOption<
78
- PluginId,
79
- IsEcma,
80
- ParserOptions,
81
- GlobalTypes,
82
- Processor
83
- >;
84
- }
85
- catch (e) { throw new Error(`linted.factory.Option/scope:${this.scope}: option`, { cause: e }); }
86
- }
87
-
88
- protected abstract get languageOptions(): Output.Config.Language<IsEcma, ParserOptions, GlobalTypes>;
89
-
90
- protected globals(type: GlobalTypes) {
91
- return globals[type];
92
- }
93
- }
1
+ import globals from "globals";
2
+ import type { Scope } from "../../../scopes/index.js";
3
+ import type Ruleset from "../../rulesets/ruleset/index.js";
4
+ import type { Plugins } from "../../../dependency/index.js";
5
+ import type { Output } from "../../../boundary/index.js";
6
+
7
+ export default abstract class Option<
8
+ S extends Scope,
9
+ PluginId extends Plugins,
10
+ IsEcma extends boolean = true,
11
+ ParserOptions extends object | boolean = false,
12
+ ParserCount extends 0 | 1 | 2 = 0,
13
+ GlobalTypes extends keyof typeof globals = never,
14
+ Processor extends object = never,
15
+ > {
16
+ private readonly linterOptions = { noInlineConfig: true, reportUnusedDisableDirectives: "error" } as const;
17
+
18
+ public abstract readonly scope: literalful<S>;
19
+ public abstract readonly processor: Interface<Processor> extends never
20
+ ? object
21
+ : Interface<Processor> extends Readonly<Record<"processor", string>>
22
+ ? Interface<Processor>
23
+ : object;
24
+
25
+ constructor(
26
+ public readonly files: readonly string[],
27
+ public readonly ruleset: Ruleset<S>,
28
+ public readonly plugins: Output.Config.Plugins<PluginId>,
29
+ public readonly parser: Tuple<unknown, ParserCount>,
30
+ ) {}
31
+
32
+ public get configs(): Output[] {
33
+ try {
34
+ const {
35
+ scope,
36
+ ruleset,
37
+ files,
38
+ option,
39
+ } = this;
40
+
41
+ if (ruleset.id !== scope)
42
+ throw new TypeError(`Option and Ruleset scope mismatch`, { cause: { option: scope, ruleset: ruleset.id } });
43
+ else if (files.length < 1)
44
+ return [];
45
+ else {
46
+ const baseName = `linted/scope:${scope}/rule:${ruleset.id}` as const;
47
+
48
+ return ruleset.records.map(([ruleId, rules]) => {
49
+ const name = `${baseName}+${ruleId}` as const;
50
+
51
+ return {
52
+ name,
53
+ files,
54
+ rules,
55
+ ...option,
56
+ };
57
+ });
58
+ }
59
+ }
60
+ catch (e) { throw new Error(`linted.factory.Option/scope:${this.scope}: configs`, { cause: e }); }
61
+ }
62
+
63
+ private get option() {
64
+ try {
65
+ const {
66
+ plugins,
67
+ linterOptions,
68
+ languageOptions,
69
+ processor,
70
+ } = this;
71
+
72
+ return {
73
+ plugins,
74
+ linterOptions,
75
+ languageOptions,
76
+ ...processor,
77
+ } satisfies Output.Config.IOption<
78
+ PluginId,
79
+ IsEcma,
80
+ ParserOptions,
81
+ GlobalTypes,
82
+ Processor
83
+ >;
84
+ }
85
+ catch (e) { throw new Error(`linted.factory.Option/scope:${this.scope}: option`, { cause: e }); }
86
+ }
87
+
88
+ protected abstract get languageOptions(): Output.Config.Language<IsEcma, ParserOptions, GlobalTypes>;
89
+
90
+ protected globals(type: GlobalTypes) {
91
+ return globals[type];
92
+ }
93
+ }
@@ -1,13 +1,13 @@
1
- import Option from "../index.js";
2
-
3
- export default class Js extends Option<"js", "@stylistic"> {
4
- public readonly scope = "js";
5
- public readonly processor = {};
6
-
7
- public get languageOptions() {
8
- return {
9
- ecmaVersion: "latest",
10
- sourceType: "module",
11
- } as const;
12
- }
13
- }
1
+ import Option from "../index.js";
2
+
3
+ export default class Js extends Option<"js", "@stylistic"> {
4
+ public readonly scope = "js";
5
+ public readonly processor = {};
6
+
7
+ public get languageOptions() {
8
+ return {
9
+ ecmaVersion: "latest",
10
+ sourceType: "module",
11
+ } as const;
12
+ }
13
+ }
@@ -1,18 +1,18 @@
1
- import Option from "../index.js";
2
-
3
- export default class Json extends Option<
4
- "json",
5
- "jsonc",
6
- false,
7
- true,
8
- 1
9
- > {
10
- public readonly scope = "json";
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 Json extends Option<
4
+ "json",
5
+ "jsonc",
6
+ false,
7
+ true,
8
+ 1
9
+ > {
10
+ public readonly scope = "json";
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,18 +1,18 @@
1
- import Option from "../index.js";
2
-
3
- export default class Jsonc extends Option<
4
- "jsonc",
5
- "jsonc",
6
- false,
7
- true,
8
- 1
9
- > {
10
- public readonly scope = "jsonc";
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 Jsonc extends Option<
4
+ "jsonc",
5
+ "jsonc",
6
+ false,
7
+ true,
8
+ 1
9
+ > {
10
+ public readonly scope = "jsonc";
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,18 +1,18 @@
1
- import Option from "../index.js";
2
-
3
- export default class Md extends Option<
4
- "md",
5
- "markdownlint",
6
- false,
7
- true,
8
- 1
9
- > {
10
- public readonly scope = "md";
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 Md extends Option<
4
+ "md",
5
+ "markdownlint",
6
+ false,
7
+ true,
8
+ 1
9
+ > {
10
+ public readonly scope = "md";
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,28 +1,28 @@
1
- import Option from "../index.js";
2
- import type Ts from "../ts/index.js";
3
-
4
- export default class Mocha extends Option<
5
- "mocha",
6
- "mocha" | keyof Ts["option"]["plugins"],
7
- true,
8
- Ts["option"]["languageOptions"]["parserOptions"],
9
- 1,
10
- "mocha"
11
- > {
12
- public readonly scope = "mocha";
13
- public readonly processor = {} as const;
14
- public readonly types = ["mocha"] as const;
15
-
16
- public get languageOptions() {
17
- const [parser] = this.parser,
18
- globals = this.globals("mocha");
19
-
20
- return {
21
- ecmaVersion: "latest",
22
- sourceType: "module",
23
- parser,
24
- parserOptions: { project: "tsconfig.json", ecmaVersion: "latest", sourceType: "module" },
25
- globals,
26
- } as const;
27
- }
28
- }
1
+ import Option from "../index.js";
2
+ import type Ts from "../ts/index.js";
3
+
4
+ export default class Mocha extends Option<
5
+ "mocha",
6
+ "mocha" | keyof Ts["option"]["plugins"],
7
+ true,
8
+ Ts["option"]["languageOptions"]["parserOptions"],
9
+ 1,
10
+ "mocha"
11
+ > {
12
+ public readonly scope = "mocha";
13
+ public readonly processor = {} as const;
14
+ public readonly types = ["mocha"] as const;
15
+
16
+ public get languageOptions() {
17
+ const [parser] = this.parser,
18
+ globals = this.globals("mocha");
19
+
20
+ return {
21
+ ecmaVersion: "latest",
22
+ sourceType: "module",
23
+ parser,
24
+ parserOptions: { project: "tsconfig.json", ecmaVersion: "latest", sourceType: "module" },
25
+ globals,
26
+ } as const;
27
+ }
28
+ }