@eslinted/core 31.0.1-rc.1 → 31.0.1
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.
- package/dist/tests/index.spec.js +11 -11
- package/dist/tests/index.spec.js.map +1 -1
- package/package.json +1 -1
- package/tests/index.spec.ts +11 -11
package/dist/tests/index.spec.js
CHANGED
|
@@ -2,27 +2,27 @@ import "chai/register-should.js";
|
|
|
2
2
|
import Core from "../index.js";
|
|
3
3
|
import { scopes, optional, tree, imports, settings, defaults, extensions, } from "./index.input.spec.js";
|
|
4
4
|
const configs = Core(scopes, optional, tree, imports, settings, defaults, extensions);
|
|
5
|
-
describe("Core",
|
|
6
|
-
describe("module",
|
|
7
|
-
it("is a function",
|
|
5
|
+
describe("Core", () => {
|
|
6
|
+
describe("module", () => {
|
|
7
|
+
it("is a function", () => {
|
|
8
8
|
Core
|
|
9
9
|
.should.be
|
|
10
10
|
.a("function");
|
|
11
11
|
});
|
|
12
12
|
});
|
|
13
|
-
describe("output",
|
|
14
|
-
it("is a non-empty array",
|
|
13
|
+
describe("output", () => {
|
|
14
|
+
it("is a non-empty array", () => {
|
|
15
15
|
configs
|
|
16
16
|
.should.be
|
|
17
17
|
.an("array")
|
|
18
18
|
.not.empty;
|
|
19
19
|
});
|
|
20
|
-
it(`length >= (global/ignores + ${scopes.length} scopes = ${scopes.length + 1}) [Actual: ${configs.length}]`,
|
|
20
|
+
it(`length >= (global/ignores + ${scopes.length} scopes = ${scopes.length + 1}) [Actual: ${configs.length}]`, () => {
|
|
21
21
|
configs
|
|
22
22
|
.should.have
|
|
23
23
|
.lengthOf.above(scopes.length + 1);
|
|
24
24
|
});
|
|
25
|
-
it("of config objects",
|
|
25
|
+
it("of config objects", () => {
|
|
26
26
|
for (const config of configs)
|
|
27
27
|
config
|
|
28
28
|
.should.be
|
|
@@ -31,14 +31,14 @@ describe("Core", function () {
|
|
|
31
31
|
.any
|
|
32
32
|
.keys("plugins", "files", "ignores", "rules");
|
|
33
33
|
});
|
|
34
|
-
it("with valid plugins",
|
|
34
|
+
it("with valid plugins", () => {
|
|
35
35
|
for (const config of configs)
|
|
36
36
|
if ("plugins" in config)
|
|
37
37
|
config.plugins
|
|
38
38
|
.should.be
|
|
39
39
|
.an("object");
|
|
40
40
|
});
|
|
41
|
-
it("or valid files",
|
|
41
|
+
it("or valid files", () => {
|
|
42
42
|
for (const config of configs)
|
|
43
43
|
if ("files" in config)
|
|
44
44
|
config
|
|
@@ -47,7 +47,7 @@ describe("Core", function () {
|
|
|
47
47
|
.an("array")
|
|
48
48
|
.not.empty;
|
|
49
49
|
});
|
|
50
|
-
it("or valid ignores",
|
|
50
|
+
it("or valid ignores", () => {
|
|
51
51
|
for (const config of configs)
|
|
52
52
|
if ("ignores" in config) {
|
|
53
53
|
config
|
|
@@ -61,7 +61,7 @@ describe("Core", function () {
|
|
|
61
61
|
.not.empty;
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
it("or valid rules",
|
|
64
|
+
it("or valid rules", () => {
|
|
65
65
|
for (const config of configs)
|
|
66
66
|
if ("rules" in config) {
|
|
67
67
|
config
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../tests/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,IAAI,MAAM,IAAI,CAAC;AACtB,OAAO,EACL,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,UAAU,GACX,MAAM,oBAAoB,CAAC;AAE5B,MAAM,OAAO,GAAG,IAAI,CAClB,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,UAAU,CACX,CAAC;AAEF,QAAQ,CACN,MAAM,EACN;
|
|
1
|
+
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../tests/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAA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BACF,CAAC,CAAC,QAAQ,CAAC,CAAC;wBAEf,IAAI,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,QAAQ;4BACxC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAE;iCAChB,MAAM;iCACN,EAAE;iCACF,EAAE,CAAC,OAAO,CAAC;iCACX,IAAI;iCACJ,QAAQ,CAAC,GAAG,CAAC;iCACb,CAAC,CAAC,QAAQ,CAAC,CAAC;oBACnB,CAAC;gBACH,CAAC;QACL,CAAC,CACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC,CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"$schema": "https://json.schemastore.org/package",
|
|
4
4
|
"$help": "https://docs.npmjs.com/cli/configuring-npm/package-json",
|
|
5
5
|
"name": "@eslinted/core",
|
|
6
|
-
"version": "31.0.1
|
|
6
|
+
"version": "31.0.1",
|
|
7
7
|
"repository": "github:jimmy-zhening-luo/linted-core",
|
|
8
8
|
"description": "Internal core for npm package `linted`, responsible for producing an array of fully-formed ESLint configurations according to `linted` spec.",
|
|
9
9
|
"keywords": [],
|
package/tests/index.spec.ts
CHANGED
|
@@ -22,13 +22,13 @@ const configs = Core(
|
|
|
22
22
|
|
|
23
23
|
describe(
|
|
24
24
|
"Core",
|
|
25
|
-
|
|
25
|
+
() => {
|
|
26
26
|
describe(
|
|
27
27
|
"module",
|
|
28
|
-
|
|
28
|
+
() => {
|
|
29
29
|
it(
|
|
30
30
|
"is a function",
|
|
31
|
-
|
|
31
|
+
() => {
|
|
32
32
|
Core
|
|
33
33
|
.should.be
|
|
34
34
|
.a("function");
|
|
@@ -38,10 +38,10 @@ describe(
|
|
|
38
38
|
);
|
|
39
39
|
describe(
|
|
40
40
|
"output",
|
|
41
|
-
|
|
41
|
+
() => {
|
|
42
42
|
it(
|
|
43
43
|
"is a non-empty array",
|
|
44
|
-
|
|
44
|
+
() => {
|
|
45
45
|
configs
|
|
46
46
|
.should.be
|
|
47
47
|
.an("array")
|
|
@@ -50,7 +50,7 @@ describe(
|
|
|
50
50
|
);
|
|
51
51
|
it(
|
|
52
52
|
`length >= (global/ignores + ${scopes.length} scopes = ${scopes.length + 1}) [Actual: ${configs.length}]`,
|
|
53
|
-
|
|
53
|
+
() => {
|
|
54
54
|
configs
|
|
55
55
|
.should.have
|
|
56
56
|
.lengthOf.above(scopes.length + 1);
|
|
@@ -58,7 +58,7 @@ describe(
|
|
|
58
58
|
);
|
|
59
59
|
it(
|
|
60
60
|
"of config objects",
|
|
61
|
-
|
|
61
|
+
() => {
|
|
62
62
|
for (const config of configs)
|
|
63
63
|
config
|
|
64
64
|
.should.be
|
|
@@ -75,7 +75,7 @@ describe(
|
|
|
75
75
|
);
|
|
76
76
|
it(
|
|
77
77
|
"with valid plugins",
|
|
78
|
-
|
|
78
|
+
() => {
|
|
79
79
|
for (const config of configs)
|
|
80
80
|
if ("plugins" in config)
|
|
81
81
|
(config.plugins as object)
|
|
@@ -85,7 +85,7 @@ describe(
|
|
|
85
85
|
);
|
|
86
86
|
it(
|
|
87
87
|
"or valid files",
|
|
88
|
-
|
|
88
|
+
() => {
|
|
89
89
|
for (const config of configs)
|
|
90
90
|
if ("files" in config)
|
|
91
91
|
config
|
|
@@ -97,7 +97,7 @@ describe(
|
|
|
97
97
|
);
|
|
98
98
|
it(
|
|
99
99
|
"or valid ignores",
|
|
100
|
-
|
|
100
|
+
() => {
|
|
101
101
|
for (const config of configs)
|
|
102
102
|
if ("ignores" in config) {
|
|
103
103
|
config
|
|
@@ -115,7 +115,7 @@ describe(
|
|
|
115
115
|
);
|
|
116
116
|
it(
|
|
117
117
|
"or valid rules",
|
|
118
|
-
|
|
118
|
+
() => {
|
|
119
119
|
for (const config of configs)
|
|
120
120
|
if ("rules" in config) {
|
|
121
121
|
config
|