@checkdigit/eslint-plugin 7.0.0-PR.88-5b1b → 7.0.0-PR.88-46de

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.
@@ -11603,12 +11603,15 @@
11603
11603
  "format": "esm"
11604
11604
  },
11605
11605
  "src/index.ts": {
11606
- "bytes": 3899,
11606
+ "bytes": 3890,
11607
11607
  "imports": [
11608
11608
  {
11609
- "path": "node:fs",
11609
+ "path": "package.json",
11610
11610
  "kind": "import-statement",
11611
- "external": true
11611
+ "original": "../package.json",
11612
+ "with": {
11613
+ "type": "json"
11614
+ }
11612
11615
  },
11613
11616
  {
11614
11617
  "path": "src/invalid-json-stringify.ts",
@@ -12076,11 +12079,6 @@
12076
12079
  "path": "node:assert",
12077
12080
  "kind": "require-call",
12078
12081
  "external": true
12079
- },
12080
- {
12081
- "path": "node:fs",
12082
- "kind": "require-call",
12083
- "external": true
12084
12082
  }
12085
12083
  ],
12086
12084
  "exports": [],
@@ -12219,7 +12217,7 @@
12219
12217
  "bytesInOutput": 316
12220
12218
  },
12221
12219
  "node_modules/resolve-from/index.js": {
12222
- "bytesInOutput": 1433
12220
+ "bytesInOutput": 1431
12223
12221
  },
12224
12222
  "node_modules/callsites/index.js": {
12225
12223
  "bytesInOutput": 461
@@ -12252,7 +12250,7 @@
12252
12250
  "bytesInOutput": 524
12253
12251
  },
12254
12252
  "node_modules/ajv/lib/compile/util.js": {
12255
- "bytesInOutput": 7315
12253
+ "bytesInOutput": 7321
12256
12254
  },
12257
12255
  "node_modules/ajv/lib/compile/schema_obj.js": {
12258
12256
  "bytesInOutput": 265
@@ -12270,7 +12268,7 @@
12270
12268
  "bytesInOutput": 2060
12271
12269
  },
12272
12270
  "node_modules/ajv/lib/dotjs/validate.js": {
12273
- "bytesInOutput": 21531
12271
+ "bytesInOutput": 21534
12274
12272
  },
12275
12273
  "node_modules/ajv/lib/compile/index.js": {
12276
12274
  "bytesInOutput": 10002
@@ -12354,7 +12352,7 @@
12354
12352
  "bytesInOutput": 1149
12355
12353
  },
12356
12354
  "node_modules/ajv/lib/compile/rules.js": {
12357
- "bytesInOutput": 2596
12355
+ "bytesInOutput": 2597
12358
12356
  },
12359
12357
  "node_modules/ajv/lib/data.js": {
12360
12358
  "bytesInOutput": 1329
@@ -12372,13 +12370,13 @@
12372
12370
  "bytesInOutput": 1141
12373
12371
  },
12374
12372
  "node_modules/ajv/lib/keyword.js": {
12375
- "bytesInOutput": 3304
12373
+ "bytesInOutput": 3308
12376
12374
  },
12377
12375
  "node_modules/ajv/lib/refs/data.json": {
12378
12376
  "bytesInOutput": 654
12379
12377
  },
12380
12378
  "node_modules/ajv/lib/ajv.js": {
12381
- "bytesInOutput": 13544
12379
+ "bytesInOutput": 13546
12382
12380
  },
12383
12381
  "node_modules/globals/globals.json": {
12384
12382
  "bytesInOutput": 56110
@@ -12387,7 +12385,7 @@
12387
12385
  "bytesInOutput": 157
12388
12386
  },
12389
12387
  "node_modules/@eslint/eslintrc/dist/eslintrc.cjs": {
12390
- "bytesInOutput": 104259
12388
+ "bytesInOutput": 104279
12391
12389
  },
12392
12390
  "node_modules/@eslint/js/src/configs/eslint-all.js": {
12393
12391
  "bytesInOutput": 7489
@@ -12399,7 +12397,7 @@
12399
12397
  "bytesInOutput": 260
12400
12398
  },
12401
12399
  "node_modules/eslint/lib/cli-engine/file-enumerator.js": {
12402
- "bytesInOutput": 13007
12400
+ "bytesInOutput": 13004
12403
12401
  },
