@eslinted/defaults 17.2.3 → 17.2.5
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/.mocharc.yml +2 -2
- package/dist/tests/index.d.ts +2 -0
- package/dist/tests/index.d.ts.map +1 -0
- package/dist/tests/index.js +8 -0
- package/dist/tests/index.js.map +1 -0
- package/dist/tests/index.scopes.spec.d.ts +2 -0
- package/dist/tests/index.scopes.spec.d.ts.map +1 -0
- package/dist/tests/index.scopes.spec.js +13 -0
- package/dist/tests/index.scopes.spec.js.map +1 -0
- package/dist/tests/index.spec.d.ts +2 -0
- package/dist/tests/index.spec.d.ts.map +1 -0
- package/dist/tests/index.spec.js +126 -0
- package/dist/tests/index.spec.js.map +1 -0
- package/package.json +5 -4
- package/src/tsconfig.json +7 -2
- package/tests/index.spec.ts +1 -1
- package/tests/tsconfig.json +6 -5
- package/tsconfig-base.json +18 -2
- package/typings/tsconfig.json +5 -4
- package/tsconfig.json +0 -31
package/.mocharc.yml
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../tests/index.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,SAU/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../tests/index.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB;IAC9B,IAAI,CAAC;IAEL,CAAC;IACD,OAAO,KAAK,EAAE,CAAC;QACb,MAAM,KAAK,CACT,yBAAyB,EACzB,EAAE,KAAK,EAAE,KAAK,EAAE,CACjB,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.scopes.spec.d.ts","sourceRoot":"","sources":["../../tests/index.scopes.spec.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,2FAWT,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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;IACJ,OAAO;IACP,QAAQ;IACR,MAAM;IACN,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,KAAK;CACG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../../tests/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import "chai/register-should.js";
|
|
2
|
+
import defaults from "../index.js";
|
|
3
|
+
import { scopes } from "./index.scopes.spec.js";
|
|
4
|
+
describe("Main Export", function () {
|
|
5
|
+
const GLOBAL = "*", { ignores, files, rules, } = defaults;
|
|
6
|
+
describe("module", function () {
|
|
7
|
+
it("with object submodules: files, ignores, rules", function () {
|
|
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", function () {
|
|
23
|
+
it("only has all scopes", function () {
|
|
24
|
+
files
|
|
25
|
+
.should
|
|
26
|
+
.have
|
|
27
|
+
.keys(scopes);
|
|
28
|
+
});
|
|
29
|
+
it("of arrays", function () {
|
|
30
|
+
for (const scope of Object.values(files))
|
|
31
|
+
scope
|
|
32
|
+
.should
|
|
33
|
+
.be
|
|
34
|
+
.an("array");
|
|
35
|
+
});
|
|
36
|
+
it("of expanded strings", function () {
|
|
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", function () {
|
|
52
|
+
it("only has globals and any scopes", function () {
|
|
53
|
+
ignores
|
|
54
|
+
.should
|
|
55
|
+
.have
|
|
56
|
+
.keys(GLOBAL, ...new Set(scopes).intersection(new Set(Object.keys(ignores))));
|
|
57
|
+
});
|
|
58
|
+
it("of arrays", function () {
|
|
59
|
+
for (const scope of Object.values(ignores))
|
|
60
|
+
scope
|
|
61
|
+
.should
|
|
62
|
+
.be
|
|
63
|
+
.an("array");
|
|
64
|
+
});
|
|
65
|
+
it("of expanded strings", function () {
|
|
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", function () {
|
|
81
|
+
it("only has all scopes", function () {
|
|
82
|
+
rules
|
|
83
|
+
.should
|
|
84
|
+
.have
|
|
85
|
+
.keys(scopes);
|
|
86
|
+
});
|
|
87
|
+
it("of arrays", function () {
|
|
88
|
+
for (const scope of Object.values(rules))
|
|
89
|
+
scope
|
|
90
|
+
.should
|
|
91
|
+
.be
|
|
92
|
+
.an("array");
|
|
93
|
+
});
|
|
94
|
+
it("of rule config objects", function () {
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;IACE,MAAM,MAAM,GAAG,GAAG,EAClB,EACE,OAAO,EACP,KAAK,EACL,KAAK,GACN,GAAG,QAAQ,CAAC;IAEb,QAAQ,CACN,QAAQ,EACR;QACE,EAAE,CACA,+CAA+C,EAC/C;YACE,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;QACE,EAAE,CACA,qBAAqB,EACrB;YACE,KAAK;iBACF,MAAM;iBACN,IAAI;iBACJ,IAAI,C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;iCACX,IAAI;iCACJ,QAAQ,CAAC,GAAG,CAAC;iCACb,CAAC,CAAC,QAAQ,CAAC,CAAC;oBACnB,CAAC;gBACH,CAAC;QACL,CAAC,CACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC,CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$pkg": "2411.
|
|
2
|
+
"$pkg": "2411.5.0",
|
|
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": "17.2.
|
|
6
|
+
"version": "17.2.5",
|
|
7
7
|
"repository": "github:jimmy-zhening-luo/linted-defaults",
|
|
8
8
|
"description": "Default scopes for `linted`",
|
|
9
9
|
"keywords": [],
|
|
@@ -33,9 +33,10 @@
|
|
|
33
33
|
"postbuild:ts": "npm run --if-present stage && ts-add-js-extension --showprogress=false --dir=dist",
|
|
34
34
|
"postbuild": "npm run lint || exit 0",
|
|
35
35
|
"lint": "eslint --cache --fix",
|
|
36
|
-
"pretest": "npm run build",
|
|
36
|
+
"pretest": "npm run --ignore-scripts build",
|
|
37
37
|
"test": "npm run --if-present test:suite",
|
|
38
|
-
"test:suite": "tsc -b tests && ts-add-js-extension --showprogress=false --dir=dist
|
|
38
|
+
"test:suite": "tsc -b tests && ts-add-js-extension --showprogress=false --dir=dist && mocha",
|
|
39
|
+
"posttest": "npm run postbuild",
|
|
39
40
|
"prestart": "npm run build",
|
|
40
41
|
"start": "npm run start:ts",
|
|
41
42
|
"start:ts": "node .",
|
package/src/tsconfig.json
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "../tsconfig.json",
|
|
2
|
+
"extends": "../tsconfig-base.json",
|
|
3
3
|
"include": [
|
|
4
4
|
"../typings/**/*",
|
|
5
5
|
"**/*",
|
|
6
6
|
],
|
|
7
|
+
"references": [
|
|
8
|
+
{
|
|
9
|
+
"path": "../typings",
|
|
10
|
+
},
|
|
11
|
+
],
|
|
7
12
|
"compilerOptions": {
|
|
8
|
-
"rootDir": ".",
|
|
9
13
|
"outDir": "../dist",
|
|
14
|
+
"composite": true,
|
|
10
15
|
},
|
|
11
16
|
}
|
package/tests/index.spec.ts
CHANGED
package/tests/tsconfig.json
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "../tsconfig.json",
|
|
2
|
+
"extends": "../tsconfig-base.json",
|
|
3
3
|
"include": [
|
|
4
|
-
"../src/**/*",
|
|
5
4
|
"../typings/**/*",
|
|
6
5
|
"**/*",
|
|
7
6
|
],
|
|
8
7
|
"references": [
|
|
9
8
|
{
|
|
10
|
-
"path": "../src
|
|
9
|
+
"path": "../src",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"path": "../typings",
|
|
11
13
|
},
|
|
12
14
|
],
|
|
13
15
|
"compilerOptions": {
|
|
14
|
-
"
|
|
15
|
-
"outDir": "../dist-tests",
|
|
16
|
+
"outDir": "../dist/tests",
|
|
16
17
|
},
|
|
17
18
|
}
|
package/tsconfig-base.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"display": "tsc@509.
|
|
2
|
+
"display": "tsc@509.5.0",
|
|
3
3
|
"$help": "https://aka.ms/tsconfig/#quick-nav-Top%20Level",
|
|
4
4
|
"compilerOptions": {
|
|
5
5
|
"allowUnreachableCode": false,
|
|
@@ -17,11 +17,27 @@
|
|
|
17
17
|
"module": "esnext",
|
|
18
18
|
"moduleResolution": "bundler",
|
|
19
19
|
"rewriteRelativeImportExtensions": true,
|
|
20
|
+
"rootDirs": [
|
|
21
|
+
"src",
|
|
22
|
+
"typings",
|
|
23
|
+
"./",
|
|
24
|
+
],
|
|
25
|
+
"types": [
|
|
26
|
+
"mocha",
|
|
27
|
+
"chai",
|
|
28
|
+
/* {CONFIGURE} */
|
|
29
|
+
],
|
|
30
|
+
"declaration": true,
|
|
20
31
|
"declarationMap": true,
|
|
21
32
|
"noEmitOnError": true,
|
|
22
33
|
"removeComments": true,
|
|
23
34
|
"sourceMap": true,
|
|
35
|
+
// "verbatimModuleSyntax": true,
|
|
36
|
+
"lib": [
|
|
37
|
+
"esnext",
|
|
38
|
+
/* {CONFIGURE} */
|
|
39
|
+
],
|
|
24
40
|
"target": "esnext",
|
|
25
|
-
"
|
|
41
|
+
// "skipLibCheck": true,
|
|
26
42
|
},
|
|
27
43
|
}
|
package/typings/tsconfig.json
CHANGED
package/tsconfig.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files": [],
|
|
3
|
-
"extends": "./tsconfig-base.json",
|
|
4
|
-
"references": [
|
|
5
|
-
{
|
|
6
|
-
"path": "src/tsconfig.json",
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"path": "tests/tsconfig.json",
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"path": "typings/tsconfig.json",
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
"compilerOptions": {
|
|
16
|
-
"types": [
|
|
17
|
-
"mocha",
|
|
18
|
-
"chai",
|
|
19
|
-
/* {CONFIGURE} */
|
|
20
|
-
],
|
|
21
|
-
// "declaration": true,
|
|
22
|
-
// "sourceMap": false,
|
|
23
|
-
// "verbatimModuleSyntax": true,
|
|
24
|
-
"lib": [
|
|
25
|
-
"esnext",
|
|
26
|
-
/* {CONFIGURE} */
|
|
27
|
-
],
|
|
28
|
-
// "composite": false,
|
|
29
|
-
// "skipLibCheck": true,
|
|
30
|
-
},
|
|
31
|
-
}
|