@eslinted/core 3.0.3-rc.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/boundary/index.d.ts +4 -0
- package/dist/boundary/index.d.ts.map +1 -0
- package/dist/boundary/index.js +2 -0
- package/dist/boundary/index.js.map +1 -0
- package/dist/boundary/input/files/base/index.d.ts +4 -0
- package/dist/boundary/input/files/base/index.d.ts.map +1 -0
- package/dist/boundary/input/files/base/index.js +2 -0
- package/dist/boundary/input/files/base/index.js.map +1 -0
- package/dist/boundary/input/files/includes/index.d.ts +4 -0
- package/dist/boundary/input/files/includes/index.d.ts.map +1 -0
- package/dist/boundary/input/files/includes/index.js +2 -0
- package/dist/boundary/input/files/includes/index.js.map +1 -0
- package/dist/boundary/input/files/index.d.ts +4 -0
- package/dist/boundary/input/files/index.d.ts.map +1 -0
- package/dist/boundary/input/files/index.js +2 -0
- package/dist/boundary/input/files/index.js.map +1 -0
- package/dist/boundary/input/index.d.ts +6 -0
- package/dist/boundary/input/index.d.ts.map +1 -0
- package/dist/boundary/input/index.js +2 -0
- package/dist/boundary/input/index.js.map +1 -0
- package/dist/boundary/input/parsers/{parsers.d.ts → index.d.ts} +3 -3
- package/dist/boundary/input/parsers/index.d.ts.map +1 -0
- package/dist/boundary/input/parsers/index.js +2 -0
- package/dist/boundary/input/parsers/index.js.map +1 -0
- package/dist/boundary/input/plugins/{plugins.d.ts → index.d.ts} +3 -3
- package/dist/boundary/input/plugins/index.d.ts.map +1 -0
- package/dist/boundary/input/plugins/index.js +2 -0
- package/dist/boundary/input/plugins/index.js.map +1 -0
- package/dist/boundary/input/rules/index.d.ts +4 -0
- package/dist/boundary/input/rules/index.d.ts.map +1 -0
- package/dist/boundary/input/rules/index.js +2 -0
- package/dist/boundary/input/rules/index.js.map +1 -0
- package/dist/boundary/input/rules/overrides/index.d.ts +5 -0
- package/dist/boundary/input/rules/overrides/index.d.ts.map +1 -0
- package/dist/boundary/input/rules/overrides/index.js +2 -0
- package/dist/boundary/input/rules/overrides/index.js.map +1 -0
- package/dist/boundary/input/rules/preset/entry/index.d.ts +4 -0
- package/dist/boundary/input/rules/preset/entry/index.d.ts.map +1 -0
- package/dist/boundary/input/rules/preset/entry/index.js +2 -0
- package/dist/boundary/input/rules/preset/entry/index.js.map +1 -0
- package/dist/boundary/input/rules/preset/entry/object/index.d.ts +4 -0
- package/dist/boundary/input/rules/preset/entry/object/index.d.ts.map +1 -0
- package/dist/boundary/input/rules/preset/entry/object/index.js +2 -0
- package/dist/boundary/input/rules/preset/entry/object/index.js.map +1 -0
- package/dist/boundary/input/rules/preset/entry/object/state/index.d.ts +3 -0
- package/dist/boundary/input/rules/preset/entry/object/state/index.d.ts.map +1 -0
- package/dist/boundary/input/rules/preset/entry/object/state/index.js +2 -0
- package/dist/boundary/input/rules/preset/entry/object/state/index.js.map +1 -0
- package/dist/boundary/input/rules/preset/index.d.ts +5 -0
- package/dist/boundary/input/rules/preset/index.d.ts.map +1 -0
- package/dist/boundary/input/rules/preset/index.js +2 -0
- package/dist/boundary/input/rules/preset/index.js.map +1 -0
- package/dist/boundary/output/config/{config.d.ts → index.d.ts} +2 -2
- package/dist/boundary/output/config/index.d.ts.map +1 -0
- package/dist/boundary/output/config/index.js +2 -0
- package/dist/boundary/output/config/index.js.map +1 -0
- package/dist/boundary/output/index.d.ts +3 -0
- package/dist/boundary/output/index.d.ts.map +1 -0
- package/dist/boundary/output/index.js +2 -0
- package/dist/boundary/output/index.js.map +1 -0
- package/dist/dependency/{dependency.d.ts → index.d.ts} +2 -2
- package/dist/dependency/index.d.ts.map +1 -0
- package/dist/dependency/index.js +2 -0
- package/dist/dependency/index.js.map +1 -0
- package/dist/dependency/parsers/index.d.ts +1 -1
- package/dist/dependency/parsers/index.d.ts.map +1 -1
- package/dist/factory/files/{Files.d.ts → index.d.ts} +3 -3
- package/dist/factory/files/index.d.ts.map +1 -0
- package/dist/factory/files/{Files.js → index.js} +2 -5
- package/dist/factory/files/index.js.map +1 -0
- package/dist/factory/index.d.ts +5 -0
- package/dist/factory/index.d.ts.map +1 -0
- package/dist/factory/index.js +5 -0
- package/dist/factory/index.js.map +1 -0
- package/dist/factory/options/{Options.d.ts → index.d.ts} +1 -1
- package/dist/factory/options/index.d.ts.map +1 -0
- package/dist/factory/options/{Options.js → index.js} +1 -1
- package/dist/factory/options/index.js.map +1 -0
- package/dist/factory/options/option/html/index.d.ts +1 -1
- package/dist/factory/options/option/html/index.d.ts.map +1 -1
- package/dist/factory/options/option/html/index.js +3 -8
- package/dist/factory/options/option/html/index.js.map +1 -1
- package/dist/factory/options/option/{Option.d.ts → index.d.ts} +5 -5
- package/dist/factory/options/option/{Option.d.ts.map → index.d.ts.map} +1 -1
- package/dist/factory/options/option/{Option.js → index.js} +3 -11
- package/dist/factory/options/option/index.js.map +1 -0
- package/dist/factory/options/option/js/index.d.ts +1 -1
- package/dist/factory/options/option/js/index.d.ts.map +1 -1
- package/dist/factory/options/option/js/index.js +5 -10
- package/dist/factory/options/option/js/index.js.map +1 -1
- package/dist/factory/options/option/json/index.d.ts +1 -1
- package/dist/factory/options/option/json/index.d.ts.map +1 -1
- package/dist/factory/options/option/json/index.js +3 -8
- package/dist/factory/options/option/json/index.js.map +1 -1
- package/dist/factory/options/option/jsonc/index.d.ts +1 -1
- package/dist/factory/options/option/jsonc/index.d.ts.map +1 -1
- package/dist/factory/options/option/jsonc/index.js +3 -8
- package/dist/factory/options/option/jsonc/index.js.map +1 -1
- package/dist/factory/options/option/md/index.d.ts +1 -1
- package/dist/factory/options/option/md/index.d.ts.map +1 -1
- package/dist/factory/options/option/md/index.js +3 -8
- package/dist/factory/options/option/md/index.js.map +1 -1
- package/dist/factory/options/option/mocha/index.d.ts +2 -2
- package/dist/factory/options/option/mocha/index.d.ts.map +1 -1
- package/dist/factory/options/option/mocha/index.js +9 -18
- package/dist/factory/options/option/mocha/index.js.map +1 -1
- package/dist/factory/options/option/svelte/index.d.ts +6 -6
- package/dist/factory/options/option/svelte/index.d.ts.map +1 -1
- package/dist/factory/options/option/svelte/index.js +12 -17
- package/dist/factory/options/option/svelte/index.js.map +1 -1
- package/dist/factory/options/option/ts/index.d.ts +4 -4
- package/dist/factory/options/option/ts/index.d.ts.map +1 -1
- package/dist/factory/options/option/ts/index.js +8 -17
- package/dist/factory/options/option/ts/index.js.map +1 -1
- package/dist/factory/options/option/yml/index.d.ts +1 -1
- package/dist/factory/options/option/yml/index.d.ts.map +1 -1
- package/dist/factory/options/option/yml/index.js +3 -8
- package/dist/factory/options/option/yml/index.js.map +1 -1
- package/dist/factory/ruleset/{Ruleset.d.ts → index.d.ts} +4 -4
- package/dist/factory/ruleset/index.d.ts.map +1 -0
- package/dist/factory/ruleset/{Ruleset.js → index.js} +7 -17
- package/dist/factory/ruleset/index.js.map +1 -0
- package/dist/factory/ruleset/rule/{Rule.d.ts → index.d.ts} +2 -2
- package/dist/factory/ruleset/rule/index.d.ts.map +1 -0
- package/dist/factory/ruleset/rule/{Rule.js → index.js} +1 -1
- package/dist/factory/ruleset/rule/index.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -39
- package/dist/index.js.map +1 -1
- package/dist/scopes/{Scopes.d.ts → index.d.ts} +1 -1
- package/dist/scopes/index.d.ts.map +1 -0
- package/dist/scopes/{Scopes.js → index.js} +1 -1
- package/dist/scopes/index.js.map +1 -0
- package/package.json +1 -1
- package/src/boundary/index.ts +4 -0
- package/src/boundary/input/files/base/index.ts +5 -0
- package/src/boundary/input/files/includes/index.ts +5 -0
- package/src/boundary/input/files/index.ts +4 -0
- package/src/boundary/input/index.ts +6 -0
- package/src/boundary/input/parsers/{parsers.ts → index.ts} +2 -6
- package/src/boundary/input/plugins/{plugins.ts → index.ts} +2 -6
- package/src/boundary/input/rules/index.ts +4 -0
- package/src/boundary/input/rules/overrides/index.ts +6 -0
- package/src/boundary/input/rules/preset/entry/index.ts +5 -0
- package/src/boundary/input/rules/preset/entry/object/index.ts +9 -0
- package/src/boundary/input/rules/preset/entry/object/state/index.ts +6 -0
- package/src/boundary/input/rules/preset/index.ts +6 -0
- package/src/boundary/output/config/{config.ts → index.ts} +1 -1
- package/src/boundary/output/index.ts +3 -0
- package/src/dependency/{dependency.ts → index.ts} +1 -5
- package/src/dependency/parsers/index.ts +1 -1
- package/src/factory/files/index.ts +16 -0
- package/src/factory/index.ts +10 -0
- package/src/factory/options/option/html/index.ts +3 -11
- package/src/factory/options/option/{Option.ts → index.ts} +19 -49
- package/src/factory/options/option/js/index.ts +5 -13
- package/src/factory/options/option/json/index.ts +3 -11
- package/src/factory/options/option/jsonc/index.ts +3 -11
- package/src/factory/options/option/md/index.ts +3 -11
- package/src/factory/options/option/mocha/index.ts +11 -23
- package/src/factory/options/option/svelte/index.ts +13 -23
- package/src/factory/options/option/ts/index.ts +9 -22
- package/src/factory/options/option/yml/index.ts +3 -11
- package/src/factory/ruleset/index.ts +40 -0
- package/src/factory/ruleset/rule/{Rule.ts → index.ts} +1 -1
- package/src/index.ts +31 -98
- package/dist/boundary/boundary.d.ts +0 -4
- package/dist/boundary/boundary.d.ts.map +0 -1
- package/dist/boundary/boundary.js +0 -2
- package/dist/boundary/boundary.js.map +0 -1
- package/dist/boundary/input/files/base/base.d.ts +0 -5
- package/dist/boundary/input/files/base/base.d.ts.map +0 -1
- package/dist/boundary/input/files/base/base.js +0 -2
- package/dist/boundary/input/files/base/base.js.map +0 -1
- package/dist/boundary/input/files/base/list/list.d.ts +0 -3
- package/dist/boundary/input/files/base/list/list.d.ts.map +0 -1
- package/dist/boundary/input/files/base/list/list.js +0 -2
- package/dist/boundary/input/files/base/list/list.js.map +0 -1
- package/dist/boundary/input/files/files.d.ts +0 -4
- package/dist/boundary/input/files/files.d.ts.map +0 -1
- package/dist/boundary/input/files/files.js +0 -2
- package/dist/boundary/input/files/files.js.map +0 -1
- package/dist/boundary/input/files/includes/includes.d.ts +0 -4
- package/dist/boundary/input/files/includes/includes.d.ts.map +0 -1
- package/dist/boundary/input/files/includes/includes.js +0 -2
- package/dist/boundary/input/files/includes/includes.js.map +0 -1
- package/dist/boundary/input/input.d.ts +0 -6
- package/dist/boundary/input/input.d.ts.map +0 -1
- package/dist/boundary/input/input.js +0 -2
- package/dist/boundary/input/input.js.map +0 -1
- package/dist/boundary/input/parsers/parsers.d.ts.map +0 -1
- package/dist/boundary/input/parsers/parsers.js +0 -2
- package/dist/boundary/input/parsers/parsers.js.map +0 -1
- package/dist/boundary/input/plugins/plugins.d.ts.map +0 -1
- package/dist/boundary/input/plugins/plugins.js +0 -2
- package/dist/boundary/input/plugins/plugins.js.map +0 -1
- package/dist/boundary/input/rules/overrides/overrides.d.ts +0 -5
- package/dist/boundary/input/rules/overrides/overrides.d.ts.map +0 -1
- package/dist/boundary/input/rules/overrides/overrides.js +0 -2
- package/dist/boundary/input/rules/overrides/overrides.js.map +0 -1
- package/dist/boundary/input/rules/preset/entry/entry.d.ts +0 -4
- package/dist/boundary/input/rules/preset/entry/entry.d.ts.map +0 -1
- package/dist/boundary/input/rules/preset/entry/entry.js +0 -2
- package/dist/boundary/input/rules/preset/entry/entry.js.map +0 -1
- package/dist/boundary/input/rules/preset/entry/object/object.d.ts +0 -4
- package/dist/boundary/input/rules/preset/entry/object/object.d.ts.map +0 -1
- package/dist/boundary/input/rules/preset/entry/object/object.js +0 -2
- package/dist/boundary/input/rules/preset/entry/object/object.js.map +0 -1
- package/dist/boundary/input/rules/preset/entry/object/state/level.d.ts +0 -3
- package/dist/boundary/input/rules/preset/entry/object/state/level.d.ts.map +0 -1
- package/dist/boundary/input/rules/preset/entry/object/state/level.js +0 -2
- package/dist/boundary/input/rules/preset/entry/object/state/level.js.map +0 -1
- package/dist/boundary/input/rules/preset/preset.d.ts +0 -5
- package/dist/boundary/input/rules/preset/preset.d.ts.map +0 -1
- package/dist/boundary/input/rules/preset/preset.js +0 -2
- package/dist/boundary/input/rules/preset/preset.js.map +0 -1
- package/dist/boundary/input/rules/rules.d.ts +0 -4
- package/dist/boundary/input/rules/rules.d.ts.map +0 -1
- package/dist/boundary/input/rules/rules.js +0 -2
- package/dist/boundary/input/rules/rules.js.map +0 -1
- package/dist/boundary/output/config/config.d.ts.map +0 -1
- package/dist/boundary/output/config/config.js +0 -2
- package/dist/boundary/output/config/config.js.map +0 -1
- package/dist/boundary/output/output.d.ts +0 -3
- package/dist/boundary/output/output.d.ts.map +0 -1
- package/dist/boundary/output/output.js +0 -2
- package/dist/boundary/output/output.js.map +0 -1
- package/dist/dependency/dependency.d.ts.map +0 -1
- package/dist/dependency/dependency.js +0 -2
- package/dist/dependency/dependency.js.map +0 -1
- package/dist/factory/factory.d.ts +0 -5
- package/dist/factory/factory.d.ts.map +0 -1
- package/dist/factory/factory.js +0 -5
- package/dist/factory/factory.js.map +0 -1
- package/dist/factory/files/Files.d.ts.map +0 -1
- package/dist/factory/files/Files.js.map +0 -1
- package/dist/factory/options/Options.d.ts.map +0 -1
- package/dist/factory/options/Options.js.map +0 -1
- package/dist/factory/options/option/Option.js.map +0 -1
- package/dist/factory/ruleset/Ruleset.d.ts.map +0 -1
- package/dist/factory/ruleset/Ruleset.js.map +0 -1
- package/dist/factory/ruleset/rule/Rule.d.ts.map +0 -1
- package/dist/factory/ruleset/rule/Rule.js.map +0 -1
- package/dist/scopes/Scopes.d.ts.map +0 -1
- package/dist/scopes/Scopes.js.map +0 -1
- package/src/OmitFilesRuleset.d.ts +0 -1
- package/src/boundary/boundary.ts +0 -4
- package/src/boundary/input/files/base/base.ts +0 -9
- package/src/boundary/input/files/base/list/list.ts +0 -6
- package/src/boundary/input/files/files.ts +0 -7
- package/src/boundary/input/files/includes/includes.ts +0 -8
- package/src/boundary/input/input.ts +0 -9
- package/src/boundary/input/rules/overrides/overrides.ts +0 -9
- package/src/boundary/input/rules/preset/entry/entry.ts +0 -8
- package/src/boundary/input/rules/preset/entry/object/object.ts +0 -12
- package/src/boundary/input/rules/preset/entry/object/state/level.ts +0 -9
- package/src/boundary/input/rules/preset/preset.ts +0 -9
- package/src/boundary/input/rules/rules.ts +0 -7
- package/src/boundary/output/output.ts +0 -3
- package/src/factory/factory.ts +0 -10
- package/src/factory/files/Files.ts +0 -24
- package/src/factory/ruleset/Ruleset.ts +0 -72
- /package/src/boundary/output/config/option/{IOption.d.ts → index.d.ts} +0 -0
- /package/src/boundary/output/config/option/language/ecma/{IOLanguageEcma.d.ts → index.d.ts} +0 -0
- /package/src/boundary/output/config/option/language/{IOLanguage.d.ts → index.d.ts} +0 -0
- /package/src/boundary/output/config/option/language/source/{IOLanguageSource.d.ts → index.d.ts} +0 -0
- /package/src/boundary/output/config/option/linter/{IOLinter.d.ts → index.d.ts} +0 -0
- /package/src/boundary/output/config/option/plugins/{IOPlugins.d.ts → index.d.ts} +0 -0
- /package/src/boundary/output/config/option/processor/{IOProcessor.d.ts → index.d.ts} +0 -0
- /package/src/factory/options/{Options.ts → index.ts} +0 -0
- /package/src/scopes/{Scopes.ts → index.ts} +0 -0
package/src/factory/factory.ts
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
import type { Scope } from "../../scopes/Scopes.js";
|
2
|
-
import type { Input } from "../../boundary/boundary.js";
|
3
|
-
|
4
|
-
export default class Files {
|
5
|
-
constructor(
|
6
|
-
private readonly base: Input.Files.Base,
|
7
|
-
private readonly includes: Input.Files.Includes,
|
8
|
-
) {}
|
9
|
-
|
10
|
-
public files(scope: Scope): readonly string[] {
|
11
|
-
try {
|
12
|
-
return [
|
13
|
-
...this.base[scope],
|
14
|
-
...this.includes[scope] ?? [],
|
15
|
-
];
|
16
|
-
}
|
17
|
-
catch (e) {
|
18
|
-
throw new Error(
|
19
|
-
`linted.factory.Files/scope:${scope}`,
|
20
|
-
{ cause: e },
|
21
|
-
);
|
22
|
-
}
|
23
|
-
}
|
24
|
-
}
|
@@ -1,72 +0,0 @@
|
|
1
|
-
import type { Scope } from "../../scopes/Scopes.js";
|
2
|
-
import Rule from "./rule/Rule.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(
|
10
|
-
private readonly scope: literalful<S>,
|
11
|
-
...rules: readonly Rule[]
|
12
|
-
) {
|
13
|
-
try {
|
14
|
-
this.ruleset = [...rules];
|
15
|
-
}
|
16
|
-
catch (e) {
|
17
|
-
throw new Error(
|
18
|
-
`linted.factory.Ruleset`,
|
19
|
-
{ cause: e },
|
20
|
-
);
|
21
|
-
}
|
22
|
-
}
|
23
|
-
|
24
|
-
public get id() {
|
25
|
-
try {
|
26
|
-
const { scope } = this;
|
27
|
-
|
28
|
-
return scope;
|
29
|
-
}
|
30
|
-
catch (e) {
|
31
|
-
throw new Error(
|
32
|
-
`linted.factory.Ruleset: id`,
|
33
|
-
{ cause: e },
|
34
|
-
);
|
35
|
-
}
|
36
|
-
}
|
37
|
-
|
38
|
-
public get records() {
|
39
|
-
try {
|
40
|
-
const { ruleset, overrides } = this;
|
41
|
-
|
42
|
-
return [
|
43
|
-
...ruleset.map(rules => [rules.id, rules.rules] as const),
|
44
|
-
...overrides === null ? [] : [[overrides.id, overrides.rules] as const] as const,
|
45
|
-
];
|
46
|
-
}
|
47
|
-
catch (e) {
|
48
|
-
throw new Error(
|
49
|
-
`linted.factory.Ruleset: records`,
|
50
|
-
{ cause: e },
|
51
|
-
);
|
52
|
-
}
|
53
|
-
}
|
54
|
-
|
55
|
-
public override(overrides: undefined | Rule["rules"]) {
|
56
|
-
try {
|
57
|
-
if (typeof overrides !== "undefined")
|
58
|
-
this.overrides = new Rule(
|
59
|
-
"override",
|
60
|
-
overrides,
|
61
|
-
);
|
62
|
-
|
63
|
-
return this;
|
64
|
-
}
|
65
|
-
catch (e) {
|
66
|
-
throw new Error(
|
67
|
-
`linted.factory.Ruleset: override`,
|
68
|
-
{ cause: e },
|
69
|
-
);
|
70
|
-
}
|
71
|
-
}
|
72
|
-
}
|
File without changes
|
File without changes
|
File without changes
|
/package/src/boundary/output/config/option/language/source/{IOLanguageSource.d.ts → index.d.ts}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|