@eslinted/core 0.0.1-rc.3 → 0.0.1-rc.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/options.d.ts.map +1 -1
- package/dist/options.js.map +1 -1
- package/dist/parsers.d.ts +10 -0
- package/dist/parsers.d.ts.map +1 -0
- package/dist/parsers.js +2 -0
- package/dist/parsers.js.map +1 -0
- package/dist/plugins.d.ts +34 -0
- package/dist/plugins.d.ts.map +1 -0
- package/dist/plugins.js +2 -0
- package/dist/plugins.js.map +1 -0
- package/dist/scopes.d.ts +2 -1
- package/dist/scopes.d.ts.map +1 -1
- package/dist/scopes.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +7 -4
- package/src/options.ts +2 -1
- package/src/parsers.ts +10 -0
- package/src/{plugins.d.ts → plugins.ts} +4 -2
- package/src/scopes.ts +3 -1
- package/src/Scope.d.ts +0 -9
package/dist/index.d.ts
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
+
import type { Scopes } from "./scopes.js";
|
2
|
+
import type Plugins from "./plugins.js";
|
3
|
+
import type Parsers from "./parsers.js";
|
1
4
|
import type Ruleset from "./rulesets/ruleset/Ruleset.js";
|
2
5
|
export { default as Ruleset } from "./rulesets/ruleset/Ruleset.js";
|
3
6
|
export { Rule } from "./rulesets/ruleset/Ruleset.js";
|
4
|
-
export default function (plugins: Plugins, parsers:
|
5
|
-
[S in
|
7
|
+
export default function (plugins: Plugins, parsers: Parsers, files: Record<Scopes, string[]>, rulesets: {
|
8
|
+
[S in Scopes]: Ruleset<S>;
|
6
9
|
}): IConfig[];
|
7
10
|
//# 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":"AAEA,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAC/B,QAAQ,EAAE;KAAG,CAAC,IAAI,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;CAAE,GACtC,OAAO,EAAE,CAqGX"}
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,OAAO,MAAM,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,OAAO,MAAM,cAAc,CAAC;AAMnC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,MAAM,CAAC,OAAO,WACZ,OAAg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G,CACxB,KAAK,CAAC,EAAE;gBACN,OAAO;oBACL,KAAK;oBACL,GAAG,mBAAmB,CAAC,KAAK,CAAC;iBAC9B,CAAC;YACJ,CAAC,CACF;YACD,CAAC,CAAC,EAAE,CACT;aACA,IAAI,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,6BAA6B,EAC7B,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/options.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,SAAS,MAAM,wBAAwB,CAAC;;;;;;;;;;AAE/C,wBAQoC"}
|
package/dist/options.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,eAAe;IACb,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,MAAM,EAAE,YAAY;IACpB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,WAAW;IAClB,GAAG,EAAE,SAAS;CACmB,CAAC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { Scopes } from "./scopes.js";
|
2
|
+
export default interface Parsers extends Particord<Scopes, unknown> {
|
3
|
+
ts: unknown;
|
4
|
+
svelte: unknown;
|
5
|
+
html: unknown;
|
6
|
+
json: unknown;
|
7
|
+
jsonc: unknown;
|
8
|
+
yml: unknown;
|
9
|
+
}
|
10
|
+
//# sourceMappingURL=parsers.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,CAAC,OAAO,WAAW,OAAQ,SAAQ,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;IACjE,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;CACd"}
|
package/dist/parsers.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import type { Scopes } from "./scopes.js";
|
2
|
+
type PluginPackage = {
|
3
|
+
configs: unknown;
|
4
|
+
};
|
5
|
+
export default interface Plugins extends Record<Scopes, Record<string, {
|
6
|
+
configs: unknown;
|
7
|
+
}>> {
|
8
|
+
js: {
|
9
|
+
"@stylistic": PluginPackage;
|
10
|
+
};
|
11
|
+
ts: {
|
12
|
+
"@stylistic": PluginPackage;
|
13
|
+
"@typescript-eslint": PluginPackage;
|
14
|
+
};
|
15
|
+
svelte: {
|
16
|
+
"@stylistic": PluginPackage;
|
17
|
+
"@typescript-eslint": PluginPackage;
|
18
|
+
svelte: PluginPackage;
|
19
|
+
};
|
20
|
+
html: {
|
21
|
+
"@html-eslint": PluginPackage;
|
22
|
+
};
|
23
|
+
json: {
|
24
|
+
jsonc: PluginPackage;
|
25
|
+
};
|
26
|
+
jsonc: {
|
27
|
+
jsonc: PluginPackage;
|
28
|
+
};
|
29
|
+
yml: {
|
30
|
+
yml: PluginPackage;
|
31
|
+
};
|
32
|
+
}
|
33
|
+
export {};
|
34
|
+
//# sourceMappingURL=plugins.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,KAAK,aAAa,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1C,MAAM,CAAC,OAAO,WAAW,OAAQ,SAAQ,MAAM,CAC7C,MAAM,EACN,MAAM,CACJ,MAAM,EACN;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CACrB,CACF;IACC,EAAE,EAAE;QAAE,YAAY,EAAE,aAAa,CAAA;KAAE,CAAC;IACpC,EAAE,EAAE;QACF,YAAY,EAAE,aAAa,CAAC;QAC5B,oBAAoB,EAAE,aAAa,CAAC;KACrC,CAAC;IACF,MAAM,EAAE;QACN,YAAY,EAAE,aAAa,CAAC;QAC5B,oBAAoB,EAAE,aAAa,CAAC;QACpC,MAAM,EAAE,aAAa,CAAC;KACvB,CAAC;IACF,IAAI,EAAE;QAAE,cAAc,EAAE,aAAa,CAAA;KAAE,CAAC;IACxC,IAAI,EAAE;QAAE,KAAK,EAAE,aAAa,CAAA;KAAE,CAAC;IAC/B,KAAK,EAAE;QAAE,KAAK,EAAE,aAAa,CAAA;KAAE,CAAC;IAChC,GAAG,EAAE;QAAE,GAAG,EAAE,aAAa,CAAA;KAAE,CAAC;CAC7B"}
|
package/dist/plugins.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":""}
|
package/dist/scopes.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
-
|
1
|
+
export type Scopes = typeof scopes[number];
|
2
|
+
declare const scopes: readonly ["js", "ts", "svelte", "html", "json", "jsonc", "yml"];
|
2
3
|
export default scopes;
|
3
4
|
//# sourceMappingURL=scopes.d.ts.map
|
package/dist/scopes.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM,
|
1
|
+
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AAE3C,QAAA,MAAM,MAAM,iEAQF,CAAC;AAEX,eAAe,MAAM,CAAC"}
|
package/dist/scopes.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scopes.js","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"scopes.js","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG;IACb,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;CACG,CAAC;AAEX,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
@@ -1,18 +1,21 @@
|
|
1
1
|
import scopes from "./scopes.js";
|
2
2
|
import options from "./options.js";
|
3
|
+
import type { Scopes } from "./scopes.js";
|
4
|
+
import type Plugins from "./plugins.js";
|
5
|
+
import type Parsers from "./parsers.js";
|
3
6
|
import type Ruleset from "./rulesets/ruleset/Ruleset.js";
|
4
7
|
|
5
8
|
export { default as Ruleset } from "./rulesets/ruleset/Ruleset.js";
|
6
9
|
export { Rule } from "./rulesets/ruleset/Ruleset.js";
|
7
10
|
export default function (
|
8
11
|
plugins: Plugins,
|
9
|
-
parsers:
|
10
|
-
files: Record<
|
11
|
-
rulesets: { [S in
|
12
|
+
parsers: Parsers,
|
13
|
+
files: Record<Scopes, string[]>,
|
14
|
+
rulesets: { [S in Scopes]: Ruleset<S> },
|
12
15
|
): IConfig[] {
|
13
16
|
try {
|
14
17
|
const instantiatedOptions: {
|
15
|
-
[S in
|
18
|
+
[S in Scopes]: InstanceType<
|
16
19
|
typeof options[S]
|
17
20
|
>["body"]
|
18
21
|
} = {
|
package/src/options.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { Scopes } from "./scopes.js";
|
1
2
|
import JsOption from "./options/JsOption.js";
|
2
3
|
import TsOption from "./options/TsOption.js";
|
3
4
|
import SvelteOption from "./options/SvelteOption.js";
|
@@ -14,4 +15,4 @@ export default {
|
|
14
15
|
json: JsonOption,
|
15
16
|
jsonc: JsoncOption,
|
16
17
|
yml: YmlOption,
|
17
|
-
} satisfies Record<
|
18
|
+
} satisfies Record<Scopes, unknown>;
|
package/src/parsers.ts
ADDED
package/src/scopes.ts
CHANGED