@eslinted/defaults 19.6.0 → 19.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/package.json +1 -6
- 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/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.7.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/.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;iBACP,IAAI,CAAC,MAAM,CAAC,CAAC;QAClB,CAAC,CACF,CAAC;QACF,EAAE,CACA,WAAW,EACX,GAAG,EAAE;YACH,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;gBACtC,KAAK;qBACF,MAAM;qBACN,EAAE;qBACF,EAAE,CAAC,OAAO,CAAC,CAAC;QACnB,CAAC,CACF,CAAC;QACF,EAAE,C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
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
|
-
}
|