@checkdigit/eslint-plugin 7.0.0-PR.88-a0ce → 7.0.0-PR.88-5b1b
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-cjs/index.cjs +148 -133
- package/dist-cjs/metafile.json +31 -21
- package/dist-mjs/index.mjs +50 -35
- package/dist-types/index.d.ts +7 -37
- package/package.json +1 -1
- package/src/index.ts +57 -34
package/dist-cjs/metafile.json
CHANGED
|
@@ -11603,8 +11603,13 @@
|
|
|
11603
11603
|
"format": "esm"
|
|
11604
11604
|
},
|
|
11605
11605
|
"src/index.ts": {
|
|
11606
|
-
"bytes":
|
|
11606
|
+
"bytes": 3899,
|
|
11607
11607
|
"imports": [
|
|
11608
|
+
{
|
|
11609
|
+
"path": "node:fs",
|
|
11610
|
+
"kind": "import-statement",
|
|
11611
|
+
"external": true
|
|
11612
|
+
},
|
|
11608
11613
|
{
|
|
11609
11614
|
"path": "src/invalid-json-stringify.ts",
|
|
11610
11615
|
"kind": "import-statement",
|
|
@@ -12071,6 +12076,11 @@
|
|
|
12071
12076
|
"path": "node:assert",
|
|
12072
12077
|
"kind": "require-call",
|
|
12073
12078
|
"external": true
|
|
12079
|
+
},
|
|
12080
|
+
{
|
|
12081
|
+
"path": "node:fs",
|
|
12082
|
+
"kind": "require-call",
|
|
12083
|
+
"external": true
|
|
12074
12084
|
}
|
|
12075
12085
|
],
|
|
12076
12086
|
"exports": [],
|
|
@@ -12209,7 +12219,7 @@
|
|
|
12209
12219
|
"bytesInOutput": 316
|
|
12210
12220
|
},
|
|
12211
12221
|
"node_modules/resolve-from/index.js": {
|
|
12212
|
-
"bytesInOutput":
|
|
12222
|
+
"bytesInOutput": 1433
|
|
12213
12223
|
},
|
|
12214
12224
|
"node_modules/callsites/index.js": {
|
|
12215
12225
|
"bytesInOutput": 461
|
|
@@ -12377,7 +12387,7 @@
|
|
|
12377
12387
|
"bytesInOutput": 157
|
|
12378
12388
|
},
|
|
12379
12389
|
"node_modules/@eslint/eslintrc/dist/eslintrc.cjs": {
|
|
12380
|
-
"bytesInOutput":
|
|
12390
|
+
"bytesInOutput": 104259
|
|
12381
12391
|
},
|
|
12382
12392
|
"node_modules/@eslint/js/src/configs/eslint-all.js": {
|
|
12383
12393
|
"bytesInOutput": 7489
|
|
@@ -12389,7 +12399,7 @@
|
|
|
12389
12399
|
"bytesInOutput": 260
|
|
12390
12400
|
},
|
|
12391
12401
|
"node_modules/eslint/lib/cli-engine/file-enumerator.js": {
|
|
12392
|
-
"bytesInOutput":
|
|
12402
|
+
"bytesInOutput": 13007
|
|
12393
12403
|
},
|
|
12394
12404
|
"node_modules/eslint/package.json": {
|
|
12395
12405
|
"bytesInOutput": 7849
|
|
@@ -13538,7 +13548,7 @@
|
|
|
13538
13548
|
"bytesInOutput": 4470
|
|
13539
13549
|
},
|
|
13540
13550
|
"node_modules/eslint/lib/config/config.js": {
|
|
13541
|
-
"bytesInOutput":
|
|
13551
|
+
"bytesInOutput": 5992
|
|
13542
13552
|
},
|
|
13543
13553
|
"node_modules/eslint/lib/config/flat-config-array.js": {
|
|
13544
13554
|
"bytesInOutput": 4758
|
|
@@ -13559,7 +13569,7 @@
|
|
|
13559
13569
|
"bytesInOutput": 2363
|
|
13560
13570
|
},
|
|
13561
13571
|
"node_modules/eslint/lib/linter/linter.js": {
|
|
13562
|
-
"bytesInOutput":
|
|
13572
|
+
"bytesInOutput": 63187
|
|
13563
13573
|
},
|
|
13564
13574
|
"node_modules/eslint/lib/linter/index.js": {
|
|
13565
13575
|
"bytesInOutput": 308
|
|
@@ -13592,7 +13602,7 @@
|
|
|
13592
13602
|
"bytesInOutput": 262
|
|
13593
13603
|
},
|
|
13594
13604
|
"node_modules/eslint/lib/eslint/eslint-helpers.js": {
|
|
13595
|
-
"bytesInOutput":
|
|
13605
|
+
"bytesInOutput": 20279
|
|
13596
13606
|
},
|
|
13597
13607
|
"node_modules/json-buffer/index.js": {
|
|
13598
13608
|
"bytesInOutput": 1665
|
|
@@ -13604,22 +13614,22 @@
|
|
|
13604
13614
|
"bytesInOutput": 3019
|
|
13605
13615
|
},
|
|
13606
13616
|
"node_modules/flat-cache/src/utils.js": {
|
|
13607
|
-
"bytesInOutput":
|
|
13617
|
+
"bytesInOutput": 798
|
|
13608
13618
|
},
|
|
13609
13619
|
"node_modules/flat-cache/src/del.js": {
|
|
13610
|
-
"bytesInOutput":
|
|
13620
|
+
"bytesInOutput": 832
|
|
13611
13621
|
},
|
|
13612
13622
|
"node_modules/flat-cache/src/cache.js": {
|
|
13613
|
-
"bytesInOutput":
|
|
13623
|
+
"bytesInOutput": 6617
|
|
13614
13624
|
},
|
|
13615
13625
|
"node_modules/file-entry-cache/cache.js": {
|
|
13616
|
-
"bytesInOutput":
|
|
13626
|
+
"bytesInOutput": 8603
|
|
13617
13627
|
},
|
|
13618
13628
|
"node_modules/json-stable-stringify-without-jsonify/index.js": {
|
|
13619
13629
|
"bytesInOutput": 2959
|
|
13620
13630
|
},
|
|
13621
13631
|
"node_modules/eslint/lib/cli-engine/lint-result-cache.js": {
|
|
13622
|
-
"bytesInOutput":
|
|
13632
|
+
"bytesInOutput": 5042
|
|
13623
13633
|
},
|
|
13624
13634
|
"node_modules/@humanwhocodes/retry/dist/retrier.cjs": {
|
|
13625
13635
|
"bytesInOutput": 5857
|
|
@@ -13634,31 +13644,31 @@
|
|
|
13634
13644
|
"bytesInOutput": 1193
|
|
13635
13645
|
},
|
|
13636
13646
|
"node_modules/locate-path/index.js": {
|
|
13637
|
-
"bytesInOutput":
|
|
13647
|
+
"bytesInOutput": 1708
|
|
13638
13648
|
},
|
|
13639
13649
|
"node_modules/path-exists/index.js": {
|
|
13640
|
-
"bytesInOutput":
|
|
13650
|
+
"bytesInOutput": 556
|
|
13641
13651
|
},
|
|
13642
13652
|
"node_modules/find-up/index.js": {
|
|
13643
13653
|
"bytesInOutput": 2238
|
|
13644
13654
|
},
|
|
13645
13655
|
"node_modules/eslint/lib/config/config-loader.js": {
|
|
13646
|
-
"bytesInOutput":
|
|
13656
|
+
"bytesInOutput": 19052
|
|
13647
13657
|
},
|
|
13648
13658
|
"node_modules/eslint/lib/eslint/eslint.js": {
|
|
13649
|
-
"bytesInOutput":
|
|
13659
|
+
"bytesInOutput": 26277
|
|
13650
13660
|
},
|
|
13651
13661
|
"node_modules/eslint/conf/default-cli-options.js": {
|
|
13652
13662
|
"bytesInOutput": 783
|
|
13653
13663
|
},
|
|
13654
13664
|
"node_modules/eslint/lib/cli-engine/load-rules.js": {
|
|
13655
|
-
"bytesInOutput":
|
|
13665
|
+
"bytesInOutput": 761
|
|
13656
13666
|
},
|
|
13657
13667
|
"node_modules/eslint/lib/cli-engine/cli-engine.js": {
|
|
13658
|
-
"bytesInOutput":
|
|
13668
|
+
"bytesInOutput": 24108
|
|
13659
13669
|
},
|
|
13660
13670
|
"node_modules/eslint/lib/eslint/legacy-eslint.js": {
|
|
13661
|
-
"bytesInOutput":
|
|
13671
|
+
"bytesInOutput": 20906
|
|
13662
13672
|
},
|
|
13663
13673
|
"node_modules/eslint/lib/unsupported-api.js": {
|
|
13664
13674
|
"bytesInOutput": 494
|
|
@@ -14192,7 +14202,7 @@
|
|
|
14192
14202
|
"bytesInOutput": 2060
|
|
14193
14203
|
},
|
|
14194
14204
|
"src/index.ts": {
|
|
14195
|
-
"bytesInOutput":
|
|
14205
|
+
"bytesInOutput": 2638
|
|
14196
14206
|
},
|
|
14197
14207
|
"package.json": {
|
|
14198
14208
|
"bytesInOutput": 3085
|
|
@@ -14246,7 +14256,7 @@
|
|
|
14246
14256
|
"bytesInOutput": 3362
|
|
14247
14257
|
}
|
|
14248
14258
|
},
|
|
14249
|
-
"bytes":
|
|
14259
|
+
"bytes": 3751505
|
|
14250
14260
|
}
|
|
14251
14261
|
}
|
|
14252
14262
|
}
|
package/dist-mjs/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
+
import fs from "node:fs";
|
|
2
3
|
import invalidJsonStringify, { ruleId as invalidJsonStringifyRuleId } from "./invalid-json-stringify.mjs";
|
|
3
4
|
import noFullResponse, { ruleId as noFullResponseRuleId } from "./agent/no-full-response.mjs";
|
|
4
5
|
import noPromiseInstanceMethod, { ruleId as noPromiseInstanceMethodRuleId } from "./no-promise-instance-method.mjs";
|
|
@@ -17,7 +18,13 @@ import objectLiteralResponse from "./object-literal-response.mjs";
|
|
|
17
18
|
import regexComment from "./regular-expression-comment.mjs";
|
|
18
19
|
import requireAssertPredicateRejectsThrows from "./require-assert-predicate-rejects-throws.mjs";
|
|
19
20
|
import requireStrictAssert from "./require-strict-assert.mjs";
|
|
20
|
-
var
|
|
21
|
+
var pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
|
|
22
|
+
var plugin = {
|
|
23
|
+
// preferred location of name and version
|
|
24
|
+
meta: {
|
|
25
|
+
name: pkg.name,
|
|
26
|
+
version: pkg.version
|
|
27
|
+
},
|
|
21
28
|
rules: {
|
|
22
29
|
"file-path-comment": filePathComment,
|
|
23
30
|
"no-card-numbers": noCardNumbers,
|
|
@@ -34,43 +41,51 @@ var src_default = {
|
|
|
34
41
|
[requireResolveFullResponseRuleId]: requireResolveFullResponse,
|
|
35
42
|
[requireTypeOutOfTypeOnlyImportsRuleId]: requireTypeOutOfTypeOnlyImports
|
|
36
43
|
},
|
|
37
|
-
configs: {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
44
|
+
configs: {}
|
|
45
|
+
};
|
|
46
|
+
Object.assign(plugin.configs, {
|
|
47
|
+
all: {
|
|
48
|
+
plugins: {
|
|
49
|
+
"@checkdigit": plugin
|
|
50
|
+
},
|
|
51
|
+
rules: {
|
|
52
|
+
"@checkdigit/no-card-numbers": "error",
|
|
53
|
+
"@checkdigit/file-path-comment": "error",
|
|
54
|
+
"@checkdigit/no-uuid": "error",
|
|
55
|
+
"@checkdigit/require-strict-assert": "error",
|
|
56
|
+
"@checkdigit/no-wallaby-comment": "error",
|
|
57
|
+
"@checkdigit/regular-expression-comment": "error",
|
|
58
|
+
"@checkdigit/require-assert-predicate-rejects-throws": "error",
|
|
59
|
+
"@checkdigit/object-literal-response": "error",
|
|
60
|
+
"@checkdigit/no-test-import": "error",
|
|
61
|
+
[`@checkdigit/${invalidJsonStringifyRuleId}`]: "error",
|
|
62
|
+
[`@checkdigit/${noPromiseInstanceMethodRuleId}`]: "error",
|
|
63
|
+
[`@checkdigit/${noFullResponseRuleId}`]: "error",
|
|
64
|
+
[`@checkdigit/${requireResolveFullResponseRuleId}`]: "error",
|
|
65
|
+
[`@checkdigit/${requireTypeOutOfTypeOnlyImportsRuleId}`]: "error"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
recommended: {
|
|
69
|
+
plugins: {
|
|
70
|
+
"@checkdigit": plugin
|
|
55
71
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
[`@checkdigit/${noPromiseInstanceMethodRuleId}`]: "error"
|
|
69
|
-
}
|
|
72
|
+
rules: {
|
|
73
|
+
"@checkdigit/no-card-numbers": "error",
|
|
74
|
+
"@checkdigit/file-path-comment": "off",
|
|
75
|
+
"@checkdigit/no-uuid": "error",
|
|
76
|
+
"@checkdigit/require-strict-assert": "error",
|
|
77
|
+
"@checkdigit/no-wallaby-comment": "off",
|
|
78
|
+
"@checkdigit/regular-expression-comment": "error",
|
|
79
|
+
"@checkdigit/require-assert-predicate-rejects-throws": "error",
|
|
80
|
+
"@checkdigit/object-literal-response": "error",
|
|
81
|
+
"@checkdigit/no-test-import": "error",
|
|
82
|
+
[`@checkdigit/${invalidJsonStringifyRuleId}`]: "error",
|
|
83
|
+
[`@checkdigit/${noPromiseInstanceMethodRuleId}`]: "error"
|
|
70
84
|
}
|
|
71
85
|
}
|
|
72
|
-
};
|
|
86
|
+
});
|
|
87
|
+
var src_default = plugin;
|
|
73
88
|
export {
|
|
74
89
|
src_default as default
|
|
75
90
|
};
|
|
76
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
91
|
+
//# sourceMappingURL=data:application/json;base64,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
|
package/dist-types/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const plugin: {
|
|
2
|
+
meta: {
|
|
3
|
+
name: string;
|
|
4
|
+
version: string;
|
|
5
|
+
};
|
|
2
6
|
rules: {
|
|
3
7
|
'file-path-comment': import("eslint").Rule.RuleModule;
|
|
4
8
|
'no-card-numbers': import("eslint").Rule.RuleModule;
|
|
@@ -15,40 +19,6 @@ declare const _default: {
|
|
|
15
19
|
"require-resolve-full-response": import("@typescript-eslint/utils/ts-eslint").RuleModule<"unknownError" | "invalidOptions", never[], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
16
20
|
"require-type-out-of-type-only-imports": import("@typescript-eslint/utils/ts-eslint").RuleModule<"moveTypeOutside", never[], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
17
21
|
};
|
|
18
|
-
configs: {
|
|
19
|
-
all: {
|
|
20
|
-
rules: {
|
|
21
|
-
'@checkdigit/no-card-numbers': string;
|
|
22
|
-
'@checkdigit/file-path-comment': string;
|
|
23
|
-
'@checkdigit/no-uuid': string;
|
|
24
|
-
'@checkdigit/require-strict-assert': string;
|
|
25
|
-
'@checkdigit/no-wallaby-comment': string;
|
|
26
|
-
'@checkdigit/regular-expression-comment': string;
|
|
27
|
-
'@checkdigit/require-assert-predicate-rejects-throws': string;
|
|
28
|
-
'@checkdigit/object-literal-response': string;
|
|
29
|
-
'@checkdigit/no-test-import': string;
|
|
30
|
-
"@checkdigit/invalid-json-stringify": string;
|
|
31
|
-
"@checkdigit/no-promise-instance-method": string;
|
|
32
|
-
"@checkdigit/no-full-response": string;
|
|
33
|
-
"@checkdigit/require-resolve-full-response": string;
|
|
34
|
-
"@checkdigit/require-type-out-of-type-only-imports": string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
recommended: {
|
|
38
|
-
rules: {
|
|
39
|
-
'@checkdigit/no-card-numbers': string;
|
|
40
|
-
'@checkdigit/file-path-comment': string;
|
|
41
|
-
'@checkdigit/no-uuid': string;
|
|
42
|
-
'@checkdigit/require-strict-assert': string;
|
|
43
|
-
'@checkdigit/no-wallaby-comment': string;
|
|
44
|
-
'@checkdigit/regular-expression-comment': string;
|
|
45
|
-
'@checkdigit/require-assert-predicate-rejects-throws': string;
|
|
46
|
-
'@checkdigit/object-literal-response': string;
|
|
47
|
-
'@checkdigit/no-test-import': string;
|
|
48
|
-
"@checkdigit/invalid-json-stringify": string;
|
|
49
|
-
"@checkdigit/no-promise-instance-method": string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
};
|
|
22
|
+
configs: {};
|
|
53
23
|
};
|
|
54
|
-
export default
|
|
24
|
+
export default plugin;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@checkdigit/eslint-plugin","version":"7.0.0-PR.88-
|
|
1
|
+
{"name":"@checkdigit/eslint-plugin","version":"7.0.0-PR.88-5b1b","description":"Check Digit eslint plugins","keywords":["eslint","eslintplugin"],"homepage":"https://github.com/checkdigit/eslint-plugin#readme","bugs":{"url":"https://github.com/checkdigit/eslint-plugin/issues"},"repository":{"type":"git","url":"https://github.com/checkdigit/eslint-plugin"},"license":"MIT","author":"Check Digit, LLC","sideEffects":false,"type":"module","exports":{".":{"types":"./dist-types/index.d.ts","require":"./dist-cjs/index.cjs","import":"./dist-mjs/index.mjs","default":"./dist-mjs/index.mjs"}},"files":["src","dist-types","dist-cjs","dist-mjs","!src/**/*.test.ts","!src/**/*.spec.ts","!dist-types/**/*.test.d.ts","!dist-types/**/*.spec.d.ts","!dist-cjs/**/*.test.cjs","!dist-cjs/**/*.spec.cjs","!dist-mjs/**/*.test.mjs","!dist-mjs/**/*.spec.mjs","SECURITY.md"],"scripts":{"build:dist-cjs":"rimraf dist-cjs && npx builder --type=commonjs --sourceMap --entryPoint=index.ts --outDir=dist-cjs --outFile=index.cjs --external=espree && echo \"module.exports = module.exports.default;\" >> dist-cjs/index.cjs && node dist-cjs/index.cjs","build:dist-mjs":"rimraf dist-mjs && npx builder --type=module --sourceMap --outDir=dist-mjs && node dist-mjs/index.mjs","build:dist-types":"rimraf dist-types && npx builder --type=types --outDir=dist-types","ci:compile":"tsc --noEmit","ci:coverage":"NODE_OPTIONS=\"--disable-warning ExperimentalWarning --experimental-vm-modules\" jest --coverage=true","ci:lint":"npm run lint","ci:style":"npm run prettier","ci:test":"NODE_OPTIONS=\"--disable-warning ExperimentalWarning --experimental-vm-modules\" jest --coverage=false","lint":"eslint --max-warnings 0 .","lint:fix":"eslint . --fix","prepublishOnly":"npm run build:dist-types && npm run build:dist-cjs && npm run build:dist-mjs","prettier":"prettier --ignore-path .gitignore --list-different .","prettier:fix":"prettier --ignore-path .gitignore --write .","test":"npm run ci:compile && npm run ci:test && npm run ci:lint && npm run ci:style"},"prettier":"@checkdigit/prettier-config","jest":{"preset":"@checkdigit/jest-config"},"dependencies":{"@typescript-eslint/type-utils":"^8.8.1","@typescript-eslint/utils":"^8.8.1","ts-api-utils":"^1.3.0"},"devDependencies":{"@checkdigit/jest-config":"^6.0.2","@checkdigit/prettier-config":"^5.5.1","@checkdigit/typescript-config":"6.0.0","@eslint/js":"^9.12.0","@types/eslint":"^9.6.1","@types/eslint-config-prettier":"^6.11.3","@typescript-eslint/parser":"^8.8.1","@typescript-eslint/rule-tester":"^8.8.1","eslint":"^9.12.0","eslint-config-prettier":"^9.1.0","eslint-import-resolver-typescript":"^3.6.3","eslint-plugin-eslint-plugin":"^6.2.0","eslint-plugin-import":"^2.31.0","eslint-plugin-no-only-tests":"^3.3.0","eslint-plugin-no-secrets":"^1.0.2","eslint-plugin-node":"^11.1.0","eslint-plugin-sonarjs":"1.0.4","http-status-codes":"^2.3.0","rimraf":"^6.0.1","typescript-eslint":"^8.8.1"},"peerDependencies":{"eslint":">=9 <10"},"engines":{"node":">=20.14"}}
|
package/src/index.ts
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* This code is licensed under the MIT license (see LICENSE.txt for details).
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import fs from 'node:fs';
|
|
10
|
+
|
|
9
11
|
import invalidJsonStringify, { ruleId as invalidJsonStringifyRuleId } from './invalid-json-stringify';
|
|
10
12
|
import noFullResponse, { ruleId as noFullResponseRuleId } from './agent/no-full-response';
|
|
11
13
|
import noPromiseInstanceMethod, { ruleId as noPromiseInstanceMethodRuleId } from './no-promise-instance-method';
|
|
@@ -25,7 +27,17 @@ import regexComment from './regular-expression-comment';
|
|
|
25
27
|
import requireAssertPredicateRejectsThrows from './require-assert-predicate-rejects-throws';
|
|
26
28
|
import requireStrictAssert from './require-strict-assert';
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
const pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8')) as {
|
|
31
|
+
name: string;
|
|
32
|
+
version: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const plugin = {
|
|
36
|
+
// preferred location of name and version
|
|
37
|
+
meta: {
|
|
38
|
+
name: pkg.name,
|
|
39
|
+
version: pkg.version,
|
|
40
|
+
},
|
|
29
41
|
rules: {
|
|
30
42
|
'file-path-comment': filePathComment,
|
|
31
43
|
'no-card-numbers': noCardNumbers,
|
|
@@ -42,39 +54,50 @@ export default {
|
|
|
42
54
|
[requireResolveFullResponseRuleId]: requireResolveFullResponse,
|
|
43
55
|
[requireTypeOutOfTypeOnlyImportsRuleId]: requireTypeOutOfTypeOnlyImports,
|
|
44
56
|
},
|
|
45
|
-
configs: {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
'@checkdigit/regular-expression-comment': 'error',
|
|
54
|
-
'@checkdigit/require-assert-predicate-rejects-throws': 'error',
|
|
55
|
-
'@checkdigit/object-literal-response': 'error',
|
|
56
|
-
'@checkdigit/no-test-import': 'error',
|
|
57
|
-
[`@checkdigit/${invalidJsonStringifyRuleId}`]: 'error',
|
|
58
|
-
[`@checkdigit/${noPromiseInstanceMethodRuleId}`]: 'error',
|
|
59
|
-
[`@checkdigit/${noFullResponseRuleId}`]: 'error',
|
|
60
|
-
[`@checkdigit/${requireResolveFullResponseRuleId}`]: 'error',
|
|
61
|
-
[`@checkdigit/${requireTypeOutOfTypeOnlyImportsRuleId}`]: 'error',
|
|
62
|
-
},
|
|
57
|
+
configs: {},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// assign configs here so we can reference `plugin`
|
|
61
|
+
Object.assign(plugin.configs, {
|
|
62
|
+
all: {
|
|
63
|
+
plugins: {
|
|
64
|
+
'@checkdigit': plugin,
|
|
63
65
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
},
|
|
66
|
+
rules: {
|
|
67
|
+
'@checkdigit/no-card-numbers': 'error',
|
|
68
|
+
'@checkdigit/file-path-comment': 'error',
|
|
69
|
+
'@checkdigit/no-uuid': 'error',
|
|
70
|
+
'@checkdigit/require-strict-assert': 'error',
|
|
71
|
+
'@checkdigit/no-wallaby-comment': 'error',
|
|
72
|
+
'@checkdigit/regular-expression-comment': 'error',
|
|
73
|
+
'@checkdigit/require-assert-predicate-rejects-throws': 'error',
|
|
74
|
+
'@checkdigit/object-literal-response': 'error',
|
|
75
|
+
'@checkdigit/no-test-import': 'error',
|
|
76
|
+
[`@checkdigit/${invalidJsonStringifyRuleId}`]: 'error',
|
|
77
|
+
[`@checkdigit/${noPromiseInstanceMethodRuleId}`]: 'error',
|
|
78
|
+
[`@checkdigit/${noFullResponseRuleId}`]: 'error',
|
|
79
|
+
[`@checkdigit/${requireResolveFullResponseRuleId}`]: 'error',
|
|
80
|
+
[`@checkdigit/${requireTypeOutOfTypeOnlyImportsRuleId}`]: 'error',
|
|
78
81
|
},
|
|
79
82
|
},
|
|
80
|
-
|
|
83
|
+
recommended: {
|
|
84
|
+
plugins: {
|
|
85
|
+
'@checkdigit': plugin,
|
|
86
|
+
},
|
|
87
|
+
rules: {
|
|
88
|
+
'@checkdigit/no-card-numbers': 'error',
|
|
89
|
+
'@checkdigit/file-path-comment': 'off',
|
|
90
|
+
'@checkdigit/no-uuid': 'error',
|
|
91
|
+
'@checkdigit/require-strict-assert': 'error',
|
|
92
|
+
'@checkdigit/no-wallaby-comment': 'off',
|
|
93
|
+
'@checkdigit/regular-expression-comment': 'error',
|
|
94
|
+
'@checkdigit/require-assert-predicate-rejects-throws': 'error',
|
|
95
|
+
'@checkdigit/object-literal-response': 'error',
|
|
96
|
+
'@checkdigit/no-test-import': 'error',
|
|
97
|
+
[`@checkdigit/${invalidJsonStringifyRuleId}`]: 'error',
|
|
98
|
+
[`@checkdigit/${noPromiseInstanceMethodRuleId}`]: 'error',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export default plugin;
|