linted 38.0.2 → 38.1.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/package.json +4 -9
- 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.spec.d.ts +0 -2
- package/dist/tests/index.spec.d.ts.map +0 -1
- package/dist/tests/index.spec.js +0 -21
- package/dist/tests/index.spec.js.map +0 -1
- package/dist/tests/scope/index.spec.d.ts +0 -2
- package/dist/tests/scope/index.spec.d.ts.map +0 -1
- package/dist/tests/scope/index.spec.js +0 -72
- package/dist/tests/scope/index.spec.js.map +0 -1
- package/dist/tests/scope/tree.spec.d.ts +0 -2
- package/dist/tests/scope/tree.spec.d.ts.map +0 -1
- package/dist/tests/scope/tree.spec.js +0 -64
- package/dist/tests/scope/tree.spec.js.map +0 -1
- package/tests/index.spec.ts +0 -37
- package/tests/index.ts +0 -3
- package/tests/scope/index.spec.ts +0 -115
- package/tests/scope/tree.spec.ts +0 -103
- package/tests/tsconfig.json +0 -24
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": "linted",
|
|
6
|
-
"version": "38.0
|
|
6
|
+
"version": "38.1.0",
|
|
7
7
|
"repository": "github:jimmy-zhening-luo/linted",
|
|
8
8
|
"description": "ESLint mono-plugin bundler with strict, opinionated defaults for JavaScript, TypeScript, Svelte, HTML, Tailwind/CSS, JSON, JSONC, YAML, and Mocha.",
|
|
9
9
|
"keywords": [
|
|
@@ -59,19 +59,15 @@
|
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@eslint/css": "0.14.1",
|
|
61
61
|
"@eslint/json": "1.0.1",
|
|
62
|
-
"@eslinted/core": "32.
|
|
63
|
-
"@eslinted/defaults": "19.
|
|
62
|
+
"@eslinted/core": "32.4.0",
|
|
63
|
+
"@eslinted/defaults": "19.7.0",
|
|
64
64
|
"@html-eslint/eslint-plugin": "0.55.0",
|
|
65
|
-
"@stylistic/eslint-plugin": "5.
|
|
65
|
+
"@stylistic/eslint-plugin": "5.9.0",
|
|
66
66
|
"eslint-plugin-jsonc": "2.21.1",
|
|
67
67
|
"eslint-plugin-yml": "3.2.1",
|
|
68
68
|
"typescript-eslint": "8.56.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@types/chai": "^5.2.3",
|
|
72
|
-
"@types/mocha": "^10.0.10",
|
|
73
|
-
"chai": "^6.2.2",
|
|
74
|
-
"mocha": "^11.7.5",
|
|
75
71
|
"ts-add-js-extension": "^1.6.6",
|
|
76
72
|
"typescript": "^5.9.3"
|
|
77
73
|
},
|
|
@@ -85,7 +81,6 @@
|
|
|
85
81
|
"lint": "eslint --cache --fix",
|
|
86
82
|
"pretest": "npm run build",
|
|
87
83
|
"test": "npm run --if-present test:suite",
|
|
88
|
-
"test:suite": "tsc -b tests && ts-add-js-extension --showprogress=false --dir=dist && mocha",
|
|
89
84
|
"prestart": "npm run build",
|
|
90
85
|
"start": "npm run start:ts",
|
|
91
86
|
"start:ts": "node .",
|
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.spec.d.ts","sourceRoot":"","sources":["../../tests/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC"}
|
package/dist/tests/index.spec.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import "chai/register-should.js";
|
|
2
|
-
import linted from "../index.js";
|
|
3
|
-
const configs = linted();
|
|
4
|
-
describe("linted", () => {
|
|
5
|
-
describe("shape", () => {
|
|
6
|
-
it("is a function", () => {
|
|
7
|
-
linted
|
|
8
|
-
.should.be
|
|
9
|
-
.a("function");
|
|
10
|
-
});
|
|
11
|
-
});
|
|
12
|
-
describe("output", () => {
|
|
13
|
-
it("is a non-empty array", () => {
|
|
14
|
-
configs
|
|
15
|
-
.should.be
|
|
16
|
-
.an("array")
|
|
17
|
-
.not.empty;
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
//# 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,MAAM,MAAM,IAAI,CAAC;AAExB,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC;AAEzB,QAAQ,CACN,QAAQ,EACR,GAAG,EAAE;IACH,QAAQ,CACN,OAAO,EACP,GAAG,EAAE;QACH,EAAE,CACA,eAAe,EACf,GAAG,EAAE;YACH,MAAM;iBACH,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;IACJ,CAAC,CACF,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../../../tests/scope/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import "chai/register-should.js";
|
|
2
|
-
import { scopes } from "../../scope/index.js";
|
|
3
|
-
describe("Scopes", () => {
|
|
4
|
-
describe("shape", () => {
|
|
5
|
-
it("is a non-empty array", () => {
|
|
6
|
-
scopes
|
|
7
|
-
.should.be
|
|
8
|
-
.an("array")
|
|
9
|
-
.not.empty;
|
|
10
|
-
});
|
|
11
|
-
});
|
|
12
|
-
describe("members", () => {
|
|
13
|
-
it("are unique", () => {
|
|
14
|
-
scopes
|
|
15
|
-
.length
|
|
16
|
-
.should
|
|
17
|
-
.equal(new Set(scopes)
|
|
18
|
-
.size);
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
describe("order", () => {
|
|
22
|
-
it("`jsoncc` > `jsonc` > `json`", () => {
|
|
23
|
-
scopes
|
|
24
|
-
.should
|
|
25
|
-
.include
|
|
26
|
-
.members([
|
|
27
|
-
"jsoncc",
|
|
28
|
-
"jsonc",
|
|
29
|
-
"json",
|
|
30
|
-
]);
|
|
31
|
-
scopes
|
|
32
|
-
.indexOf("jsoncc")
|
|
33
|
-
.should.be
|
|
34
|
-
.greaterThan(scopes
|
|
35
|
-
.indexOf("jsonc"));
|
|
36
|
-
scopes
|
|
37
|
-
.indexOf("jsonc")
|
|
38
|
-
.should.be
|
|
39
|
-
.greaterThan(scopes
|
|
40
|
-
.indexOf("json"));
|
|
41
|
-
});
|
|
42
|
-
it("`svelte` > `ts`", () => {
|
|
43
|
-
scopes
|
|
44
|
-
.should
|
|
45
|
-
.include
|
|
46
|
-
.members([
|
|
47
|
-
"svelte",
|
|
48
|
-
"ts",
|
|
49
|
-
]);
|
|
50
|
-
scopes
|
|
51
|
-
.indexOf("svelte")
|
|
52
|
-
.should.be
|
|
53
|
-
.greaterThan(scopes
|
|
54
|
-
.indexOf("ts"));
|
|
55
|
-
});
|
|
56
|
-
it("`ts` > `js`", () => {
|
|
57
|
-
scopes
|
|
58
|
-
.should
|
|
59
|
-
.include
|
|
60
|
-
.members([
|
|
61
|
-
"ts",
|
|
62
|
-
"js",
|
|
63
|
-
]);
|
|
64
|
-
scopes
|
|
65
|
-
.indexOf("ts")
|
|
66
|
-
.should.be
|
|
67
|
-
.greaterThan(scopes
|
|
68
|
-
.indexOf("js"));
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
//# sourceMappingURL=index.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../tests/scope/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,QAAQ,CACN,QAAQ,EACR,GAAG,EAAE;IACH,QAAQ,CACN,OAAO,EACP,GAAG,EAAE;QACH,EAAE,CACA,sBAAsB,EACtB,GAAG,EAAE;YACH,MAAM;iBACH,MAAM,CAAC,EAAE;iBACT,EAAE,CAAC,OAAO,CAAC;iBACX,GAAG,CAAC,KAAK,CAAC;QACf,CAAC,CACF,CAAC;IACJ,CAAC,CACF,CAAC;IACF,QAAQ,CACN,SAAS,EACT,GAAG,EAAE;QACH,EAAE,CACA,YAAY,EACZ,GAAG,EAAE;YACH,MAAM;iBACH,MAAM;iBACN,MAAM;iBACN,KAAK,CACJ,IAAI,GAAG,CAAC,MAAM,CAAC;iBACZ,IAAI,CACR,CAAC;QACN,CAAC,CACF,CAAC;IACJ,CAAC,CACF,CAAC;IACF,QAAQ,CACN,OAAO,EACP,GAAG,EAAE;QACH,EAAE,CACA,6BAA6B,EAC7B,GAAG,EAAE;YACH,MAAM;iBACH,MAAM;iBACN,OAAO;iBACP,OAAO,CACN;gBACE,QAAQ;gBACR,OAAO;gBACP,MAAM;aACP,CACF,CAAC;YACJ,MAAM;iBACH,OAAO,CAAC,QAAQ,CAAC;iBACjB,MAAM,CAAC,EAAE;iBACT,WAAW,CACV,MAAM;iBACH,OAAO,CAAC,OAAO,CAAC,CACpB,CAAC;YACJ,MAAM;iBACH,OAAO,CAAC,OAAO,CAAC;iBAChB,MAAM,CAAC,EAAE;iBACT,WAAW,CACV,MAAM;iBACH,OAAO,CAAC,MAAM,CAAC,CACnB,CAAC;QACN,CAAC,CACF,CAAC;QACF,EAAE,CACA,iBAAiB,EACjB,GAAG,EAAE;YACH,MAAM;iBACH,MAAM;iBACN,OAAO;iBACP,OAAO,CACN;gBACE,QAAQ;gBACR,IAAI;aACL,CACF,CAAC;YACJ,MAAM;iBACH,OAAO,CAAC,QAAQ,CAAC;iBACjB,MAAM,CAAC,EAAE;iBACT,WAAW,CACV,MAAM;iBACH,OAAO,CAAC,IAAI,CAAC,CACjB,CAAC;QACN,CAAC,CACF,CAAC;QACF,EAAE,CACA,aAAa,EACb,GAAG,EAAE;YACH,MAAM;iBACH,MAAM;iBACN,OAAO;iBACP,OAAO,CACN;gBACE,IAAI;gBACJ,IAAI;aACL,CACF,CAAC;YACJ,MAAM;iBACH,OAAO,CAAC,IAAI,CAAC;iBACb,MAAM,CAAC,EAAE;iBACT,WAAW,CACV,MAAM;iBACH,OAAO,CAAC,IAAI,CAAC,CACjB,CAAC;QACN,CAAC,CACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tree.spec.d.ts","sourceRoot":"","sources":["../../../tests/scope/tree.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import "chai/register-should.js";
|
|
2
|
-
import { tree } from "../../scope/tree.js";
|
|
3
|
-
const nodes = tree.map(([scope]) => scope);
|
|
4
|
-
describe("Tree", () => {
|
|
5
|
-
describe("shape", () => {
|
|
6
|
-
it("is an array", () => {
|
|
7
|
-
tree
|
|
8
|
-
.should.be
|
|
9
|
-
.an("array");
|
|
10
|
-
});
|
|
11
|
-
});
|
|
12
|
-
describe("members", () => {
|
|
13
|
-
it("are unique", () => {
|
|
14
|
-
tree
|
|
15
|
-
.length
|
|
16
|
-
.should
|
|
17
|
-
.equal(new Set(nodes)
|
|
18
|
-
.size);
|
|
19
|
-
});
|
|
20
|
-
it("omit `js`", () => {
|
|
21
|
-
nodes
|
|
22
|
-
.should
|
|
23
|
-
.not.include
|
|
24
|
-
.members(["js"]);
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
describe("order", () => {
|
|
28
|
-
it("`jsoncc` < [`jsonc`]?", () => {
|
|
29
|
-
nodes
|
|
30
|
-
.should
|
|
31
|
-
.include
|
|
32
|
-
.members(["jsoncc"]);
|
|
33
|
-
nodes
|
|
34
|
-
.indexOf("jsoncc")
|
|
35
|
-
.should.be
|
|
36
|
-
.lessThan(nodes.indexOf("jsonc") * tree.length);
|
|
37
|
-
});
|
|
38
|
-
it("`svelte` < `ts`", () => {
|
|
39
|
-
nodes
|
|
40
|
-
.should
|
|
41
|
-
.include
|
|
42
|
-
.members([
|
|
43
|
-
"svelte",
|
|
44
|
-
"ts",
|
|
45
|
-
]);
|
|
46
|
-
nodes
|
|
47
|
-
.indexOf("svelte")
|
|
48
|
-
.should.be
|
|
49
|
-
.lessThan(nodes
|
|
50
|
-
.indexOf("ts"));
|
|
51
|
-
});
|
|
52
|
-
it("`ts` is last", () => {
|
|
53
|
-
nodes
|
|
54
|
-
.should
|
|
55
|
-
.include
|
|
56
|
-
.members(["ts"]);
|
|
57
|
-
nodes
|
|
58
|
-
.indexOf("ts")
|
|
59
|
-
.should
|
|
60
|
-
.equal(tree.length - 1);
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
//# sourceMappingURL=tree.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tree.spec.js","sourceRoot":"","sources":["../../../tests/scope/tree.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;AAE3C,QAAQ,CACN,MAAM,EACN,GAAG,EAAE;IACH,QAAQ,CACN,OAAO,EACP,GAAG,EAAE;QACH,EAAE,CACA,aAAa,EACb,GAAG,EAAE;YACH,IAAI;iBACD,MAAM,CAAC,EAAE;iBACT,EAAE,CAAC,OAAO,CAAC,CAAC;QACjB,CAAC,CACF,CAAC;IACJ,CAAC,CACF,CAAC;IACF,QAAQ,CACN,SAAS,EACT,GAAG,EAAE;QACH,EAAE,CACA,YAAY,EACZ,GAAG,EAAE;YACH,IAAI;iBACD,MAAM;iBACN,MAAM;iBACN,KAAK,CACJ,IAAI,GAAG,CAAC,KAAK,CAAC;iBACX,IAAI,CACR,CAAC;QACN,CAAC,CACF,CAAC;QACF,EAAE,CACA,WAAW,EACX,GAAG,EAAE;YACH,KAAK;iBACF,MAAM;iBACN,GAAG,CAAC,OAAO;iBACX,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACrB,CAAC,CACF,CAAC;IACJ,CAAC,CACF,CAAC;IACF,QAAQ,CACN,OAAO,EACP,GAAG,EAAE;QACH,EAAE,CACA,uBAAuB,EACvB,GAAG,EAAE;YACH,KAAK;iBACF,MAAM;iBACN,OAAO;iBACP,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YACvB,KAAK;iBACF,OAAO,CAAC,QAAQ,CAAC;iBACjB,MAAM,CAAC,EAAE;iBACT,QAAQ,CACP,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,CACrC,CAAC;QACN,CAAC,CACF,CAAC;QACF,EAAE,CACA,iBAAiB,EACjB,GAAG,EAAE;YACH,KAAK;iBACF,MAAM;iBACN,OAAO;iBACP,OAAO,CACN;gBACE,QAAQ;gBACR,IAAI;aACL,CACF,CAAC;YACJ,KAAK;iBACF,OAAO,CAAC,QAAQ,CAAC;iBACjB,MAAM,CAAC,EAAE;iBACT,QAAQ,CACP,KAAK;iBACF,OAAO,CAAC,IAAI,CAAC,CACjB,CAAC;QACN,CAAC,CACF,CAAC;QACF,EAAE,CACA,cAAc,EACd,GAAG,EAAE;YACH,KAAK;iBACF,MAAM;iBACN,OAAO;iBACP,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACnB,KAAK;iBACF,OAAO,CAAC,IAAI,CAAC;iBACb,MAAM;iBACN,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC5B,CAAC,CACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC,CACF,CAAC"}
|
package/tests/index.spec.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import "chai/register-should.js";
|
|
2
|
-
import linted from "..";
|
|
3
|
-
|
|
4
|
-
const configs = linted();
|
|
5
|
-
|
|
6
|
-
describe(
|
|
7
|
-
"linted",
|
|
8
|
-
() => {
|
|
9
|
-
describe(
|
|
10
|
-
"shape",
|
|
11
|
-
() => {
|
|
12
|
-
it(
|
|
13
|
-
"is a function",
|
|
14
|
-
() => {
|
|
15
|
-
linted
|
|
16
|
-
.should.be
|
|
17
|
-
.a("function");
|
|
18
|
-
},
|
|
19
|
-
);
|
|
20
|
-
},
|
|
21
|
-
);
|
|
22
|
-
describe(
|
|
23
|
-
"output",
|
|
24
|
-
() => {
|
|
25
|
-
it(
|
|
26
|
-
"is a non-empty array",
|
|
27
|
-
() => {
|
|
28
|
-
configs
|
|
29
|
-
.should.be
|
|
30
|
-
.an("array")
|
|
31
|
-
.not.empty;
|
|
32
|
-
},
|
|
33
|
-
);
|
|
34
|
-
},
|
|
35
|
-
);
|
|
36
|
-
},
|
|
37
|
-
);
|
package/tests/index.ts
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import "chai/register-should.js";
|
|
2
|
-
import { scopes } from "../../scope";
|
|
3
|
-
|
|
4
|
-
describe(
|
|
5
|
-
"Scopes",
|
|
6
|
-
() => {
|
|
7
|
-
describe(
|
|
8
|
-
"shape",
|
|
9
|
-
() => {
|
|
10
|
-
it(
|
|
11
|
-
"is a non-empty array",
|
|
12
|
-
() => {
|
|
13
|
-
scopes
|
|
14
|
-
.should.be
|
|
15
|
-
.an("array")
|
|
16
|
-
.not.empty;
|
|
17
|
-
},
|
|
18
|
-
);
|
|
19
|
-
},
|
|
20
|
-
);
|
|
21
|
-
describe(
|
|
22
|
-
"members",
|
|
23
|
-
() => {
|
|
24
|
-
it(
|
|
25
|
-
"are unique",
|
|
26
|
-
() => {
|
|
27
|
-
scopes
|
|
28
|
-
.length
|
|
29
|
-
.should
|
|
30
|
-
.equal(
|
|
31
|
-
new Set(scopes)
|
|
32
|
-
.size,
|
|
33
|
-
);
|
|
34
|
-
},
|
|
35
|
-
);
|
|
36
|
-
},
|
|
37
|
-
);
|
|
38
|
-
describe(
|
|
39
|
-
"order",
|
|
40
|
-
() => {
|
|
41
|
-
it(
|
|
42
|
-
"`jsoncc` > `jsonc` > `json`",
|
|
43
|
-
() => {
|
|
44
|
-
scopes
|
|
45
|
-
.should
|
|
46
|
-
.include
|
|
47
|
-
.members(
|
|
48
|
-
[
|
|
49
|
-
"jsoncc",
|
|
50
|
-
"jsonc",
|
|
51
|
-
"json",
|
|
52
|
-
],
|
|
53
|
-
);
|
|
54
|
-
scopes
|
|
55
|
-
.indexOf("jsoncc")
|
|
56
|
-
.should.be
|
|
57
|
-
.greaterThan(
|
|
58
|
-
scopes
|
|
59
|
-
.indexOf("jsonc"),
|
|
60
|
-
);
|
|
61
|
-
scopes
|
|
62
|
-
.indexOf("jsonc")
|
|
63
|
-
.should.be
|
|
64
|
-
.greaterThan(
|
|
65
|
-
scopes
|
|
66
|
-
.indexOf("json"),
|
|
67
|
-
);
|
|
68
|
-
},
|
|
69
|
-
);
|
|
70
|
-
it(
|
|
71
|
-
"`svelte` > `ts`",
|
|
72
|
-
() => {
|
|
73
|
-
scopes
|
|
74
|
-
.should
|
|
75
|
-
.include
|
|
76
|
-
.members(
|
|
77
|
-
[
|
|
78
|
-
"svelte",
|
|
79
|
-
"ts",
|
|
80
|
-
],
|
|
81
|
-
);
|
|
82
|
-
scopes
|
|
83
|
-
.indexOf("svelte")
|
|
84
|
-
.should.be
|
|
85
|
-
.greaterThan(
|
|
86
|
-
scopes
|
|
87
|
-
.indexOf("ts"),
|
|
88
|
-
);
|
|
89
|
-
},
|
|
90
|
-
);
|
|
91
|
-
it(
|
|
92
|
-
"`ts` > `js`",
|
|
93
|
-
() => {
|
|
94
|
-
scopes
|
|
95
|
-
.should
|
|
96
|
-
.include
|
|
97
|
-
.members(
|
|
98
|
-
[
|
|
99
|
-
"ts",
|
|
100
|
-
"js",
|
|
101
|
-
],
|
|
102
|
-
);
|
|
103
|
-
scopes
|
|
104
|
-
.indexOf("ts")
|
|
105
|
-
.should.be
|
|
106
|
-
.greaterThan(
|
|
107
|
-
scopes
|
|
108
|
-
.indexOf("js"),
|
|
109
|
-
);
|
|
110
|
-
},
|
|
111
|
-
);
|
|
112
|
-
},
|
|
113
|
-
);
|
|
114
|
-
},
|
|
115
|
-
);
|
package/tests/scope/tree.spec.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import "chai/register-should.js";
|
|
2
|
-
import { tree } from "../../scope/tree";
|
|
3
|
-
|
|
4
|
-
const nodes = tree.map(([scope]) => scope);
|
|
5
|
-
|
|
6
|
-
describe(
|
|
7
|
-
"Tree",
|
|
8
|
-
() => {
|
|
9
|
-
describe(
|
|
10
|
-
"shape",
|
|
11
|
-
() => {
|
|
12
|
-
it(
|
|
13
|
-
"is an array",
|
|
14
|
-
() => {
|
|
15
|
-
tree
|
|
16
|
-
.should.be
|
|
17
|
-
.an("array");
|
|
18
|
-
},
|
|
19
|
-
);
|
|
20
|
-
},
|
|
21
|
-
);
|
|
22
|
-
describe(
|
|
23
|
-
"members",
|
|
24
|
-
() => {
|
|
25
|
-
it(
|
|
26
|
-
"are unique",
|
|
27
|
-
() => {
|
|
28
|
-
tree
|
|
29
|
-
.length
|
|
30
|
-
.should
|
|
31
|
-
.equal(
|
|
32
|
-
new Set(nodes)
|
|
33
|
-
.size,
|
|
34
|
-
);
|
|
35
|
-
},
|
|
36
|
-
);
|
|
37
|
-
it(
|
|
38
|
-
"omit `js`",
|
|
39
|
-
() => {
|
|
40
|
-
nodes
|
|
41
|
-
.should
|
|
42
|
-
.not.include
|
|
43
|
-
.members(["js"]);
|
|
44
|
-
},
|
|
45
|
-
);
|
|
46
|
-
},
|
|
47
|
-
);
|
|
48
|
-
describe(
|
|
49
|
-
"order",
|
|
50
|
-
() => {
|
|
51
|
-
it(
|
|
52
|
-
"`jsoncc` < [`jsonc`]?",
|
|
53
|
-
() => {
|
|
54
|
-
nodes
|
|
55
|
-
.should
|
|
56
|
-
.include
|
|
57
|
-
.members(["jsoncc"]);
|
|
58
|
-
nodes
|
|
59
|
-
.indexOf("jsoncc")
|
|
60
|
-
.should.be
|
|
61
|
-
.lessThan(
|
|
62
|
-
nodes.indexOf("jsonc") * tree.length,
|
|
63
|
-
);
|
|
64
|
-
},
|
|
65
|
-
);
|
|
66
|
-
it(
|
|
67
|
-
"`svelte` < `ts`",
|
|
68
|
-
() => {
|
|
69
|
-
nodes
|
|
70
|
-
.should
|
|
71
|
-
.include
|
|
72
|
-
.members(
|
|
73
|
-
[
|
|
74
|
-
"svelte",
|
|
75
|
-
"ts",
|
|
76
|
-
],
|
|
77
|
-
);
|
|
78
|
-
nodes
|
|
79
|
-
.indexOf("svelte")
|
|
80
|
-
.should.be
|
|
81
|
-
.lessThan(
|
|
82
|
-
nodes
|
|
83
|
-
.indexOf("ts"),
|
|
84
|
-
);
|
|
85
|
-
},
|
|
86
|
-
);
|
|
87
|
-
it(
|
|
88
|
-
"`ts` is last",
|
|
89
|
-
() => {
|
|
90
|
-
nodes
|
|
91
|
-
.should
|
|
92
|
-
.include
|
|
93
|
-
.members(["ts"]);
|
|
94
|
-
nodes
|
|
95
|
-
.indexOf("ts")
|
|
96
|
-
.should
|
|
97
|
-
.equal(tree.length - 1);
|
|
98
|
-
},
|
|
99
|
-
);
|
|
100
|
-
},
|
|
101
|
-
);
|
|
102
|
-
},
|
|
103
|
-
);
|
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
|
-
}
|