linted 33.6.1 → 33.7.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/.github/workflows/RELEASE.yml +35 -35
- package/.markdownlint.jsonc +97 -97
- package/.mocharc.yml +11 -11
- package/LICENSE +20 -20
- package/README.md +351 -351
- package/dist/imports/index.d.ts +5 -5
- package/dist/imports/index.d.ts.map +1 -1
- package/dist/imports/plugins.d.ts +367 -6
- package/dist/imports/plugins.d.ts.map +1 -1
- package/dist/imports/plugins.js +3 -3
- package/dist/imports/plugins.js.map +1 -1
- package/eslint.config.js +3 -3
- package/package.json +99 -99
- package/src/imports/index.ts +7 -7
- package/src/imports/parsers.ts +9 -9
- package/src/imports/plugins.ts +23 -23
- package/src/imports/tsconfig.json +11 -11
- package/src/index.ts +23 -23
- package/src/scope/index.ts +14 -14
- package/src/scope/tree.ts +22 -22
- package/src/scope/tsconfig.json +7 -7
- package/src/settings/css.ts +9 -9
- package/src/settings/html.ts +11 -11
- package/src/settings/index.ts +15 -15
- package/src/settings/json.ts +8 -8
- package/src/settings/svelte.ts +10 -10
- package/src/settings/ts.ts +27 -27
- package/src/settings/tsconfig.json +6 -6
- package/src/settings/yml.ts +6 -6
- package/src/tsconfig-src.json +8 -8
- package/src/tsconfig.json +20 -20
- package/tests/index.spec.ts +37 -37
- package/tests/index.ts +11 -11
- package/tests/scope/index.spec.ts +136 -136
- package/tests/scope/tree.spec.ts +124 -124
- package/tests/tsconfig.json +19 -19
- package/tsconfig-base.json +38 -38
- package/typings/chai.d.ts +6 -6
- package/typings/jsonc.d.ts +7 -7
- package/typings/tsconfig.json +7 -7
package/src/tsconfig-src.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../tsconfig-base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"rootDir": ".",
|
|
5
|
-
"outDir": "../dist",
|
|
6
|
-
"composite": true,
|
|
7
|
-
},
|
|
8
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig-base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"rootDir": ".",
|
|
5
|
+
"outDir": "../dist",
|
|
6
|
+
"composite": true,
|
|
7
|
+
},
|
|
8
|
+
}
|
package/src/tsconfig.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files": [
|
|
3
|
-
"index.ts",
|
|
4
|
-
],
|
|
5
|
-
"extends": "./tsconfig-src.json",
|
|
6
|
-
"include": [
|
|
7
|
-
"../typings/**/*",
|
|
8
|
-
],
|
|
9
|
-
"references": [
|
|
10
|
-
{
|
|
11
|
-
"path": "scope",
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"path": "imports",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"path": "settings",
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"files": [
|
|
3
|
+
"index.ts",
|
|
4
|
+
],
|
|
5
|
+
"extends": "./tsconfig-src.json",
|
|
6
|
+
"include": [
|
|
7
|
+
"../typings/**/*",
|
|
8
|
+
],
|
|
9
|
+
"references": [
|
|
10
|
+
{
|
|
11
|
+
"path": "scope",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"path": "imports",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "settings",
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
}
|
package/tests/index.spec.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import "chai/register-should.js";
|
|
2
|
-
import linted from "..";
|
|
3
|
-
|
|
4
|
-
const configs = linted();
|
|
5
|
-
|
|
6
|
-
describe(
|
|
7
|
-
"linted",
|
|
8
|
-
function () {
|
|
9
|
-
describe(
|
|
10
|
-
"shape",
|
|
11
|
-
function () {
|
|
12
|
-
it(
|
|
13
|
-
"is a function",
|
|
14
|
-
function () {
|
|
15
|
-
linted
|
|
16
|
-
.should.be
|
|
17
|
-
.a("function");
|
|
18
|
-
},
|
|
19
|
-
);
|
|
20
|
-
},
|
|
21
|
-
);
|
|
22
|
-
describe(
|
|
23
|
-
"output",
|
|
24
|
-
function () {
|
|
25
|
-
it(
|
|
26
|
-
"is a non-empty array",
|
|
27
|
-
function () {
|
|
28
|
-
configs
|
|
29
|
-
.should.be
|
|
30
|
-
.an("array")
|
|
31
|
-
.not.empty;
|
|
32
|
-
},
|
|
33
|
-
);
|
|
34
|
-
},
|
|
35
|
-
);
|
|
36
|
-
},
|
|
37
|
-
);
|
|
1
|
+
import "chai/register-should.js";
|
|
2
|
+
import linted from "..";
|
|
3
|
+
|
|
4
|
+
const configs = linted();
|
|
5
|
+
|
|
6
|
+
describe(
|
|
7
|
+
"linted",
|
|
8
|
+
function () {
|
|
9
|
+
describe(
|
|
10
|
+
"shape",
|
|
11
|
+
function () {
|
|
12
|
+
it(
|
|
13
|
+
"is a function",
|
|
14
|
+
function () {
|
|
15
|
+
linted
|
|
16
|
+
.should.be
|
|
17
|
+
.a("function");
|
|
18
|
+
},
|
|
19
|
+
);
|
|
20
|
+
},
|
|
21
|
+
);
|
|
22
|
+
describe(
|
|
23
|
+
"output",
|
|
24
|
+
function () {
|
|
25
|
+
it(
|
|
26
|
+
"is a non-empty array",
|
|
27
|
+
function () {
|
|
28
|
+
configs
|
|
29
|
+
.should.be
|
|
30
|
+
.an("array")
|
|
31
|
+
.not.empty;
|
|
32
|
+
},
|
|
33
|
+
);
|
|
34
|
+
},
|
|
35
|
+
);
|
|
36
|
+
},
|
|
37
|
+
);
|
package/tests/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export function mochaGlobalSetup() {
|
|
2
|
-
try {
|
|
3
|
-
//
|
|
4
|
-
}
|
|
5
|
-
catch (error) {
|
|
6
|
-
throw Error(
|
|
7
|
-
"Failed to hook up Mocha",
|
|
8
|
-
{ cause: error },
|
|
9
|
-
);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
export function mochaGlobalSetup() {
|
|
2
|
+
try {
|
|
3
|
+
//
|
|
4
|
+
}
|
|
5
|
+
catch (error) {
|
|
6
|
+
throw Error(
|
|
7
|
+
"Failed to hook up Mocha",
|
|
8
|
+
{ cause: error },
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
import "chai/register-should.js";
|
|
2
|
-
import { scopes } from "../../scope";
|
|
3
|
-
|
|
4
|
-
describe(
|
|
5
|
-
"Scopes",
|
|
6
|
-
function () {
|
|
7
|
-
describe(
|
|
8
|
-
"shape",
|
|
9
|
-
function () {
|
|
10
|
-
it(
|
|
11
|
-
"is a non-empty array",
|
|
12
|
-
function () {
|
|
13
|
-
scopes
|
|
14
|
-
.should.be
|
|
15
|
-
.an("array")
|
|
16
|
-
.not.empty;
|
|
17
|
-
},
|
|
18
|
-
);
|
|
19
|
-
},
|
|
20
|
-
);
|
|
21
|
-
describe(
|
|
22
|
-
"members",
|
|
23
|
-
function () {
|
|
24
|
-
it(
|
|
25
|
-
"are unique",
|
|
26
|
-
function () {
|
|
27
|
-
scopes
|
|
28
|
-
.length
|
|
29
|
-
.should
|
|
30
|
-
.equal(
|
|
31
|
-
new Set(scopes)
|
|
32
|
-
.size,
|
|
33
|
-
);
|
|
34
|
-
},
|
|
35
|
-
);
|
|
36
|
-
},
|
|
37
|
-
);
|
|
38
|
-
describe(
|
|
39
|
-
"order",
|
|
40
|
-
function () {
|
|
41
|
-
it(
|
|
42
|
-
"`jsoncc` > `jsonc` > `json`",
|
|
43
|
-
function () {
|
|
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
|
-
"`mocha` > `ts`",
|
|
72
|
-
function () {
|
|
73
|
-
scopes
|
|
74
|
-
.should
|
|
75
|
-
.include
|
|
76
|
-
.members(
|
|
77
|
-
[
|
|
78
|
-
"mocha",
|
|
79
|
-
"ts",
|
|
80
|
-
],
|
|
81
|
-
);
|
|
82
|
-
scopes
|
|
83
|
-
.indexOf("mocha")
|
|
84
|
-
.should.be
|
|
85
|
-
.greaterThan(
|
|
86
|
-
scopes
|
|
87
|
-
.indexOf("ts"),
|
|
88
|
-
);
|
|
89
|
-
},
|
|
90
|
-
);
|
|
91
|
-
it(
|
|
92
|
-
"`svelte` > `ts`",
|
|
93
|
-
function () {
|
|
94
|
-
scopes
|
|
95
|
-
.should
|
|
96
|
-
.include
|
|
97
|
-
.members(
|
|
98
|
-
[
|
|
99
|
-
"svelte",
|
|
100
|
-
"ts",
|
|
101
|
-
],
|
|
102
|
-
);
|
|
103
|
-
scopes
|
|
104
|
-
.indexOf("svelte")
|
|
105
|
-
.should.be
|
|
106
|
-
.greaterThan(
|
|
107
|
-
scopes
|
|
108
|
-
.indexOf("ts"),
|
|
109
|
-
);
|
|
110
|
-
},
|
|
111
|
-
);
|
|
112
|
-
it(
|
|
113
|
-
"`ts` > `js`",
|
|
114
|
-
function () {
|
|
115
|
-
scopes
|
|
116
|
-
.should
|
|
117
|
-
.include
|
|
118
|
-
.members(
|
|
119
|
-
[
|
|
120
|
-
"ts",
|
|
121
|
-
"js",
|
|
122
|
-
],
|
|
123
|
-
);
|
|
124
|
-
scopes
|
|
125
|
-
.indexOf("ts")
|
|
126
|
-
.should.be
|
|
127
|
-
.greaterThan(
|
|
128
|
-
scopes
|
|
129
|
-
.indexOf("js"),
|
|
130
|
-
);
|
|
131
|
-
},
|
|
132
|
-
);
|
|
133
|
-
},
|
|
134
|
-
);
|
|
135
|
-
},
|
|
136
|
-
);
|
|
1
|
+
import "chai/register-should.js";
|
|
2
|
+
import { scopes } from "../../scope";
|
|
3
|
+
|
|
4
|
+
describe(
|
|
5
|
+
"Scopes",
|
|
6
|
+
function () {
|
|
7
|
+
describe(
|
|
8
|
+
"shape",
|
|
9
|
+
function () {
|
|
10
|
+
it(
|
|
11
|
+
"is a non-empty array",
|
|
12
|
+
function () {
|
|
13
|
+
scopes
|
|
14
|
+
.should.be
|
|
15
|
+
.an("array")
|
|
16
|
+
.not.empty;
|
|
17
|
+
},
|
|
18
|
+
);
|
|
19
|
+
},
|
|
20
|
+
);
|
|
21
|
+
describe(
|
|
22
|
+
"members",
|
|
23
|
+
function () {
|
|
24
|
+
it(
|
|
25
|
+
"are unique",
|
|
26
|
+
function () {
|
|
27
|
+
scopes
|
|
28
|
+
.length
|
|
29
|
+
.should
|
|
30
|
+
.equal(
|
|
31
|
+
new Set(scopes)
|
|
32
|
+
.size,
|
|
33
|
+
);
|
|
34
|
+
},
|
|
35
|
+
);
|
|
36
|
+
},
|
|
37
|
+
);
|
|
38
|
+
describe(
|
|
39
|
+
"order",
|
|
40
|
+
function () {
|
|
41
|
+
it(
|
|
42
|
+
"`jsoncc` > `jsonc` > `json`",
|
|
43
|
+
function () {
|
|
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
|
+
"`mocha` > `ts`",
|
|
72
|
+
function () {
|
|
73
|
+
scopes
|
|
74
|
+
.should
|
|
75
|
+
.include
|
|
76
|
+
.members(
|
|
77
|
+
[
|
|
78
|
+
"mocha",
|
|
79
|
+
"ts",
|
|
80
|
+
],
|
|
81
|
+
);
|
|
82
|
+
scopes
|
|
83
|
+
.indexOf("mocha")
|
|
84
|
+
.should.be
|
|
85
|
+
.greaterThan(
|
|
86
|
+
scopes
|
|
87
|
+
.indexOf("ts"),
|
|
88
|
+
);
|
|
89
|
+
},
|
|
90
|
+
);
|
|
91
|
+
it(
|
|
92
|
+
"`svelte` > `ts`",
|
|
93
|
+
function () {
|
|
94
|
+
scopes
|
|
95
|
+
.should
|
|
96
|
+
.include
|
|
97
|
+
.members(
|
|
98
|
+
[
|
|
99
|
+
"svelte",
|
|
100
|
+
"ts",
|
|
101
|
+
],
|
|
102
|
+
);
|
|
103
|
+
scopes
|
|
104
|
+
.indexOf("svelte")
|
|
105
|
+
.should.be
|
|
106
|
+
.greaterThan(
|
|
107
|
+
scopes
|
|
108
|
+
.indexOf("ts"),
|
|
109
|
+
);
|
|
110
|
+
},
|
|
111
|
+
);
|
|
112
|
+
it(
|
|
113
|
+
"`ts` > `js`",
|
|
114
|
+
function () {
|
|
115
|
+
scopes
|
|
116
|
+
.should
|
|
117
|
+
.include
|
|
118
|
+
.members(
|
|
119
|
+
[
|
|
120
|
+
"ts",
|
|
121
|
+
"js",
|
|
122
|
+
],
|
|
123
|
+
);
|
|
124
|
+
scopes
|
|
125
|
+
.indexOf("ts")
|
|
126
|
+
.should.be
|
|
127
|
+
.greaterThan(
|
|
128
|
+
scopes
|
|
129
|
+
.indexOf("js"),
|
|
130
|
+
);
|
|
131
|
+
},
|
|
132
|
+
);
|
|
133
|
+
},
|
|
134
|
+
);
|
|
135
|
+
},
|
|
136
|
+
);
|
package/tests/scope/tree.spec.ts
CHANGED
|
@@ -1,124 +1,124 @@
|
|
|
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
|
-
function () {
|
|
9
|
-
describe(
|
|
10
|
-
"shape",
|
|
11
|
-
function () {
|
|
12
|
-
it(
|
|
13
|
-
"is an array",
|
|
14
|
-
function () {
|
|
15
|
-
tree
|
|
16
|
-
.should.be
|
|
17
|
-
.an("array");
|
|
18
|
-
},
|
|
19
|
-
);
|
|
20
|
-
},
|
|
21
|
-
);
|
|
22
|
-
describe(
|
|
23
|
-
"members",
|
|
24
|
-
function () {
|
|
25
|
-
it(
|
|
26
|
-
"are unique",
|
|
27
|
-
function () {
|
|
28
|
-
tree
|
|
29
|
-
.length
|
|
30
|
-
.should
|
|
31
|
-
.equal(
|
|
32
|
-
new Set(nodes)
|
|
33
|
-
.size,
|
|
34
|
-
);
|
|
35
|
-
},
|
|
36
|
-
);
|
|
37
|
-
it(
|
|
38
|
-
"omit `js`",
|
|
39
|
-
function () {
|
|
40
|
-
nodes
|
|
41
|
-
.should
|
|
42
|
-
.not.include
|
|
43
|
-
.members(["js"]);
|
|
44
|
-
},
|
|
45
|
-
);
|
|
46
|
-
},
|
|
47
|
-
);
|
|
48
|
-
describe(
|
|
49
|
-
"order",
|
|
50
|
-
function () {
|
|
51
|
-
it(
|
|
52
|
-
"`jsoncc` < [`jsonc`]?",
|
|
53
|
-
function () {
|
|
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
|
-
"`mocha` < `ts`",
|
|
68
|
-
function () {
|
|
69
|
-
nodes
|
|
70
|
-
.should
|
|
71
|
-
.include
|
|
72
|
-
.members(
|
|
73
|
-
[
|
|
74
|
-
"mocha",
|
|
75
|
-
"ts",
|
|
76
|
-
],
|
|
77
|
-
);
|
|
78
|
-
nodes
|
|
79
|
-
.indexOf("mocha")
|
|
80
|
-
.should.be
|
|
81
|
-
.lessThan(
|
|
82
|
-
nodes
|
|
83
|
-
.indexOf("ts"),
|
|
84
|
-
);
|
|
85
|
-
},
|
|
86
|
-
);
|
|
87
|
-
it(
|
|
88
|
-
"`svelte` < `ts`",
|
|
89
|
-
function () {
|
|
90
|
-
nodes
|
|
91
|
-
.should
|
|
92
|
-
.include
|
|
93
|
-
.members(
|
|
94
|
-
[
|
|
95
|
-
"svelte",
|
|
96
|
-
"ts",
|
|
97
|
-
],
|
|
98
|
-
);
|
|
99
|
-
nodes
|
|
100
|
-
.indexOf("svelte")
|
|
101
|
-
.should.be
|
|
102
|
-
.lessThan(
|
|
103
|
-
nodes
|
|
104
|
-
.indexOf("ts"),
|
|
105
|
-
);
|
|
106
|
-
},
|
|
107
|
-
);
|
|
108
|
-
it(
|
|
109
|
-
"`ts` is last",
|
|
110
|
-
function () {
|
|
111
|
-
nodes
|
|
112
|
-
.should
|
|
113
|
-
.include
|
|
114
|
-
.members(["ts"]);
|
|
115
|
-
nodes
|
|
116
|
-
.indexOf("ts")
|
|
117
|
-
.should
|
|
118
|
-
.equal(tree.length - 1);
|
|
119
|
-
},
|
|
120
|
-
);
|
|
121
|
-
},
|
|
122
|
-
);
|
|
123
|
-
},
|
|
124
|
-
);
|
|
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
|
+
function () {
|
|
9
|
+
describe(
|
|
10
|
+
"shape",
|
|
11
|
+
function () {
|
|
12
|
+
it(
|
|
13
|
+
"is an array",
|
|
14
|
+
function () {
|
|
15
|
+
tree
|
|
16
|
+
.should.be
|
|
17
|
+
.an("array");
|
|
18
|
+
},
|
|
19
|
+
);
|
|
20
|
+
},
|
|
21
|
+
);
|
|
22
|
+
describe(
|
|
23
|
+
"members",
|
|
24
|
+
function () {
|
|
25
|
+
it(
|
|
26
|
+
"are unique",
|
|
27
|
+
function () {
|
|
28
|
+
tree
|
|
29
|
+
.length
|
|
30
|
+
.should
|
|
31
|
+
.equal(
|
|
32
|
+
new Set(nodes)
|
|
33
|
+
.size,
|
|
34
|
+
);
|
|
35
|
+
},
|
|
36
|
+
);
|
|
37
|
+
it(
|
|
38
|
+
"omit `js`",
|
|
39
|
+
function () {
|
|
40
|
+
nodes
|
|
41
|
+
.should
|
|
42
|
+
.not.include
|
|
43
|
+
.members(["js"]);
|
|
44
|
+
},
|
|
45
|
+
);
|
|
46
|
+
},
|
|
47
|
+
);
|
|
48
|
+
describe(
|
|
49
|
+
"order",
|
|
50
|
+
function () {
|
|
51
|
+
it(
|
|
52
|
+
"`jsoncc` < [`jsonc`]?",
|
|
53
|
+
function () {
|
|
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
|
+
"`mocha` < `ts`",
|
|
68
|
+
function () {
|
|
69
|
+
nodes
|
|
70
|
+
.should
|
|
71
|
+
.include
|
|
72
|
+
.members(
|
|
73
|
+
[
|
|
74
|
+
"mocha",
|
|
75
|
+
"ts",
|
|
76
|
+
],
|
|
77
|
+
);
|
|
78
|
+
nodes
|
|
79
|
+
.indexOf("mocha")
|
|
80
|
+
.should.be
|
|
81
|
+
.lessThan(
|
|
82
|
+
nodes
|
|
83
|
+
.indexOf("ts"),
|
|
84
|
+
);
|
|
85
|
+
},
|
|
86
|
+
);
|
|
87
|
+
it(
|
|
88
|
+
"`svelte` < `ts`",
|
|
89
|
+
function () {
|
|
90
|
+
nodes
|
|
91
|
+
.should
|
|
92
|
+
.include
|
|
93
|
+
.members(
|
|
94
|
+
[
|
|
95
|
+
"svelte",
|
|
96
|
+
"ts",
|
|
97
|
+
],
|
|
98
|
+
);
|
|
99
|
+
nodes
|
|
100
|
+
.indexOf("svelte")
|
|
101
|
+
.should.be
|
|
102
|
+
.lessThan(
|
|
103
|
+
nodes
|
|
104
|
+
.indexOf("ts"),
|
|
105
|
+
);
|
|
106
|
+
},
|
|
107
|
+
);
|
|
108
|
+
it(
|
|
109
|
+
"`ts` is last",
|
|
110
|
+
function () {
|
|
111
|
+
nodes
|
|
112
|
+
.should
|
|
113
|
+
.include
|
|
114
|
+
.members(["ts"]);
|
|
115
|
+
nodes
|
|
116
|
+
.indexOf("ts")
|
|
117
|
+
.should
|
|
118
|
+
.equal(tree.length - 1);
|
|
119
|
+
},
|
|
120
|
+
);
|
|
121
|
+
},
|
|
122
|
+
);
|
|
123
|
+
},
|
|
124
|
+
);
|