@eslinted/defaults 17.2.3 → 17.2.4

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 CHANGED
@@ -7,5 +7,5 @@
7
7
  # https://mochajs.org/#command-line-usage
8
8
 
9
9
  extension: [js]
10
- require: dist-tests/index.js
11
- spec: [dist-tests/**/*.spec.js]
10
+ require: dist/tests/index.js
11
+ spec: [dist/tests/**/*.spec.js]
@@ -0,0 +1,2 @@
1
+ export declare function mochaGlobalSetup(): void;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,8 @@
1
+ export function mochaGlobalSetup() {
2
+ try {
3
+ }
4
+ catch (error) {
5
+ throw Error("Failed to hook up Mocha", { cause: error });
6
+ }
7
+ }
8
+ //# sourceMappingURL=index.js.map
@@ -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,2 @@
1
+ export declare const scopes: readonly ["js", "ts", "mocha", "svelte", "html", "css", "json", "jsonc", "jsoncc", "yml"];
2
+ //# sourceMappingURL=index.scopes.spec.d.ts.map
@@ -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,13 @@
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
+ ];
13
+ //# sourceMappingURL=index.scopes.spec.js.map
@@ -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,2 @@
1
+ import "chai/register-should.js";
2
+ //# sourceMappingURL=index.spec.d.ts.map
@@ -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,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CAAC;yBACZ,IAAI;yBACJ,IAAI,CAAC,OAAO,CAAC;yBACb,IAAI;yBACJ,GAAG;yBACH,QAAQ,CAAC,OAAO,CAAC;yBACjB,EAAE,CAAC,QAAQ,CAAC,CAAC;oBAEhB,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;wBAC7C,IAAI;6BACD,MAAM;6BACN,EAAE;6BACF,CAAC,CAAC,QAAQ,CAAC,CAAC;wBAEf,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAiC,CAAoB,CAAC;wBAEjF,IAAI,OAAO,KAAK,KAAK,QAAQ;4BAC3B,KAAK;iCACF,MAAM;iCACN,EAAE;iCACF,EAAE,CAAC,OAAO,CAAC;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.4.1",
2
+ "$pkg": "2411.4.2",
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.3",
6
+ "version": "17.2.4",
7
7
  "repository": "github:jimmy-zhening-luo/linted-defaults",
8
8
  "description": "Default scopes for `linted`",
9
9
  "keywords": [],
@@ -35,7 +35,7 @@
35
35
  "lint": "eslint --cache --fix",
36
36
  "pretest": "npm run build",
37
37
  "test": "npm run --if-present test:suite",
38
- "test:suite": "tsc -b tests && ts-add-js-extension --showprogress=false --dir=dist-tests --include=dist && mocha",
38
+ "test:suite": "tsc -b tests && ts-add-js-extension --showprogress=false --dir=dist && mocha",
39
39
  "prestart": "npm run build",
40
40
  "start": "npm run start:ts",
41
41
  "start:ts": "node .",
@@ -1,5 +1,5 @@
1
1
  import "chai/register-should.js";
2
- import defaults from "../dist";
2
+ import defaults from "..";
3
3
  import { scopes } from "./index.scopes.spec";
4
4
 
5
5
  describe(
@@ -12,6 +12,6 @@
12
12
  ],
13
13
  "compilerOptions": {
14
14
  "rootDir": ".",
15
- "outDir": "../dist-tests",
15
+ "outDir": "../dist/tests",
16
16
  },
17
17
  }