@eslinted/defaults 19.5.2 → 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/dist/index.d.ts CHANGED
@@ -937,6 +937,7 @@ declare const _default: {
937
937
  readonly "html/no-duplicate-id": import("./rules/state.js").State.WARN;
938
938
  readonly "html/no-duplicate-in-head": import("./rules/state.js").State.WARN;
939
939
  readonly "html/no-ineffective-attrs": import("./rules/state.js").State.WARN;
940
+ readonly "html/no-invalid-attr-value": import("./rules/state.js").State.ON;
940
941
  readonly "html/no-invalid-entity": import("./rules/state.js").State.ON;
941
942
  readonly "html/no-nested-interactive": import("./rules/state.js").State.WARN;
942
943
  readonly "html/no-obsolete-tags": import("./rules/state.js").State.WARN;
@@ -959,6 +960,7 @@ declare const _default: {
959
960
  readonly "html/no-invalid-role": import("./rules/state.js").State.WARN;
960
961
  readonly "html/no-non-scalable-viewport": import("./rules/state.js").State.WARN;
961
962
  readonly "html/no-positive-tabindex": import("./rules/state.js").State.WARN;
963
+ readonly "html/no-redundant-role": import("./rules/state.js").State.WARN;
962
964
  readonly "html/require-form-method": import("./rules/state.js").State.WARN;
963
965
  readonly "html/require-frame-title": import("./rules/state.js").State.WARN;
964
966
  readonly "html/require-img-alt": import("./rules/state.js").State.WARN;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBAIE"}
@@ -7,6 +7,7 @@ declare const _default: {
7
7
  readonly "html/no-duplicate-id": State.WARN;
8
8
  readonly "html/no-duplicate-in-head": State.WARN;
9
9
  readonly "html/no-ineffective-attrs": State.WARN;
10
+ readonly "html/no-invalid-attr-value": State.ON;
10
11
  readonly "html/no-invalid-entity": State.ON;
11
12
  readonly "html/no-nested-interactive": State.WARN;
12
13
  readonly "html/no-obsolete-tags": State.WARN;
@@ -29,6 +30,7 @@ declare const _default: {
29
30
  readonly "html/no-invalid-role": State.WARN;
30
31
  readonly "html/no-non-scalable-viewport": State.WARN;
31
32
  readonly "html/no-positive-tabindex": State.WARN;
33
+ readonly "html/no-redundant-role": State.WARN;
32
34
  readonly "html/require-form-method": State.WARN;
33
35
  readonly "html/require-frame-title": State.WARN;
34
36
  readonly "html/require-img-alt": State.WARN;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rules/html/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGjC,wBA6EE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rules/html/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGjC,wBA+EE"}
@@ -7,6 +7,7 @@ export default [
7
7
  "html/no-duplicate-id": 1,
8
8
  "html/no-duplicate-in-head": 1,
9
9
  "html/no-ineffective-attrs": 1,
10
+ "html/no-invalid-attr-value": 2,
10
11
  "html/no-invalid-entity": 2,
11
12
  "html/no-nested-interactive": 1,
12
13
  "html/no-obsolete-tags": 1,
@@ -29,6 +30,7 @@ export default [
29
30
  "html/no-invalid-role": 1,
30
31
  "html/no-non-scalable-viewport": 1,
31
32
  "html/no-positive-tabindex": 1,
33
+ "html/no-redundant-role": 1,
32
34
  "html/require-form-method": 1,
33
35
  "html/require-frame-title": 1,
34
36
  "html/require-img-alt": 1,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rules/html/index.ts"],"names":[],"mappings":"AAGA,eAAe;IACb;QACE,KAAK,EAAE;YAGL,0BAA0B,GAAY;YAEtC,yBAAyB,GAAY;YACrC,yBAAyB,GAAY;YACrC,sBAAsB,GAAY;YAClC,2BAA2B,GAAY;YACvC,2BAA2B,GAAY;YAEvC,wBAAwB,GAAU;YAClC,4BAA4B,GAAY;YACxC,uBAAuB,GAAY;YAKnC,sBAAsB,GAAY;YAClC,kCAAkC,GAAY;YAG9C,0BAA0B,GAAY;YACtC,2BAA2B,GAAY;YACvC,sBAAsB,GAAY;YAElC,2BAA2B,GAAY;YACvC,2BAA2B,GAAY;YACvC,mBAAmB,GAAY;YAK/B,qBAAqB,GAAY;YACjC,mBAAmB,GAAY;YAQ/B,wBAAwB,GAAY;YACpC,yBAAyB,GAAY;YACrC,0BAA0B,GAAY;YACtC,kCAAkC,GAAY;YAC9C,wBAAwB,GAAY;YACpC,+BAA+B,GAAY;YAC3C,sBAAsB,GAAY;YAClC,+BAA+B,GAAY;YAC3C,2BAA2B,GAAY;YAEvC,0BAA0B,GAAY;YACtC,0BAA0B,GAAY;YACtC,sBAAsB,GAAY;YAClC,0BAA0B,GAAY;YACtC,4BAA4B,GAAY;SAiBhC;KACX;CACF,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rules/html/index.ts"],"names":[],"mappings":"AAGA,eAAe;IACb;QACE,KAAK,EAAE;YAGL,0BAA0B,GAAY;YAEtC,yBAAyB,GAAY;YACrC,yBAAyB,GAAY;YACrC,sBAAsB,GAAY;YAClC,2BAA2B,GAAY;YACvC,2BAA2B,GAAY;YAEvC,4BAA4B,GAAU;YACtC,wBAAwB,GAAU;YAClC,4BAA4B,GAAY;YACxC,uBAAuB,GAAY;YAKnC,sBAAsB,GAAY;YAClC,kCAAkC,GAAY;YAG9C,0BAA0B,GAAY;YACtC,2BAA2B,GAAY;YACvC,sBAAsB,GAAY;YAElC,2BAA2B,GAAY;YACvC,2BAA2B,GAAY;YACvC,mBAAmB,GAAY;YAK/B,qBAAqB,GAAY;YACjC,mBAAmB,GAAY;YAQ/B,wBAAwB,GAAY;YACpC,yBAAyB,GAAY;YACrC,0BAA0B,GAAY;YACtC,kCAAkC,GAAY;YAC9C,wBAAwB,GAAY;YACpC,+BAA+B,GAAY;YAC3C,sBAAsB,GAAY;YAClC,+BAA+B,GAAY;YAC3C,2BAA2B,GAAY;YACvC,wBAAwB,GAAY;YAEpC,0BAA0B,GAAY;YACtC,0BAA0B,GAAY;YACtC,sBAAsB,GAAY;YAClC,0BAA0B,GAAY;YACtC,4BAA4B,GAAY;SAiBhC;KACX;CACF,CAAC"}
@@ -920,6 +920,7 @@ declare const _default: {
920
920
  readonly "html/no-duplicate-id": import("./state.js").State.WARN;
921
921
  readonly "html/no-duplicate-in-head": import("./state.js").State.WARN;
922
922
  readonly "html/no-ineffective-attrs": import("./state.js").State.WARN;
923
+ readonly "html/no-invalid-attr-value": import("./state.js").State.ON;
923
924
  readonly "html/no-invalid-entity": import("./state.js").State.ON;
924
925
  readonly "html/no-nested-interactive": import("./state.js").State.WARN;
925
926
  readonly "html/no-obsolete-tags": import("./state.js").State.WARN;
@@ -942,6 +943,7 @@ declare const _default: {
942
943
  readonly "html/no-invalid-role": import("./state.js").State.WARN;
943
944
  readonly "html/no-non-scalable-viewport": import("./state.js").State.WARN;
944
945
  readonly "html/no-positive-tabindex": import("./state.js").State.WARN;
946
+ readonly "html/no-redundant-role": import("./state.js").State.WARN;
945
947
  readonly "html/require-form-method": import("./state.js").State.WARN;
946
948
  readonly "html/require-frame-title": import("./state.js").State.WARN;
947
949
  readonly "html/require-img-alt": import("./state.js").State.WARN;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,wBAYE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,wBAYE"}
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.5.2",
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 .",
@@ -14,6 +14,7 @@ export default [
14
14
  "html/no-duplicate-in-head": State.WARN,
15
15
  "html/no-ineffective-attrs": State.WARN,
16
16
  // "html/no-inline-styles": State.OFF /* @CONFLICT: breaks Svelte app.html */,
17
+ "html/no-invalid-attr-value": State.ON,
17
18
  "html/no-invalid-entity": State.ON,
18
19
  "html/no-nested-interactive": State.WARN,
19
20
  "html/no-obsolete-tags": State.WARN,
@@ -54,6 +55,7 @@ export default [
54
55
  "html/no-invalid-role": State.WARN,
55
56
  "html/no-non-scalable-viewport": State.WARN,
56
57
  "html/no-positive-tabindex": State.WARN,
58
+ "html/no-redundant-role": State.WARN,
57
59
  // "html/no-skip-heading-levels": State.OFF,
58
60
  "html/require-form-method": State.WARN,
59
61
  "html/require-frame-title": State.WARN,
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]
@@ -1,2 +0,0 @@
1
- export declare function mochaGlobalSetup(): void;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../tests/index.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,SAE/B"}
@@ -1,3 +0,0 @@
1
- export function mochaGlobalSetup() {
2
- }
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../tests/index.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB;AAEhC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const scopes: readonly ["js", "ts"];
2
- //# sourceMappingURL=index.scopes.spec.d.ts.map
@@ -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,5 +0,0 @@
1
- export const scopes = [
2
- "js",
3
- "ts",
4
- ];
5
- //# sourceMappingURL=index.scopes.spec.js.map
@@ -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,2 +0,0 @@
1
- import "chai/register-should.js";
2
- //# sourceMappingURL=index.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../../tests/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC"}
@@ -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,CACA,qBAAqB,EACrB,GAAG,EAAE;YACH,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;gBACtC,KAAK,MAAM,OAAO,IAAI,KAAK;oBACzB,OAAO;yBACJ,MAAM;yB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gBACtC,KAAK;qBACF,MAAM;qBACN,EAAE;qBACF,EAAE,CAAC,OAAO,CAAC,CAAC;QACnB,CAAC,CACF,CAAC;QACF,EAAE,CACA,wBAAwB,EACxB,GAAG,EAAE;YACH,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;gBACtC,KAAK,MAAM,MAAM,IAAI,KAAK,EAAE,CAAC;oBAC3B,MAAM;yBACH,MAAM;yBACN,EAAE;yBACF,EAAE,CAAC,QAAQ,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"}
@@ -1,4 +0,0 @@
1
- export const scopes = [
2
- "js",
3
- "ts",
4
- ] as const;
@@ -1,180 +0,0 @@
1
- import "chai/register-should.js";
2
- 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
@@ -1,3 +0,0 @@
1
- export function mochaGlobalSetup() {
2
- //
3
- }
@@ -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
- }