@eslinted/core 14.0.0-rc.0 → 14.0.0-rc.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/factory/index.d.ts +3 -3
- package/dist/index.spec.js +4 -4
- package/dist/index.spec.js.map +1 -1
- package/dist/interface/input/scopes/defaults.d.ts +2 -2
- package/dist/interface/input/scopes/defaults.d.ts.map +1 -1
- package/dist/test/input.d.ts.map +1 -1
- package/dist/test/input.js +0 -1
- package/dist/test/input.js.map +1 -1
- package/package.json +1 -1
- package/src/index.spec.ts +4 -4
- package/src/interface/input/scopes/defaults.ts +2 -2
- package/src/test/input.ts +0 -1
package/dist/factory/index.d.ts
CHANGED
@@ -21,7 +21,7 @@ export declare class Factory {
|
|
21
21
|
};
|
22
22
|
};
|
23
23
|
readonly scopes: {
|
24
|
-
readonly files: Readonly<Record<"
|
24
|
+
readonly files: Readonly<Record<"ts" | "svelte" | "html" | "jsonc" | "yml" | "json" | "mocha" | "js", string[]>>;
|
25
25
|
readonly ignores: Readonly<Record<"*" | "ts" | "svelte" | "html" | "jsonc" | "yml" | "json" | "mocha" | "js", string[]>>;
|
26
26
|
readonly rules: Readonly<Record<"ts" | "svelte" | "html" | "jsonc" | "yml" | "json" | "mocha" | "js", import("../interface/shared/config/rule/index.js").NamedBag[]>>;
|
27
27
|
};
|
@@ -29,7 +29,7 @@ export declare class Factory {
|
|
29
29
|
scope<S extends keyof typeof ScopeManifests>(scope: S): readonly [
|
30
30
|
] | ({
|
31
31
|
readonly name: `linted/${S}/${string}/`;
|
32
|
-
readonly files: Readonly<Record<"
|
32
|
+
readonly files: Readonly<Record<"ts" | "svelte" | "html" | "jsonc" | "yml" | "json" | "mocha" | "js", string[]>>[S];
|
33
33
|
readonly ignores: Readonly<Record<"*" | "ts" | "svelte" | "html" | "jsonc" | "yml" | "json" | "mocha" | "js", string[]>>[S];
|
34
34
|
readonly rules: Readonly<Record<string, import("../interface/shared/config/rule/index.js").State | readonly [
|
35
35
|
import("../interface/shared/config/rule/index.js").State,
|
@@ -38,7 +38,7 @@ export declare class Factory {
|
|
38
38
|
} | {
|
39
39
|
readonly processor?: "svelte/svelte";
|
40
40
|
readonly name: `linted/${S}/`;
|
41
|
-
readonly files: Readonly<Record<"
|
41
|
+
readonly files: Readonly<Record<"ts" | "svelte" | "html" | "jsonc" | "yml" | "json" | "mocha" | "js", string[]>>[S];
|
42
42
|
readonly ignores: Readonly<Record<"*" | "ts" | "svelte" | "html" | "jsonc" | "yml" | "json" | "mocha" | "js", string[]>>[S];
|
43
43
|
readonly languageOptions: {
|
44
44
|
readonly parserOptions?: {
|
package/dist/index.spec.js
CHANGED
@@ -15,15 +15,15 @@ describe("Core", function () {
|
|
15
15
|
expect(configs)
|
16
16
|
.an("array");
|
17
17
|
});
|
18
|
-
it("
|
18
|
+
it("non-empty", function () {
|
19
19
|
expect(configs)
|
20
20
|
.has.lengthOf.above(1);
|
21
21
|
});
|
22
|
-
it(`
|
22
|
+
it(`with length >= */ignores + */settings + ${scopes.length} scopes = ${scopes.length + 2} [Actual: ${configs.length}`, function () {
|
23
23
|
expect(configs)
|
24
|
-
.lengthOf.
|
24
|
+
.lengthOf.above(scopes.length + 2);
|
25
25
|
});
|
26
|
-
it("
|
26
|
+
it("containing only config-like members", function () {
|
27
27
|
expect(configs)
|
28
28
|
.satisfies((configs) => configs.every(config => typeof config === "object" && config !== null && "name" in config && typeof config.name === "string"));
|
29
29
|
});
|
package/dist/index.spec.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,IAAI,MAAM,GAAG,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;AAEhC,QAAQ,CAAC,MAA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M,GAAG,CAAC,cAAc,OAAO,CAAC,MAAM,EAAE,EAAE;YACvH,MAAM,CAAC,OAAO,CAAC;iBACZ,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,qCAAqC,EAAE;YACxC,MAAM,CAAC,OAAO,CAAC;iBACZ,SAAS,CAAC,CAAC,OAA2B,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QAC/K,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,SAAS,EAAE;QAClB,EAAE,CAAC,4BAA4B,EAAE;YAC/B,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;iBACf,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;YACrC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;iBACf,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;YACjC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;iBACf,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,4BAA4B,CAAC,CAAC;YACrD,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;iBACf,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import type { Config, Rule } from "../../shared/index.js";
|
2
2
|
export interface Defaults<Scopes extends string> {
|
3
3
|
readonly settings: Config["linterOptions"] & Config["languageOptions"];
|
4
|
-
readonly files: Readonly<Record<
|
5
|
-
readonly ignores:
|
4
|
+
readonly files: Readonly<Record<Scopes, string[]>>;
|
5
|
+
readonly ignores: Readonly<Record<"*" | Scopes, string[]>>;
|
6
6
|
readonly rules: Readonly<Record<Scopes, Rule.NamedBag[]>>;
|
7
7
|
}
|
8
8
|
//# sourceMappingURL=defaults.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/scopes/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,WAAW,QAAQ,CAAC,MAAM,SAAS,MAAM;IAC7C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACvE,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../../src/interface/input/scopes/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,WAAW,QAAQ,CAAC,MAAM,SAAS,MAAM;IAC7C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACvE,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IACnD,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC3D,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;CAC3D"}
|
package/dist/test/input.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/test/input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,IAAI,CAAC;AAM3B,eAAO,MAAM,SAAS,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/test/input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,IAAI,CAAC;AAM3B,eAAO,MAAM,SAAS,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAyFvC,CAAC"}
|
package/dist/test/input.js
CHANGED
package/dist/test/input.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/test/input.ts"],"names":[],"mappings":"AAEA,MACA,KAAK,GAAG,OAAO,EACf,GAAG,GAAG,KAAK,CAAC;AAEZ,MAAM,CAAC,MAAM,SAAS,GAA+B;IACnD,OAAO,EAAE;QACP,OAAO,EAAE;YACP,EAAE,EAAE,YAAY;YAChB,MAAM,EAAE,gBAAgB;YACxB,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,eAAe;YACtB,GAAG,EAAE,aAAa;SACV;KACF;IACV,UAAU,EAAE,EAAE;IACd,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,IAAI;YACpB,6BAA6B,EAAE,OAAO;SACvC;QACD,KAAK,EAAE;YACL,
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/test/input.ts"],"names":[],"mappings":"AAEA,MACA,KAAK,GAAG,OAAO,EACf,GAAG,GAAG,KAAK,CAAC;AAEZ,MAAM,CAAC,MAAM,SAAS,GAA+B;IACnD,OAAO,EAAE;QACP,OAAO,EAAE;YACP,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ec.ts
CHANGED
@@ -17,17 +17,17 @@ describe("Core", function () {
|
|
17
17
|
expect(configs)
|
18
18
|
.an("array");
|
19
19
|
});
|
20
|
-
it("
|
20
|
+
it("non-empty", function () {
|
21
21
|
expect(configs)
|
22
22
|
.has.lengthOf.above(1);
|
23
23
|
// .not.empty;
|
24
24
|
// replace with not.empty after new rule
|
25
25
|
});
|
26
|
-
it(`
|
26
|
+
it(`with length >= */ignores + */settings + ${scopes.length} scopes = ${scopes.length + 2} [Actual: ${configs.length}`, function () {
|
27
27
|
expect(configs)
|
28
|
-
.lengthOf.
|
28
|
+
.lengthOf.above(scopes.length + 2);
|
29
29
|
});
|
30
|
-
it("
|
30
|
+
it("containing only config-like members", function () {
|
31
31
|
expect(configs)
|
32
32
|
.satisfies((configs: readonly unknown[]) => configs.every(config => typeof config === "object" && config !== null && "name" in config && typeof config.name === "string"));
|
33
33
|
});
|
@@ -2,7 +2,7 @@ import type { Config, Rule } from "../../shared";
|
|
2
2
|
|
3
3
|
export interface Defaults<Scopes extends string> {
|
4
4
|
readonly settings: Config["linterOptions"] & Config["languageOptions"];
|
5
|
-
readonly files: Readonly<Record<
|
6
|
-
readonly ignores:
|
5
|
+
readonly files: Readonly<Record<Scopes, string[]>>;
|
6
|
+
readonly ignores: Readonly<Record<"*" | Scopes, string[]>>;
|
7
7
|
readonly rules: Readonly<Record<Scopes, Rule.NamedBag[]>>;
|
8
8
|
}
|