@eslinted/core 31.0.1-rc.0 → 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.d.ts.map +1 -1
- package/dist/tests/index.input.spec.d.ts +1 -27
- package/dist/tests/index.input.spec.d.ts.map +1 -1
- package/dist/tests/index.input.spec.js +0 -29
- package/dist/tests/index.input.spec.js.map +1 -1
- package/dist/tests/index.js +0 -5
- package/dist/tests/index.js.map +1 -1
- 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.input.spec.ts +0 -29
- package/tests/index.spec.ts +11 -11
- package/tests/index.ts +1 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../tests/index.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../tests/index.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,SAE/B"}
|
|
@@ -3,13 +3,10 @@ declare const enum State {
|
|
|
3
3
|
WARN = 1,
|
|
4
4
|
ERROR = 2
|
|
5
5
|
}
|
|
6
|
-
export declare const scopes: readonly ["js", "ts", "
|
|
6
|
+
export declare const scopes: readonly ["js", "ts", "svelte", "html", "json", "jsonc", "jsoncc"], optional: readonly ["svelte"], tree: (readonly ["jsoncc", readonly ["jsonc"]] | readonly ["jsonc", readonly ["json"]] | readonly ["svelte", readonly ["ts"]] | readonly ["ts", readonly ["js"]])[], imports: {
|
|
7
7
|
plugins: {
|
|
8
8
|
"@stylistic": string;
|
|
9
9
|
"@typescript-eslint": string;
|
|
10
|
-
mocha: string;
|
|
11
|
-
"chai-friendly": string;
|
|
12
|
-
"chai-expect": string;
|
|
13
10
|
html: string;
|
|
14
11
|
json: string;
|
|
15
12
|
jsonc: string;
|
|
@@ -53,7 +50,6 @@ export declare const scopes: readonly ["js", "ts", "mocha", "svelte", "html", "j
|
|
|
53
50
|
files: {
|
|
54
51
|
js: string[];
|
|
55
52
|
ts: string[];
|
|
56
|
-
mocha: string[];
|
|
57
53
|
svelte: string[];
|
|
58
54
|
html: string[];
|
|
59
55
|
json: string[];
|
|
@@ -103,28 +99,6 @@ export declare const scopes: readonly ["js", "ts", "mocha", "svelte", "html", "j
|
|
|
103
99
|
vanilla0?: never;
|
|
104
100
|
};
|
|
105
101
|
})[];
|
|
106
|
-
mocha: ({
|
|
107
|
-
name: string;
|
|
108
|
-
rules: {
|
|
109
|
-
vanilla2: State;
|
|
110
|
-
"@typescript-eslint/global"?: never;
|
|
111
|
-
"mocha/test-expression"?: never;
|
|
112
|
-
};
|
|
113
|
-
} | {
|
|
114
|
-
name: string;
|
|
115
|
-
rules: {
|
|
116
|
-
"@typescript-eslint/global": State;
|
|
117
|
-
vanilla2?: never;
|
|
118
|
-
"mocha/test-expression"?: never;
|
|
119
|
-
};
|
|
120
|
-
} | {
|
|
121
|
-
name: string;
|
|
122
|
-
rules: {
|
|
123
|
-
"mocha/test-expression": State;
|
|
124
|
-
vanilla2?: never;
|
|
125
|
-
"@typescript-eslint/global"?: never;
|
|
126
|
-
};
|
|
127
|
-
})[];
|
|
128
102
|
svelte: ({
|
|
129
103
|
name: string;
|
|
130
104
|
rules: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.input.spec.d.ts","sourceRoot":"","sources":["../../tests/index.input.spec.ts"],"names":[],"mappings":"AAAA,mBAAW,KAAK;IACd,GAAG,IAAI;IACP,IAAI,IAAI;IACR,KAAK,IAAI;CACV;AAID,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.input.spec.d.ts","sourceRoot":"","sources":["../../tests/index.input.spec.ts"],"names":[],"mappings":"AAAA,mBAAW,KAAK;IACd,GAAG,IAAI;IACP,IAAI,IAAI;IACR,KAAK,IAAI;CACV;AAID,eAAO,MAAM,MAAM,oEAQT,EACV,QAAQ,qBAAsB,EAC9B,IAAI,+JAiBH,EACD,OAAO;;;;;;;;;;;;CAYN,EACD,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BP,EACD,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+GP,EACD,UAAU,IAAK,CAAC"}
|
|
@@ -2,7 +2,6 @@ const Plugin = "MOCK_PLUGIN", Parser = (scope) => `MOCK_PARSER:${scope}`;
|
|
|
2
2
|
export const scopes = [
|
|
3
3
|
"js",
|
|
4
4
|
"ts",
|
|
5
|
-
"mocha",
|
|
6
5
|
"svelte",
|
|
7
6
|
"html",
|
|
8
7
|
"json",
|
|
@@ -17,10 +16,6 @@ export const scopes = [
|
|
|
17
16
|
"jsonc",
|
|
18
17
|
["json"],
|
|
19
18
|
],
|
|
20
|
-
[
|
|
21
|
-
"mocha",
|
|
22
|
-
["ts"],
|
|
23
|
-
],
|
|
24
19
|
[
|
|
25
20
|
"svelte",
|
|
26
21
|
["ts"],
|
|
@@ -33,9 +28,6 @@ export const scopes = [
|
|
|
33
28
|
plugins: {
|
|
34
29
|
"@stylistic": Plugin,
|
|
35
30
|
"@typescript-eslint": Plugin,
|
|
36
|
-
mocha: Plugin,
|
|
37
|
-
"chai-friendly": Plugin,
|
|
38
|
-
"chai-expect": Plugin,
|
|
39
31
|
html: Plugin,
|
|
40
32
|
json: Plugin,
|
|
41
33
|
jsonc: Plugin,
|
|
@@ -79,7 +71,6 @@ export const scopes = [
|
|
|
79
71
|
files: {
|
|
80
72
|
js: ["default.js"],
|
|
81
73
|
ts: ["default.ts"],
|
|
82
|
-
mocha: ["default.mocha"],
|
|
83
74
|
svelte: ["default.svelte"],
|
|
84
75
|
html: ["default.html"],
|
|
85
76
|
json: ["default.json"],
|
|
@@ -126,26 +117,6 @@ export const scopes = [
|
|
|
126
117
|
},
|
|
127
118
|
},
|
|
128
119
|
],
|
|
129
|
-
mocha: [
|
|
130
|
-
{
|
|
131
|
-
name: "disable",
|
|
132
|
-
rules: {
|
|
133
|
-
vanilla2: 0,
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
name: "disable/ts",
|
|
138
|
-
rules: {
|
|
139
|
-
"@typescript-eslint/global": 2,
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
name: "enable",
|
|
144
|
-
rules: {
|
|
145
|
-
"mocha/test-expression": 2,
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
],
|
|
149
120
|
svelte: [
|
|
150
121
|
{
|
|
151
122
|
name: "disable",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.input.spec.js","sourceRoot":"","sources":["../../tests/index.input.spec.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,GAAG,aAAa,EAC5B,MAAM,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,eAAe,KAAK,EAAE,CAAC;AAEnD,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI;IACJ,IAAI;IACJ,
|
|
1
|
+
{"version":3,"file":"index.input.spec.js","sourceRoot":"","sources":["../../tests/index.input.spec.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,GAAG,aAAa,EAC5B,MAAM,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,eAAe,KAAK,EAAE,CAAC;AAEnD,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,MAAM;IACN,OAAO;IACP,QAAQ;CACA,EACV,QAAQ,GAAG,CAAC,QAAQ,CAAU,EAC9B,IAAI,GAAG;IACL;QACE,QAAQ;QACR,CAAC,OAAO,CAAC;KACD;IACV;QACE,OAAO;QACP,CAAC,MAAM,CAAC;KACA;IACV;QACE,QAAQ;QACR,CAAC,IAAI,CAAC;KACE;IACV;QACE,IAAI;QACJ,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qBACC;iBACX;aACF;SACF;KACF;CACF,EACD,UAAU,GAAG,EAAE,CAAC"}
|
package/dist/tests/index.js
CHANGED
package/dist/tests/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../tests/index.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../tests/index.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB;AAEhC,CAAC"}
|
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,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,GAAG,EAAE;IACH,QAAQ,CACN,QAAQ,EACR,GAAG,EAAE;QACH,EAAE,CACA,eAAe,EACf,GAAG,EAAE;YACH,IAAI;iBACD,MAAM,CAAC,EAAE;iBACT,CAAC,CAAC,UAAU,CAAC,CAAC;QACnB,CAAC,CACF,CAAC;IACJ,CAAC,CACF,CAAC;IACF,QAAQ,CACN,QAAQ,EACR,GAAG,EAAE;QACH,EAAE,CACA,sBAAsB,EACtB,GAAG,EAAE;YACH,OAAO;iBACJ,MAAM,CAAC,EAAE;iBACT,EAAE,CAAC,OAAO,CAAC;iBACX,GAAG,CAAC,KAAK,CAAC;QACf,CAAC,CACF,CAAC;QACF,EAAE,CACA,+BAA+B,MAAM,CAAC,MAAM,aAAa,MAAM,CAAC,MAAM,GAAG,CAAC,cAAc,OAAO,CAAC,MAAM,GAAG,EACzG,GAAG,EAAE;YACH,OAAO;iBACJ,MAAM,CAAC,IAAI;iBACX,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACvC,CAAC,CACF,CAAC;QACF,EAAE,CACA,mBAAmB,EACnB,GAAG,EAAE;YACH,KAAK,MAAM,MAAM,IAAI,OAAO;gBAC1B,MAAM;qBACH,MAAM,CAAC,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,CAAC;oBAEb,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;wBAC7C,IAAI;6BACD,MAAM;6BACN,EAAE;6BACF,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": [],
|
|
@@ -9,7 +9,6 @@ Parser = (scope: string) => `MOCK_PARSER:${scope}`;
|
|
|
9
9
|
export const scopes = [
|
|
10
10
|
"js",
|
|
11
11
|
"ts",
|
|
12
|
-
"mocha",
|
|
13
12
|
"svelte",
|
|
14
13
|
"html",
|
|
15
14
|
"json",
|
|
@@ -26,10 +25,6 @@ tree = [
|
|
|
26
25
|
"jsonc",
|
|
27
26
|
["json"],
|
|
28
27
|
] as const,
|
|
29
|
-
[
|
|
30
|
-
"mocha",
|
|
31
|
-
["ts"],
|
|
32
|
-
] as const,
|
|
33
28
|
[
|
|
34
29
|
"svelte",
|
|
35
30
|
["ts"],
|
|
@@ -43,9 +38,6 @@ imports = {
|
|
|
43
38
|
plugins: {
|
|
44
39
|
"@stylistic": Plugin,
|
|
45
40
|
"@typescript-eslint": Plugin,
|
|
46
|
-
mocha: Plugin,
|
|
47
|
-
"chai-friendly": Plugin,
|
|
48
|
-
"chai-expect": Plugin,
|
|
49
41
|
html: Plugin,
|
|
50
42
|
json: Plugin,
|
|
51
43
|
jsonc: Plugin,
|
|
@@ -91,7 +83,6 @@ defaults = {
|
|
|
91
83
|
files: {
|
|
92
84
|
js: ["default.js"],
|
|
93
85
|
ts: ["default.ts"],
|
|
94
|
-
mocha: ["default.mocha"],
|
|
95
86
|
svelte: ["default.svelte"],
|
|
96
87
|
html: ["default.html"],
|
|
97
88
|
json: ["default.json"],
|
|
@@ -138,26 +129,6 @@ defaults = {
|
|
|
138
129
|
},
|
|
139
130
|
},
|
|
140
131
|
],
|
|
141
|
-
mocha: [
|
|
142
|
-
{
|
|
143
|
-
name: "disable",
|
|
144
|
-
rules: {
|
|
145
|
-
vanilla2: State.OFF,
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
name: "disable/ts",
|
|
150
|
-
rules: {
|
|
151
|
-
"@typescript-eslint/global": State.ERROR,
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
name: "enable",
|
|
156
|
-
rules: {
|
|
157
|
-
"mocha/test-expression": State.ERROR,
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
],
|
|
161
132
|
svelte: [
|
|
162
133
|
{
|
|
163
134
|
name: "disable",
|
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
|