12404
12402
  "node_modules/eslint/package.json": {
12405
12403
  "bytesInOutput": 7849
@@ -12540,7 +12538,7 @@
12540
12538
  "bytesInOutput": 13714
12541
12539
  },
12542
12540
  "node_modules/eslint/lib/languages/js/source-code/source-code.js": {
12543
- "bytesInOutput": 30115
12541
+ "bytesInOutput": 30127
12544
12542
  },
12545
12543
  "node_modules/eslint/lib/languages/js/source-code/index.js": {
12546
12544
  "bytesInOutput": 240
@@ -13521,7 +13519,7 @@
13521
13519
  "bytesInOutput": 11472
13522
13520
  },
13523
13521
  "node_modules/@eslint/config-array/dist/cjs/index.cjs": {
13524
- "bytesInOutput": 26163
13522
+ "bytesInOutput": 26170
13525
13523
  },
13526
13524
  "node_modules/eslint/lib/shared/severity.js": {
13527
13525
  "bytesInOutput": 928
@@ -13551,7 +13549,7 @@
13551
13549
  "bytesInOutput": 5992
13552
13550
  },
13553
13551
  "node_modules/eslint/lib/config/flat-config-array.js": {
13554
- "bytesInOutput": 4758
13552
+ "bytesInOutput": 4760
13555
13553
  },
13556
13554
  "node_modules/eslint/lib/shared/flags.js": {
13557
13555
  "bytesInOutput": 575
@@ -13569,7 +13567,7 @@
13569
13567
  "bytesInOutput": 2363
13570
13568
  },
13571
13569
  "node_modules/eslint/lib/linter/linter.js": {
13572
- "bytesInOutput": 63187
13570
+ "bytesInOutput": 63184
13573
13571
  },
13574
13572
  "node_modules/eslint/lib/linter/index.js": {
13575
13573
  "bytesInOutput": 308
@@ -13602,7 +13600,7 @@
13602
13600
  "bytesInOutput": 262
13603
13601
  },
13604
13602
  "node_modules/eslint/lib/eslint/eslint-helpers.js": {
13605
- "bytesInOutput": 20279
13603
+ "bytesInOutput": 20280
13606
13604
  },
13607
13605
  "node_modules/json-buffer/index.js": {
13608
13606
  "bytesInOutput": 1665
@@ -13614,22 +13612,22 @@
13614
13612
  "bytesInOutput": 3019
13615
13613
  },
13616
13614
  "node_modules/flat-cache/src/utils.js": {
13617
- "bytesInOutput": 798
13615
+ "bytesInOutput": 794
13618
13616
  },
13619
13617
  "node_modules/flat-cache/src/del.js": {
13620
- "bytesInOutput": 832
13618
+ "bytesInOutput": 824
13621
13619
  },
13622
13620
  "node_modules/flat-cache/src/cache.js": {
13623
- "bytesInOutput": 6617
13621
+ "bytesInOutput": 6615
13624
13622
  },
13625
13623
  "node_modules/file-entry-cache/cache.js": {
13626
- "bytesInOutput": 8603
13624
+ "bytesInOutput": 8597
13627
13625
  },
13628
13626
  "node_modules/json-stable-stringify-without-jsonify/index.js": {
13629
13627
  "bytesInOutput": 2959
13630
13628
  },
13631
13629
  "node_modules/eslint/lib/cli-engine/lint-result-cache.js": {
13632
- "bytesInOutput": 5042
13630
+ "bytesInOutput": 5038
13633
13631
  },
13634
13632
  "node_modules/@humanwhocodes/retry/dist/retrier.cjs": {
13635
13633
  "bytesInOutput": 5857
@@ -13644,31 +13642,31 @@
13644
13642
  "bytesInOutput": 1193
13645
13643
  },
13646
13644
  "node_modules/locate-path/index.js": {
13647
- "bytesInOutput": 1708
13645
+ "bytesInOutput": 1703
13648
13646
  },
13649
13647
  "node_modules/path-exists/index.js": {
13650
- "bytesInOutput": 556
13648
+ "bytesInOutput": 553
13651
13649
  },
13652
13650
  "node_modules/find-up/index.js": {
13653
13651
  "bytesInOutput": 2238
13654
13652
  },
13655
13653
  "node_modules/eslint/lib/config/config-loader.js": {
13656
- "bytesInOutput": 19052
13654
+ "bytesInOutput": 19065
13657
13655
  },
