linted 33.7.0 → 33.7.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/.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.map +1 -1
- package/dist/imports/plugins.d.ts.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/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
|
+
);
|
package/tests/tsconfig.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../tsconfig-base.json",
|
|
3
|
-
"include": [
|
|
4
|
-
"../typings/**/*",
|
|
5
|
-
"**/*",
|
|
6
|
-
],
|
|
7
|
-
"references": [
|
|
8
|
-
{
|
|
9
|
-
"path": "../src",
|
|
10
|
-
},
|
|
11
|
-
],
|
|
12
|
-
"compilerOptions": {
|
|
13
|
-
"rootDirs": [
|
|
14
|
-
"..",
|
|
15
|
-
"../src",
|
|
16
|
-
],
|
|
17
|
-
"outDir": "../dist/tests",
|
|
18
|
-
},
|
|
19
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig-base.json",
|
|
3
|
+
"include": [
|
|
4
|
+
"../typings/**/*",
|
|
5
|
+
"**/*",
|
|
6
|
+
],
|
|
7
|
+
"references": [
|
|
8
|
+
{
|
|
9
|
+
"path": "../src",
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
"compilerOptions": {
|
|
13
|
+
"rootDirs": [
|
|
14
|
+
"..",
|
|
15
|
+
"../src",
|
|
16
|
+
],
|
|
17
|
+
"outDir": "../dist/tests",
|
|
18
|
+
},
|
|
19
|
+
}
|
package/tsconfig-base.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
{
|
|
2
|
-
"display": "tsc@509.6.0",
|
|
3
|
-
"$help": "https://aka.ms/tsconfig/#quick-nav-Top%20Level",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"allowUnreachableCode": false,
|
|
6
|
-
"allowUnusedLabels": false,
|
|
7
|
-
"exactOptionalPropertyTypes": true,
|
|
8
|
-
"noFallthroughCasesInSwitch": true,
|
|
9
|
-
"noImplicitOverride": true,
|
|
10
|
-
"noImplicitReturns": true,
|
|
11
|
-
"noPropertyAccessFromIndexSignature": true,
|
|
12
|
-
"noUncheckedIndexedAccess": true,
|
|
13
|
-
"noUnusedLocals": true,
|
|
14
|
-
"noUnusedParameters": true,
|
|
15
|
-
"strict": true,
|
|
16
|
-
"allowArbitraryExtensions": true,
|
|
17
|
-
"module": "esnext",
|
|
18
|
-
"moduleResolution": "bundler",
|
|
19
|
-
"rewriteRelativeImportExtensions": true,
|
|
20
|
-
"types": [
|
|
21
|
-
"mocha",
|
|
22
|
-
"chai",
|
|
23
|
-
/* {CONFIGURE} */
|
|
24
|
-
],
|
|
25
|
-
"declaration": true,
|
|
26
|
-
"declarationMap": true,
|
|
27
|
-
"noEmitOnError": true,
|
|
28
|
-
"removeComments": true,
|
|
29
|
-
"sourceMap": true,
|
|
30
|
-
// "verbatimModuleSyntax": true,
|
|
31
|
-
"lib": [
|
|
32
|
-
"esnext",
|
|
33
|
-
/* {CONFIGURE} */
|
|
34
|
-
],
|
|
35
|
-
"target": "esnext",
|
|
36
|
-
// "skipLibCheck": true,
|
|
37
|
-
},
|
|
38
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"display": "tsc@509.6.0",
|
|
3
|
+
"$help": "https://aka.ms/tsconfig/#quick-nav-Top%20Level",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"allowUnreachableCode": false,
|
|
6
|
+
"allowUnusedLabels": false,
|
|
7
|
+
"exactOptionalPropertyTypes": true,
|
|
8
|
+
"noFallthroughCasesInSwitch": true,
|
|
9
|
+
"noImplicitOverride": true,
|
|
10
|
+
"noImplicitReturns": true,
|
|
11
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
12
|
+
"noUncheckedIndexedAccess": true,
|
|
13
|
+
"noUnusedLocals": true,
|
|
14
|
+
"noUnusedParameters": true,
|
|
15
|
+
"strict": true,
|
|
16
|
+
"allowArbitraryExtensions": true,
|
|
17
|
+
"module": "esnext",
|
|
18
|
+
"moduleResolution": "bundler",
|
|
19
|
+
"rewriteRelativeImportExtensions": true,
|
|
20
|
+
"types": [
|
|
21
|
+
"mocha",
|
|
22
|
+
"chai",
|
|
23
|
+
/* {CONFIGURE} */
|
|
24
|
+
],
|
|
25
|
+
"declaration": true,
|
|
26
|
+
"declarationMap": true,
|
|
27
|
+
"noEmitOnError": true,
|
|
28
|
+
"removeComments": true,
|
|
29
|
+
"sourceMap": true,
|
|
30
|
+
// "verbatimModuleSyntax": true,
|
|
31
|
+
"lib": [
|
|
32
|
+
"esnext",
|
|
33
|
+
/* {CONFIGURE} */
|
|
34
|
+
],
|
|
35
|
+
"target": "esnext",
|
|
36
|
+
// "skipLibCheck": true,
|
|
37
|
+
},
|
|
38
|
+
}
|
package/typings/chai.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare module "eslint-plugin-chai-friendly" {
|
|
2
|
-
export const configs: unknown;
|
|
3
|
-
}
|
|
4
|
-
declare module "eslint-plugin-chai-expect" {
|
|
5
|
-
export const configs: unknown;
|
|
6
|
-
}
|
|
1
|
+
declare module "eslint-plugin-chai-friendly" {
|
|
2
|
+
export const configs: unknown;
|
|
3
|
+
}
|
|
4
|
+
declare module "eslint-plugin-chai-expect" {
|
|
5
|
+
export const configs: unknown;
|
|
6
|
+
}
|
package/typings/jsonc.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare module "eslint-plugin-jsonc/meta" {
|
|
2
|
-
}
|
|
3
|
-
declare module "eslint-plugin-jsonc/types" {
|
|
4
|
-
export interface RuleModule<RuleOptions = unknown[]> {
|
|
5
|
-
foo: RuleOptions;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
1
|
+
declare module "eslint-plugin-jsonc/meta" {
|
|
2
|
+
}
|
|
3
|
+
declare module "eslint-plugin-jsonc/types" {
|
|
4
|
+
export interface RuleModule<RuleOptions = unknown[]> {
|
|
5
|
+
foo: RuleOptions;
|
|
6
|
+
}
|
|
7
|
+
}
|
package/typings/tsconfig.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../tsconfig-base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"composite": true,
|
|
5
|
-
"tsBuildInfoFile": "../dist/types.tsbuildinfo",
|
|
6
|
-
},
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig-base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"composite": true,
|
|
5
|
+
"tsBuildInfoFile": "../dist/types.tsbuildinfo",
|
|
6
|
+
},
|
|
7
|
+
}
|