@eslinted/core 22.1.4-rc.0 → 22.1.4-rc.3

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.
Files changed (43) hide show
  1. package/.github/workflows/RELEASE.yml +36 -36
  2. package/.github/workflows/rc.yml +36 -36
  3. package/.markdownlint.jsonc +128 -128
  4. package/.mocharc.yml +15 -15
  5. package/LICENSE +20 -20
  6. package/README.md +4 -4
  7. package/eslint.config.js +3 -3
  8. package/package.json +55 -56
  9. package/src/_test/index.ts +266 -266
  10. package/src/factory.ts +306 -306
  11. package/src/index.spec.ts +106 -106
  12. package/src/index.ts +87 -87
  13. package/src/interface/config/index.ts +42 -42
  14. package/src/interface/config/rule.ts +12 -12
  15. package/src/interface/index.ts +3 -3
  16. package/src/interface/input/configuration/attachment.ts +13 -13
  17. package/src/interface/input/configuration/defaults.ts +24 -24
  18. package/src/interface/input/configuration/extensions.ts +25 -25
  19. package/src/interface/input/configuration/index.ts +17 -17
  20. package/src/interface/input/configuration/manifest/index.ts +15 -15
  21. package/src/interface/input/configuration/settings.ts +18 -18
  22. package/src/interface/input/imports/index.ts +16 -16
  23. package/src/interface/input/imports/optional.ts +11 -11
  24. package/src/interface/input/imports/required.ts +13 -13
  25. package/src/interface/input/index.ts +22 -22
  26. package/src/interface/output/configs/attachment.ts +13 -13
  27. package/src/interface/output/configs/global/ignores.d.ts +6 -6
  28. package/src/interface/output/configs/global/index.d.ts +3 -3
  29. package/src/interface/output/configs/global/plugins.d.ts +6 -6
  30. package/src/interface/output/configs/global/settings.d.ts +11 -11
  31. package/src/interface/output/configs/index.d.ts +3 -3
  32. package/src/interface/output/configs/scoped/index.d.ts +2 -2
  33. package/src/interface/output/configs/scoped/rules.d.ts +12 -12
  34. package/src/interface/output/configs/scoped/settings.d.ts +15 -15
  35. package/src/interface/output/index.d.ts +12 -12
  36. package/src/scope/dependencies/index.ts +2 -2
  37. package/src/scope/dependencies/parsers.ts +5 -5
  38. package/src/scope/dependencies/plugins.ts +12 -12
  39. package/src/scope/index.spec.ts +136 -136
  40. package/src/scope/index.ts +18 -18
  41. package/src/scope/tree/index.spec.ts +124 -124
  42. package/src/scope/tree/index.ts +22 -22
  43. package/tsconfig.json +156 -156
@@ -1,136 +1,136 @@
1
- import "chai/register-should.js";
2
- import { scopes } from ".";
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 ".";
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,18 +1,18 @@
1
- export const scopes = [
2
- "js",
3
- "ts",
4
- "mocha",
5
- "svelte",
6
- "html",
7
- "css",
8
- "json",
9
- "jsonc",
10
- "jsoncc",
11
- "yml",
12
- ] as const;
13
- export const optionalScopes = ["svelte"] as const;
14
- export { tree } from "./tree";
15
- export type {
16
- RequiredPlugin,
17
- RequiredParser,
18
- } from "./dependencies";
1
+ export const scopes = [
2
+ "js",
3
+ "ts",
4
+ "mocha",
5
+ "svelte",
6
+ "html",
7
+ "css",
8
+ "json",
9
+ "jsonc",
10
+ "jsoncc",
11
+ "yml",
12
+ ] as const;
13
+ export const optionalScopes = ["svelte"] as const;
14
+ export { tree } from "./tree";
15
+ export type {
16
+ RequiredPlugin,
17
+ RequiredParser,
18
+ } from "./dependencies";
@@ -1,124 +1,124 @@
1
- import "chai/register-should.js";
2
- import { tree } from ".";
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 ".";
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,22 +1,22 @@
1
- export const tree = [
2
- [
3
- "jsoncc",
4
- ["jsonc"],
5
- ] as const,
6
- [
7
- "jsonc",
8
- ["json"],
9
- ] as const,
10
- [
11
- "mocha",
12
- ["ts"],
13
- ] as const,
14
- [
15
- "svelte",
16
- ["ts"],
17
- ] as const,
18
- [
19
- "ts",
20
- ["js"],
21
- ] as const,
22
- ];
1
+ export const tree = [
2
+ [
3
+ "jsoncc",
4
+ ["jsonc"],
5
+ ] as const,
6
+ [
7
+ "jsonc",
8
+ ["json"],
9
+ ] as const,
10
+ [
11
+ "mocha",
12
+ ["ts"],
13
+ ] as const,
14
+ [
15
+ "svelte",
16
+ ["ts"],
17
+ ] as const,
18
+ [
19
+ "ts",
20
+ ["js"],
21
+ ] as const,
22
+ ];