13658
13656
  "node_modules/eslint/lib/eslint/eslint.js": {
13659
- "bytesInOutput": 26277
13657
+ "bytesInOutput": 26321
13660
13658
  },
13661
13659
  "node_modules/eslint/conf/default-cli-options.js": {
13662
13660
  "bytesInOutput": 783
13663
13661
  },
13664
13662
  "node_modules/eslint/lib/cli-engine/load-rules.js": {
13665
- "bytesInOutput": 761
13663
+ "bytesInOutput": 763
13666
13664
  },
13667
13665
  "node_modules/eslint/lib/cli-engine/cli-engine.js": {
13668
- "bytesInOutput": 24108
13666
+ "bytesInOutput": 24118
13669
13667
  },
13670
13668
  "node_modules/eslint/lib/eslint/legacy-eslint.js": {
13671
- "bytesInOutput": 20906
13669
+ "bytesInOutput": 20908
13672
13670
  },
13673
13671
  "node_modules/eslint/lib/unsupported-api.js": {
13674
13672
  "bytesInOutput": 494
@@ -13686,7 +13684,7 @@
13686
13684
  "bytesInOutput": 1018
13687
13685
  },
13688
13686
  "node_modules/eslint/lib/rule-tester/rule-tester.js": {
13689
- "bytesInOutput": 38608
13687
+ "bytesInOutput": 38627
13690
13688
  },
13691
13689
  "node_modules/eslint/lib/rule-tester/index.js": {
13692
13690
  "bytesInOutput": 227
@@ -14202,7 +14200,7 @@
14202
14200
  "bytesInOutput": 2060
14203
14201
  },
14204
14202
  "src/index.ts": {
14205
- "bytesInOutput": 2638
14203
+ "bytesInOutput": 2449
14206
14204
  },
14207
14205
  "package.json": {
14208
14206
  "bytesInOutput": 3085
@@ -14256,7 +14254,7 @@
14256
14254
  "bytesInOutput": 3362
14257
14255
  }
14258
14256
  },
14259
- "bytes": 3751505
14257
+ "bytes": 3751328
14260
14258
  }
14261
14259
  }
14262
14260
  }
@@ -1,5 +1,5 @@
1
1
  // src/index.ts
2
- import fs from "node:fs";
2
+ import _package from "../package.json" with { type: "json" };
3
3
  import invalidJsonStringify, { ruleId as invalidJsonStringifyRuleId } from "./invalid-json-stringify.mjs";
4
4
  import noFullResponse, { ruleId as noFullResponseRuleId } from "./agent/no-full-response.mjs";
5
5
  import noPromiseInstanceMethod, { ruleId as noPromiseInstanceMethodRuleId } from "./no-promise-instance-method.mjs";
@@ -18,32 +18,30 @@ import objectLiteralResponse from "./object-literal-response.mjs";
18
18
  import regexComment from "./regular-expression-comment.mjs";
19
19
  import requireAssertPredicateRejectsThrows from "./require-assert-predicate-rejects-throws.mjs";
20
20
  import requireStrictAssert from "./require-strict-assert.mjs";
21
- var pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
21
+ var rules = {
22
+ "file-path-comment": filePathComment,
23
+ "no-card-numbers": noCardNumbers,
24
+ "no-uuid": noUuid,
25
+ "require-strict-assert": requireStrictAssert,
26
+ "no-test-import": noTestImport,
27
+ "no-wallaby-comment": noWallabyComment,
28
+ "regular-expression-comment": regexComment,
29
+ "require-assert-predicate-rejects-throws": requireAssertPredicateRejectsThrows,
30
+ "object-literal-response": objectLiteralResponse,
31
+ [invalidJsonStringifyRuleId]: invalidJsonStringify,
32
+ [noPromiseInstanceMethodRuleId]: noPromiseInstanceMethod,
33
+ [noFullResponseRuleId]: noFullResponse,
34
+ [requireResolveFullResponseRuleId]: requireResolveFullResponse,
35
+ [requireTypeOutOfTypeOnlyImportsRuleId]: requireTypeOutOfTypeOnlyImports
36
+ };
22
37
  var plugin = {
23
- // preferred location of name and version
24
38
  meta: {
25
- name: pkg.name,
26
- version: pkg.version
27
- },
28
- rules: {
29
- "file-path-comment": filePathComment,
30
- "no-card-numbers": noCardNumbers,
31
- "no-uuid": noUuid,
32
- "require-strict-assert": requireStrictAssert,
33
- "no-test-import": noTestImport,
34
- "no-wallaby-comment": noWallabyComment,
35
- "regular-expression-comment": regexComment,
36
- "require-assert-predicate-rejects-throws": requireAssertPredicateRejectsThrows,
37
- "object-literal-response": objectLiteralResponse,
38
- [invalidJsonStringifyRuleId]: invalidJsonStringify,
39
- [noPromiseInstanceMethodRuleId]: noPromiseInstanceMethod,
40
- [noFullResponseRuleId]: noFullResponse,
41
- [requireResolveFullResponseRuleId]: requireResolveFullResponse,
42
- [requireTypeOutOfTypeOnlyImportsRuleId]: requireTypeOutOfTypeOnlyImports
39
+ name: _package.name,
40
+ version: _package.version
43
41
  },
44
- configs: {}
42
+ rules
45
43
  };
