@eslinted/defaults 19.6.0 → 19.8.0
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/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/rules/index.d.ts +1 -2
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/json/index.d.ts +1 -2
- package/dist/rules/json/index.d.ts.map +1 -1
- package/dist/rules/json/json.d.ts +0 -2
- package/dist/rules/json/json.d.ts.map +1 -1
- package/dist/rules/json/json.js +0 -2
- package/dist/rules/json/json.js.map +1 -1
- package/dist/rules/json/jsonc.d.ts +1 -0
- package/dist/rules/json/jsonc.d.ts.map +1 -1
- package/dist/rules/json/jsonc.js +1 -0
- package/dist/rules/json/jsonc.js.map +1 -1
- package/package.json +1 -6
- package/src/rules/json/json.ts +2 -2
- package/src/rules/json/jsonc.ts +1 -1
- package/.mocharc.yml +0 -11
- package/dist/tests/index.d.ts +0 -2
- package/dist/tests/index.d.ts.map +0 -1
- package/dist/tests/index.js +0 -3
- package/dist/tests/index.js.map +0 -1
- package/dist/tests/index.scopes.spec.d.ts +0 -2
- package/dist/tests/index.scopes.spec.d.ts.map +0 -1
- package/dist/tests/index.scopes.spec.js +0 -5
- package/dist/tests/index.scopes.spec.js.map +0 -1
- package/dist/tests/index.spec.d.ts +0 -2
- package/dist/tests/index.spec.d.ts.map +0 -1
- package/dist/tests/index.spec.js +0 -126
- package/dist/tests/index.spec.js.map +0 -1
- package/tests/index.scopes.spec.ts +0 -4
- package/tests/index.spec.ts +0 -180
- package/tests/index.ts +0 -3
- package/tests/tsconfig.json +0 -24
package/dist/index.d.ts
CHANGED
|
@@ -986,10 +986,8 @@ declare const _default: {
|
|
|
986
986
|
}[];
|
|
987
987
|
json: ({
|
|
988
988
|
rules: {
|
|
989
|
-
readonly "json/no-duplicate-keys": import("./rules/state.js").State.ON;
|
|
990
989
|
readonly "json/no-unsafe-values": import("./rules/state.js").State.ON;
|
|
991
990
|
readonly "json/no-unnormalized-keys": import("./rules/state.js").State.ON;
|
|
992
|
-
readonly "json/top-level-interop": import("./rules/state.js").State.ON;
|
|
993
991
|
};
|
|
994
992
|
} | {
|
|
995
993
|
rules: {
|
|
@@ -1006,6 +1004,7 @@ declare const _default: {
|
|
|
1006
1004
|
2
|
|
1007
1005
|
];
|
|
1008
1006
|
readonly "jsonc/key-spacing": import("./rules/state.js").State.WARN;
|
|
1007
|
+
readonly "jsonc/no-dupe-keys": import("./rules/state.js").State.ON;
|
|
1009
1008
|
readonly "jsonc/no-irregular-whitespace": readonly [
|
|
1010
1009
|
import("./rules/state.js").State.ON,
|
|
1011
1010
|
{
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBAIE"}
|
package/dist/rules/index.d.ts
CHANGED
|
@@ -969,10 +969,8 @@ declare const _default: {
|
|
|
969
969
|
}[];
|
|
970
970
|
json: ({
|
|
971
971
|
rules: {
|
|
972
|
-
readonly "json/no-duplicate-keys": import("./state.js").State.ON;
|
|
973
972
|
readonly "json/no-unsafe-values": import("./state.js").State.ON;
|
|
974
973
|
readonly "json/no-unnormalized-keys": import("./state.js").State.ON;
|
|
975
|
-
readonly "json/top-level-interop": import("./state.js").State.ON;
|
|
976
974
|
};
|
|
977
975
|
} | {
|
|
978
976
|
rules: {
|
|
@@ -989,6 +987,7 @@ declare const _default: {
|
|
|
989
987
|
2
|
|
990
988
|
];
|
|
991
989
|
readonly "jsonc/key-spacing": import("./state.js").State.WARN;
|
|
990
|
+
readonly "jsonc/no-dupe-keys": import("./state.js").State.ON;
|
|
992
991
|
readonly "jsonc/no-irregular-whitespace": readonly [
|
|
993
992
|
import("./state.js").State.ON,
|
|
994
993
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,wBAYE"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
declare const _default: ({
|
|
2
2
|
rules: {
|
|
3
|
-
readonly "json/no-duplicate-keys": import("../state.js").State.ON;
|
|
4
3
|
readonly "json/no-unsafe-values": import("../state.js").State.ON;
|
|
5
4
|
readonly "json/no-unnormalized-keys": import("../state.js").State.ON;
|
|
6
|
-
readonly "json/top-level-interop": import("../state.js").State.ON;
|
|
7
5
|
};
|
|
8
6
|
} | {
|
|
9
7
|
rules: {
|
|
@@ -20,6 +18,7 @@ declare const _default: ({
|
|
|
20
18
|
2
|
|
21
19
|
];
|
|
22
20
|
readonly "jsonc/key-spacing": import("../state.js").State.WARN;
|
|
21
|
+
readonly "jsonc/no-dupe-keys": import("../state.js").State.ON;
|
|
23
22
|
readonly "jsonc/no-irregular-whitespace": readonly [
|
|
24
23
|
import("../state.js").State.ON,
|
|
25
24
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rules/json/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rules/json/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAGE"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { State } from "../state.js";
|
|
2
2
|
declare const _default: {
|
|
3
3
|
rules: {
|
|
4
|
-
readonly "json/no-duplicate-keys": State.ON;
|
|
5
4
|
readonly "json/no-unsafe-values": State.ON;
|
|
6
5
|
readonly "json/no-unnormalized-keys": State.ON;
|
|
7
|
-
readonly "json/top-level-interop": State.ON;
|
|
8
6
|
};
|
|
9
7
|
};
|
|
10
8
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/rules/json/json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/rules/json/json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;;;;;;;AAGjC,wBASE"}
|
package/dist/rules/json/json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/rules/json/json.ts"],"names":[],"mappings":"AAGA,eAAe;IACb,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/rules/json/json.ts"],"names":[],"mappings":"AAGA,eAAe;IACb,KAAK,EAAE;QAGL,uBAAuB,GAAU;QACjC,2BAA2B,GAAU;KAG7B;CACX,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonc.d.ts","sourceRoot":"","sources":["../../../src/rules/json/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC
|
|
1
|
+
{"version":3,"file":"jsonc.d.ts","sourceRoot":"","sources":["../../../src/rules/json/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;AAGjC,wBAqEE"}
|
package/dist/rules/json/jsonc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonc.js","sourceRoot":"","sources":["../../../src/rules/json/jsonc.ts"],"names":[],"mappings":"AAGA,eAAe;IACb,KAAK,EAAE;QAML,mBAAmB,GAAU;QAmB7B,6BAA6B,GAAY;QACzC,6BAA6B,EAAE;;YAE7B,YAAY;SACb;QACD,oBAAoB,GAAU;QAC9B,mBAAmB,GAAY;QAC/B,cAAc,EAAE;;YAEd,CAAC;SACF;QACD,mBAAmB,GAAY;
|
|
1
|
+
{"version":3,"file":"jsonc.js","sourceRoot":"","sources":["../../../src/rules/json/jsonc.ts"],"names":[],"mappings":"AAGA,eAAe;IACb,KAAK,EAAE;QAML,mBAAmB,GAAU;QAmB7B,6BAA6B,GAAY;QACzC,6BAA6B,EAAE;;YAE7B,YAAY;SACb;QACD,oBAAoB,GAAU;QAC9B,mBAAmB,GAAY;QAC/B,cAAc,EAAE;;YAEd,CAAC;SACF;QACD,mBAAmB,GAAY;QAC/B,oBAAoB,GAAU;QAE9B,+BAA+B,EAAE;;YAE/B;gBACE,WAAW,EAAE,IAAI;gBACjB,YAAY,EAAE,IAAI;aACnB;SACF;QAMD,4BAA4B,EAAE;;YAE5B;gBACE,UAAU,EAAE,IAAI;gBAChB,SAAS,EAAE,IAAI;gBACf,aAAa,EAAE,CAAC;aACjB;SACF;QACD,4BAA4B,EAAE;;YAE5B,QAAQ;SACT;QACD,+BAA+B,GAAY;KAInC;CACX,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/defaults",
|
|
6
|
-
"version": "19.
|
|
6
|
+
"version": "19.8.0",
|
|
7
7
|
"repository": "github:jimmy-zhening-luo/linted-defaults",
|
|
8
8
|
"description": "Default scopes for `linted`",
|
|
9
9
|
"keywords": [],
|
|
@@ -24,10 +24,6 @@
|
|
|
24
24
|
"types": "dist/index.d.ts",
|
|
25
25
|
"main": "dist/index.js",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@types/chai": "^5.2.3",
|
|
28
|
-
"@types/mocha": "^10.0.10",
|
|
29
|
-
"chai": "^6.2.2",
|
|
30
|
-
"mocha": "^11.7.5",
|
|
31
27
|
"ts-add-js-extension": "^1.6.6",
|
|
32
28
|
"typescript": "^5.9.3"
|
|
33
29
|
},
|
|
@@ -41,7 +37,6 @@
|
|
|
41
37
|
"lint": "eslint --cache --fix",
|
|
42
38
|
"pretest": "npm run build",
|
|
43
39
|
"test": "npm run --if-present test:suite",
|
|
44
|
-
"test:suite": "tsc -b tests && ts-add-js-extension --showprogress=false --dir=dist && mocha",
|
|
45
40
|
"prestart": "npm run build",
|
|
46
41
|
"start": "npm run start:ts",
|
|
47
42
|
"start:ts": "node .",
|
package/src/rules/json/json.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { State } from "../state";
|
|
|
3
3
|
// DOC: https://github.com/eslint/json?tab=readme-ov-file#rules
|
|
4
4
|
export default {
|
|
5
5
|
rules: {
|
|
6
|
-
"json/no-duplicate-keys": State.
|
|
6
|
+
// "json/no-duplicate-keys": State.OFF /* jsonc/no-dupe-keys */,
|
|
7
7
|
// "json/no-empty-keys": State.OFF,
|
|
8
8
|
"json/no-unsafe-values": State.ON,
|
|
9
9
|
"json/no-unnormalized-keys": State.ON,
|
|
10
10
|
// "json/sort-keys": State.OFF /* jsonc/sort-keys */,
|
|
11
|
-
"json/top-level-interop": State.
|
|
11
|
+
// "json/top-level-interop": State.OFF /* rarely useful */,
|
|
12
12
|
} as const,
|
|
13
13
|
};
|
package/src/rules/json/jsonc.ts
CHANGED
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
2,
|
|
40
40
|
],
|
|
41
41
|
"jsonc/key-spacing": State.WARN,
|
|
42
|
-
|
|
42
|
+
"jsonc/no-dupe-keys": State.ON /* ESLint: json/no-duplicate-keys */,
|
|
43
43
|
// "jsonc/no-floating-decimal": State.OFF,
|
|
44
44
|
"jsonc/no-irregular-whitespace": [
|
|
45
45
|
State.ON,
|
package/.mocharc.yml
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
####################
|
|
2
|
-
### .mocharc ###
|
|
3
|
-
### 1107.1.0 ###
|
|
4
|
-
####################
|
|
5
|
-
|
|
6
|
-
# https://mochajs.org/#configuration-format
|
|
7
|
-
# https://mochajs.org/#command-line-usage
|
|
8
|
-
|
|
9
|
-
extension: [js]
|
|
10
|
-
require: dist/tests/index.js
|
|
11
|
-
spec: [dist/tests/**/*.spec.js]
|
package/dist/tests/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../tests/index.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,SAE/B"}
|
package/dist/tests/index.js
DELETED
package/dist/tests/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../tests/index.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB;AAEhC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.scopes.spec.d.ts","sourceRoot":"","sources":["../../tests/index.scopes.spec.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,uBAGT,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.scopes.spec.js","sourceRoot":"","sources":["../../tests/index.scopes.spec.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI;IACJ,IAAI;CACI,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../../tests/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC"}
|
package/dist/tests/index.spec.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import "chai/register-should.js";
|
|
2
|
-
import defaults from "../index.js";
|
|
3
|
-
import { scopes } from "./index.scopes.spec.js";
|
|
4
|
-
describe("Main Export", () => {
|
|
5
|
-
const GLOBAL = "*", { ignores, files, rules, } = defaults;
|
|
6
|
-
describe("module", () => {
|
|
7
|
-
it("with object submodules: files, ignores, rules", () => {
|
|
8
|
-
files
|
|
9
|
-
.should
|
|
10
|
-
.be
|
|
11
|
-
.an("object");
|
|
12
|
-
ignores
|
|
13
|
-
.should
|
|
14
|
-
.be
|
|
15
|
-
.an("object");
|
|
16
|
-
rules
|
|
17
|
-
.should
|
|
18
|
-
.be
|
|
19
|
-
.an("object");
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
describe("files", () => {
|
|
23
|
-
it("has some scopes", () => {
|
|
24
|
-
files
|
|
25
|
-
.should
|
|
26
|
-
.include
|
|
27
|
-
.keys(scopes);
|
|
28
|
-
});
|
|
29
|
-
it("of arrays", () => {
|
|
30
|
-
for (const scope of Object.values(files))
|
|
31
|
-
scope
|
|
32
|
-
.should
|
|
33
|
-
.be
|
|
34
|
-
.an("array");
|
|
35
|
-
});
|
|
36
|
-
it("of expanded strings", () => {
|
|
37
|
-
for (const scope of Object.values(files))
|
|
38
|
-
for (const pattern of scope)
|
|
39
|
-
pattern
|
|
40
|
-
.should
|
|
41
|
-
.be
|
|
42
|
-
.a("string")
|
|
43
|
-
.not
|
|
44
|
-
.have
|
|
45
|
-
.string("{")
|
|
46
|
-
.not
|
|
47
|
-
.have
|
|
48
|
-
.string("}");
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
describe("ignores", () => {
|
|
52
|
-
it("has globals", () => {
|
|
53
|
-
ignores
|
|
54
|
-
.should
|
|
55
|
-
.include
|
|
56
|
-
.keys(GLOBAL);
|
|
57
|
-
});
|
|
58
|
-
it("of arrays", () => {
|
|
59
|
-
for (const scope of Object.values(ignores))
|
|
60
|
-
scope
|
|
61
|
-
.should
|
|
62
|
-
.be
|
|
63
|
-
.an("array");
|
|
64
|
-
});
|
|
65
|
-
it("of expanded strings", () => {
|
|
66
|
-
for (const scope of Object.values(ignores))
|
|
67
|
-
for (const pattern of scope)
|
|
68
|
-
pattern
|
|
69
|
-
.should
|
|
70
|
-
.be
|
|
71
|
-
.a("string")
|
|
72
|
-
.not
|
|
73
|
-
.have
|
|
74
|
-
.string("{")
|
|
75
|
-
.not
|
|
76
|
-
.have
|
|
77
|
-
.string("}");
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
describe("rules", () => {
|
|
81
|
-
it("has some scopes", () => {
|
|
82
|
-
rules
|
|
83
|
-
.should
|
|
84
|
-
.include
|
|
85
|
-
.keys(scopes);
|
|
86
|
-
});
|
|
87
|
-
it("of arrays", () => {
|
|
88
|
-
for (const scope of Object.values(rules))
|
|
89
|
-
scope
|
|
90
|
-
.should
|
|
91
|
-
.be
|
|
92
|
-
.an("array");
|
|
93
|
-
});
|
|
94
|
-
it("of rule config objects", () => {
|
|
95
|
-
for (const scope of Object.values(rules))
|
|
96
|
-
for (const config of scope) {
|
|
97
|
-
config
|
|
98
|
-
.should
|
|
99
|
-
.be
|
|
100
|
-
.an("object")
|
|
101
|
-
.with
|
|
102
|
-
.keys("rules")
|
|
103
|
-
.with
|
|
104
|
-
.own
|
|
105
|
-
.property("rules")
|
|
106
|
-
.an("object");
|
|
107
|
-
for (const rule of Object.keys(config.rules)) {
|
|
108
|
-
rule
|
|
109
|
-
.should
|
|
110
|
-
.be
|
|
111
|
-
.a("string");
|
|
112
|
-
const value = config.rules[rule];
|
|
113
|
-
if (typeof value !== "number")
|
|
114
|
-
value
|
|
115
|
-
.should
|
|
116
|
-
.be
|
|
117
|
-
.an("array")
|
|
118
|
-
.with
|
|
119
|
-
.property("0")
|
|
120
|
-
.a("number");
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
//# sourceMappingURL=index.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../tests/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,QAAQ,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,QAAQ,CACN,aAAa,EACb,GAAG,EAAE;IACH,MAAM,MAAM,GAAG,GAAG,EAClB,EACE,OAAO,EACP,KAAK,EACL,KAAK,GACN,GAAG,QAAQ,CAAC;IAEb,QAAQ,CACN,QAAQ,EACR,GAAG,EAAE;QACH,EAAE,CACA,+CAA+C,EAC/C,GAAG,EAAE;YACH,KAAK;iBACF,MAAM;iBACN,EAAE;iBACF,EAAE,CAAC,QAAQ,CAAC,CAAC;YAChB,OAAO;iBACJ,MAAM;iBACN,EAAE;iBACF,EAAE,CAAC,QAAQ,CAAC,CAAC;YAChB,KAAK;iBACF,MAAM;iBACN,EAAE;iBACF,EAAE,CAAC,QAAQ,CAAC,CAAC;QAClB,CAAC,CACF,CAAC;IACJ,CAAC,CACF,CAAC;IACF,QAAQ,CACN,OAAO,EACP,GAAG,EAAE;QACH,EAAE,CACA,iBAAiB,EACjB,GAAG,EAAE;YACH,KAAK;iBACF,MAAM;iBACN,OAAO;i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,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/tests/index.spec.ts
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import "chai/register-should.js";
|
|
2
|
-
import defaults from "..";
|
|
3
|
-
import { scopes } from "./index.scopes.spec";
|
|
4
|
-
|
|
5
|
-
describe(
|
|
6
|
-
"Main Export",
|
|
7
|
-
() => {
|
|
8
|
-
const GLOBAL = "*",
|
|
9
|
-
{
|
|
10
|
-
ignores,
|
|
11
|
-
files,
|
|
12
|
-
rules,
|
|
13
|
-
} = defaults;
|
|
14
|
-
|
|
15
|
-
describe(
|
|
16
|
-
"module",
|
|
17
|
-
() => {
|
|
18
|
-
it(
|
|
19
|
-
"with object submodules: files, ignores, rules",
|
|
20
|
-
() => {
|
|
21
|
-
files
|
|
22
|
-
.should
|
|
23
|
-
.be
|
|
24
|
-
.an("object");
|
|
25
|
-
ignores
|
|
26
|
-
.should
|
|
27
|
-
.be
|
|
28
|
-
.an("object");
|
|
29
|
-
rules
|
|
30
|
-
.should
|
|
31
|
-
.be
|
|
32
|
-
.an("object");
|
|
33
|
-
},
|
|
34
|
-
);
|
|
35
|
-
},
|
|
36
|
-
);
|
|
37
|
-
describe(
|
|
38
|
-
"files",
|
|
39
|
-
() => {
|
|
40
|
-
it(
|
|
41
|
-
"has some scopes",
|
|
42
|
-
() => {
|
|
43
|
-
files
|
|
44
|
-
.should
|
|
45
|
-
.include
|
|
46
|
-
.keys(scopes);
|
|
47
|
-
},
|
|
48
|
-
);
|
|
49
|
-
it(
|
|
50
|
-
"of arrays",
|
|
51
|
-
() => {
|
|
52
|
-
for (const scope of Object.values(files))
|
|
53
|
-
scope
|
|
54
|
-
.should
|
|
55
|
-
.be
|
|
56
|
-
.an("array");
|
|
57
|
-
},
|
|
58
|
-
);
|
|
59
|
-
it(
|
|
60
|
-
"of expanded strings",
|
|
61
|
-
() => {
|
|
62
|
-
for (const scope of Object.values(files))
|
|
63
|
-
for (const pattern of scope)
|
|
64
|
-
pattern
|
|
65
|
-
.should
|
|
66
|
-
.be
|
|
67
|
-
.a("string")
|
|
68
|
-
.not
|
|
69
|
-
.have
|
|
70
|
-
.string("{")
|
|
71
|
-
.not
|
|
72
|
-
.have
|
|
73
|
-
.string("}");
|
|
74
|
-
},
|
|
75
|
-
);
|
|
76
|
-
},
|
|
77
|
-
);
|
|
78
|
-
describe(
|
|
79
|
-
"ignores",
|
|
80
|
-
() => {
|
|
81
|
-
it(
|
|
82
|
-
"has globals",
|
|
83
|
-
() => {
|
|
84
|
-
ignores
|
|
85
|
-
.should
|
|
86
|
-
.include
|
|
87
|
-
.keys(GLOBAL);
|
|
88
|
-
},
|
|
89
|
-
);
|
|
90
|
-
it(
|
|
91
|
-
"of arrays",
|
|
92
|
-
() => {
|
|
93
|
-
for (const scope of Object.values(ignores))
|
|
94
|
-
scope
|
|
95
|
-
.should
|
|
96
|
-
.be
|
|
97
|
-
.an("array");
|
|
98
|
-
},
|
|
99
|
-
);
|
|
100
|
-
it(
|
|
101
|
-
"of expanded strings",
|
|
102
|
-
() => {
|
|
103
|
-
for (const scope of Object.values(ignores))
|
|
104
|
-
for (const pattern of scope)
|
|
105
|
-
pattern
|
|
106
|
-
.should
|
|
107
|
-
.be
|
|
108
|
-
.a("string")
|
|
109
|
-
.not
|
|
110
|
-
.have
|
|
111
|
-
.string("{")
|
|
112
|
-
.not
|
|
113
|
-
.have
|
|
114
|
-
.string("}");
|
|
115
|
-
},
|
|
116
|
-
);
|
|
117
|
-
},
|
|
118
|
-
);
|
|
119
|
-
describe(
|
|
120
|
-
"rules",
|
|
121
|
-
() => {
|
|
122
|
-
it(
|
|
123
|
-
"has some scopes",
|
|
124
|
-
() => {
|
|
125
|
-
rules
|
|
126
|
-
.should
|
|
127
|
-
.include
|
|
128
|
-
.keys(scopes);
|
|
129
|
-
},
|
|
130
|
-
);
|
|
131
|
-
it(
|
|
132
|
-
"of arrays",
|
|
133
|
-
() => {
|
|
134
|
-
for (const scope of Object.values(rules))
|
|
135
|
-
scope
|
|
136
|
-
.should
|
|
137
|
-
.be
|
|
138
|
-
.an("array");
|
|
139
|
-
},
|
|
140
|
-
);
|
|
141
|
-
it(
|
|
142
|
-
"of rule config objects",
|
|
143
|
-
() => {
|
|
144
|
-
for (const scope of Object.values(rules))
|
|
145
|
-
for (const config of scope) {
|
|
146
|
-
config
|
|
147
|
-
.should
|
|
148
|
-
.be
|
|
149
|
-
.an("object")
|
|
150
|
-
.with
|
|
151
|
-
.keys("rules")
|
|
152
|
-
.with
|
|
153
|
-
.own
|
|
154
|
-
.property("rules")
|
|
155
|
-
.an("object");
|
|
156
|
-
|
|
157
|
-
for (const rule of Object.keys(config.rules)) {
|
|
158
|
-
rule
|
|
159
|
-
.should
|
|
160
|
-
.be
|
|
161
|
-
.a("string");
|
|
162
|
-
|
|
163
|
-
const value = config.rules[rule as keyof typeof config.rules] as number | object;
|
|
164
|
-
|
|
165
|
-
if (typeof value !== "number")
|
|
166
|
-
value
|
|
167
|
-
.should
|
|
168
|
-
.be
|
|
169
|
-
.an("array")
|
|
170
|
-
.with
|
|
171
|
-
.property("0")
|
|
172
|
-
.a("number");
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
);
|
|
177
|
-
},
|
|
178
|
-
);
|
|
179
|
-
},
|
|
180
|
-
);
|
package/tests/index.ts
DELETED
package/tests/tsconfig.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../tsconfig-base",
|
|
3
|
-
"include": [
|
|
4
|
-
"../typings/**/*",
|
|
5
|
-
"**/*",
|
|
6
|
-
],
|
|
7
|
-
"references": [
|
|
8
|
-
{
|
|
9
|
-
"path": "../src",
|
|
10
|
-
},
|
|
11
|
-
],
|
|
12
|
-
"compilerOptions": {
|
|
13
|
-
"rootDirs": [
|
|
14
|
-
"..",
|
|
15
|
-
"../src",
|
|
16
|
-
],
|
|
17
|
-
"types": [
|
|
18
|
-
"mocha",
|
|
19
|
-
"chai",
|
|
20
|
-
/* {CONFIGURE} */
|
|
21
|
-
],
|
|
22
|
-
"outDir": "../dist/tests",
|
|
23
|
-
},
|
|
24
|
-
}
|