@eslinted/core 4.0.0-rc.1 → 4.0.0-rc.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +22 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +28 -8
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,23 @@
|
|
1
|
-
import type {
|
2
|
-
|
3
|
-
export default function (plugins: Input.Plugins, parsers: Input.Parsers, files: Input.Files, rules: Input.Rules): Output[];
|
1
|
+
import type { Scope } from "./scopes/index.js";
|
2
|
+
import type * as core from "./boundary/index.js";
|
3
|
+
export default function (plugins: core.Input.Plugins, parsers: core.Input.Parsers, files: core.Input.Files, rules: core.Input.Rules): core.Output[];
|
4
|
+
declare namespace Core {
|
5
|
+
type Scopes = Scope;
|
6
|
+
namespace Input {
|
7
|
+
type Parsers = core.Input.Parsers;
|
8
|
+
type Plugins = core.Input.Plugins;
|
9
|
+
type Files = core.Input.Files;
|
10
|
+
namespace Files {
|
11
|
+
type Base = core.Input.Files.FileBase;
|
12
|
+
type Includes = core.Input.Files.Includes;
|
13
|
+
}
|
14
|
+
type Rules = core.Input.Rules;
|
15
|
+
namespace Rules {
|
16
|
+
type Base = core.Input.Rules.RuleBase;
|
17
|
+
type Overrides = core.Input.Rules.Overrides;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
type Output = core.Output[];
|
21
|
+
}
|
22
|
+
export type { Core };
|
4
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,KAAK,IAAI,MAAM,qBAAqB,CAAC;AAEjD,MAAM,CAAC,OAAO,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EAAE,IAAI,OAAO;iBACZ,EAAE,CACD,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EACb,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EACf,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,EACtC,CAAC,OAAO,CAAC,EAAE,CAAC,CACb,CAAC,OAAO;SACZ,CAAC;QAEF,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QAAC,MAAM,IAAI,KAAK,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAAC,CAAC;AAC7D,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
@@ -5,19 +5,18 @@ import {
|
|
5
5
|
} from "./factory/index.js";
|
6
6
|
import scopes from "./scopes/index.js";
|
7
7
|
import type { Scope } from "./scopes/index.js";
|
8
|
-
import type
|
8
|
+
import type * as core from "./boundary/index.js";
|
9
9
|
|
10
|
-
export type * as LintCore from "./boundary/index.js";
|
11
10
|
export default function (
|
12
|
-
plugins: Input.Plugins,
|
13
|
-
parsers: Input.Parsers,
|
14
|
-
files: Input.Files,
|
15
|
-
rules: Input.Rules,
|
16
|
-
): Output[] {
|
11
|
+
plugins: core.Input.Plugins,
|
12
|
+
parsers: core.Input.Parsers,
|
13
|
+
files: core.Input.Files,
|
14
|
+
rules: core.Input.Rules,
|
15
|
+
): core.Output[] {
|
17
16
|
try {
|
18
17
|
const F = new Files(files),
|
19
18
|
R = new Rulesets(rules),
|
20
|
-
options: { [S in
|
19
|
+
options: { [S in typeof scopes[number]]: InstanceType<typeof Options[S]>["configs"] } = {
|
21
20
|
js: new Options
|
22
21
|
.js(
|
23
22
|
F.files("js"),
|
@@ -87,3 +86,24 @@ export default function (
|
|
87
86
|
}
|
88
87
|
catch (e) { throw new Error(`linted-core`, { cause: e }); }
|
89
88
|
}
|
89
|
+
|
90
|
+
namespace Core {
|
91
|
+
export type Scopes = Scope;
|
92
|
+
export namespace Input {
|
93
|
+
export type Parsers = core.Input.Parsers;
|
94
|
+
export type Plugins = core.Input.Plugins;
|
95
|
+
export type Files = core.Input.Files;
|
96
|
+
export namespace Files {
|
97
|
+
export type Base = core.Input.Files.FileBase;
|
98
|
+
export type Includes = core.Input.Files.Includes;
|
99
|
+
}
|
100
|
+
export type Rules = core.Input.Rules;
|
101
|
+
export namespace Rules {
|
102
|
+
export type Base = core.Input.Rules.RuleBase;
|
103
|
+
export type Overrides = core.Input.Rules.Overrides;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
export type Output = core.Output[];
|
107
|
+
}
|
108
|
+
|
109
|
+
export type { Core };
|