46
- Object.assign(plugin.configs, {
44
+ var configs = {
47
45
  all: {
48
46
  plugins: {
49
47
  "@checkdigit": plugin
@@ -83,9 +81,12 @@ Object.assign(plugin.configs, {
83
81
  [`@checkdigit/${noPromiseInstanceMethodRuleId}`]: "error"
84
82
  }
85
83
  }
86
- });
87
- var src_default = plugin;
84
+ };
85
+ var src_default = {
86
+ ...plugin,
87
+ configs
88
+ };
88
89
  export {
89
90
  src_default as default
90
91
  };
91
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIl0sCiAgIm1hcHBpbmdzIjogIjtBQVFBLE9BQU8sUUFBUTtBQUVmLE9BQU8sd0JBQXdCLFVBQVUsa0NBQWtDO0FBQzNFLE9BQU8sa0JBQWtCLFVBQVUsNEJBQTRCO0FBQy9ELE9BQU8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x1Q0FBdUM7QUFBQSxNQUN2Qyw4QkFBOEI7QUFBQSxNQUM5QixDQUFDLGVBQWUsMEJBQTBCLEVBQUUsR0FBRztBQUFBLE1BQy9DLENBQUMsZUFBZSw2QkFBNkIsRUFBRSxHQUFHO0FBQUEsSUFDcEQ7QUFBQSxFQUNGO0FBQ0Y7QUFFQSxJQUFPLGNBQVE7QUFBQSxFQUNiLEdBQUc7QUFBQSxFQUNIO0FBQ0Y7IiwKICAibmFtZXMiOiBbXQp9Cg==
@@ -1,24 +1,11 @@
1
- declare const plugin: {
2
- meta: {
3
- name: string;
4
- version: string;
1
+ import type { TSESLint } from '@typescript-eslint/utils';
2
+ declare const _default: {
3
+ configs: Record<string, TSESLint.FlatConfig.Config>;
4
+ meta?: {
5
+ name?: string | undefined;
6
+ version?: string | undefined;
5
7
  };
6
- rules: {
7
- 'file-path-comment': import("eslint").Rule.RuleModule;
8
- 'no-card-numbers': import("eslint").Rule.RuleModule;
9
- 'no-uuid': import("eslint").Rule.RuleModule;
10
- 'require-strict-assert': import("eslint").Rule.RuleModule;
11
- 'no-test-import': import("eslint").Rule.RuleModule;
12
- 'no-wallaby-comment': import("eslint").Rule.RuleModule;
13
- 'regular-expression-comment': import("eslint").Rule.RuleModule;
14
- 'require-assert-predicate-rejects-throws': import("eslint").Rule.RuleModule;
15
- 'object-literal-response': import("eslint").Rule.RuleModule;
16
- "invalid-json-stringify": import("eslint").Rule.RuleModule;
17
- "no-promise-instance-method": import("eslint").Rule.RuleModule;
18
- "no-full-response": import("@typescript-eslint/utils/ts-eslint").RuleModule<"removeFullResponse" | "unknownError", never[], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
19
- "require-resolve-full-response": import("@typescript-eslint/utils/ts-eslint").RuleModule<"unknownError" | "invalidOptions", never[], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
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>;
21
- };
22
- configs: {};
8
+ processors?: Partial<Record<string, TSESLint.Processor.LooseProcessorModule>> | undefined;
9
+ rules?: Record<string, TSESLint.LooseRuleDefinition> | undefined;
23
10
  };
24
- export default plugin;
11
+ export default _default;
package/package.json CHANGED
@@ -1 +1 @@
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"}}
1
+ {"name":"@checkdigit/eslint-plugin","version":"7.0.0-PR.88-46de","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,8 +6,9 @@
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';
9
+ import type { TSESLint } from '@typescript-eslint/utils';
10
10
 
11
+ import _package from '../package.json' with { type: 'json' };
11
12
  import invalidJsonStringify, { ruleId as invalidJsonStringifyRuleId } from './invalid-json-stringify';
12
13
  import noFullResponse, { ruleId as noFullResponseRuleId } from './agent/no-full-response';
13
14
  import noPromiseInstanceMethod, { ruleId as noPromiseInstanceMethodRuleId } from './no-promise-instance-method';
@@ -27,38 +28,32 @@ import regexComment from './regular-expression-comment';
27
28
  import requireAssertPredicateRejectsThrows from './require-assert-predicate-rejects-throws';
28
29
  import requireStrictAssert from './require-strict-assert';
29
30
 
30
- const pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8')) as {
31
- name: string;
32
- version: string;
31
+ const rules: Record<string, TSESLint.LooseRuleDefinition> = {
32
+ 'file-path-comment': filePathComment,
33
+ 'no-card-numbers': noCardNumbers,
34
+ 'no-uuid': noUuid,
35
+ 'require-strict-assert': requireStrictAssert,
36
+ 'no-test-import': noTestImport,
37
+ 'no-wallaby-comment': noWallabyComment,
38
+ 'regular-expression-comment': regexComment,
39
+ 'require-assert-predicate-rejects-throws': requireAssertPredicateRejectsThrows,
40
+ 'object-literal-response': objectLiteralResponse,
41
+ [invalidJsonStringifyRuleId]: invalidJsonStringify,
42
+ [noPromiseInstanceMethodRuleId]: noPromiseInstanceMethod,
43
+ [noFullResponseRuleId]: noFullResponse,
44
+ [requireResolveFullResponseRuleId]: requireResolveFullResponse,
45
+ [requireTypeOutOfTypeOnlyImportsRuleId]: requireTypeOutOfTypeOnlyImports,
33
46
  };
34
47
 
35
- const plugin = {
36
- // preferred location of name and version
48
+ const plugin: TSESLint.FlatConfig.Plugin = {
37
49
  meta: {
38
- name: pkg.name,
39
- version: pkg.version,
50
+ name: _package.name,
51
+ version: _package.version,
40
52
  },
41
- rules: {
42
- 'file-path-comment': filePathComment,
43
- 'no-card-numbers': noCardNumbers,
44
- 'no-uuid': noUuid,
45
- 'require-strict-assert': requireStrictAssert,
46
- 'no-test-import': noTestImport,
47
- 'no-wallaby-comment': noWallabyComment,
48
- 'regular-expression-comment': regexComment,
49
- 'require-assert-predicate-rejects-throws': requireAssertPredicateRejectsThrows,
50
- 'object-literal-response': objectLiteralResponse,
51
- [invalidJsonStringifyRuleId]: invalidJsonStringify,
52
- [noPromiseInstanceMethodRuleId]: noPromiseInstanceMethod,
53
- [noFullResponseRuleId]: noFullResponse,
54
- [requireResolveFullResponseRuleId]: requireResolveFullResponse,
55
- [requireTypeOutOfTypeOnlyImportsRuleId]: requireTypeOutOfTypeOnlyImports,
56
- },
57
- configs: {},
53
+ rules,
58
54
  };
59
55
 
60
- // assign configs here so we can reference `plugin`
61
- Object.assign(plugin.configs, {
56
+ const configs: Record<string, TSESLint.FlatConfig.Config> = {
62
57
  all: {
63
58
  plugins: {
64
59
  '@checkdigit': plugin,
@@ -98,6 +93,9 @@ Object.assign(plugin.configs, {
98
93
  [`@checkdigit/${noPromiseInstanceMethodRuleId}`]: 'error',
99
94
  },
100
95
  },
101
- });
96
+ };
102
97
 
103
- export default plugin;
98
+ export default {
99
+ ...plugin,
100
+ configs,
101
+ };