@rexezuge/tooling 1.2.0 → 1.4.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.
Files changed (153) hide show
  1. package/README.md +66 -10
  2. package/dist/eslint-boundaries.d.ts +31 -7
  3. package/dist/eslint-boundaries.d.ts.map +1 -1
  4. package/dist/eslint-boundaries.js +1 -138
  5. package/dist/eslint-boundaries.js.map +7 -1
  6. package/dist/eslint-rules.js +1 -273
  7. package/dist/eslint-rules.js.map +7 -1
  8. package/dist/eslint.d.ts +12 -7
  9. package/dist/eslint.d.ts.map +1 -1
  10. package/dist/eslint.js +1 -189
  11. package/dist/eslint.js.map +7 -1
  12. package/dist/functions/pages-proxy.d.ts.map +1 -1
  13. package/dist/functions/pages-proxy.js +1 -131
  14. package/dist/functions/pages-proxy.js.map +7 -1
  15. package/dist/index.d.ts +20 -14
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +1 -28
  18. package/dist/index.js.map +7 -1
  19. package/dist/scripts/backup/d1-target.d.ts +15 -5
  20. package/dist/scripts/backup/d1-target.d.ts.map +1 -1
  21. package/dist/scripts/backup/d1-target.js +1 -31
  22. package/dist/scripts/backup/d1-target.js.map +7 -1
  23. package/dist/scripts/backup/destination-config.d.ts +24 -8
  24. package/dist/scripts/backup/destination-config.d.ts.map +1 -1
  25. package/dist/scripts/backup/destination-config.js +1 -57
  26. package/dist/scripts/backup/destination-config.js.map +7 -1
  27. package/dist/scripts/backup/encrypt-backup.js +2 -97
  28. package/dist/scripts/backup/encrypt-backup.js.map +7 -1
  29. package/dist/scripts/backup/naming.d.ts +3 -1
  30. package/dist/scripts/backup/naming.d.ts.map +1 -1
  31. package/dist/scripts/backup/naming.js +1 -58
  32. package/dist/scripts/backup/naming.js.map +7 -1
  33. package/dist/scripts/check-god-files.d.ts +40 -14
  34. package/dist/scripts/check-god-files.d.ts.map +1 -1
  35. package/dist/scripts/check-god-files.js +2 -271
  36. package/dist/scripts/check-god-files.js.map +7 -1
  37. package/dist/scripts/ensure-spa-shell-stub.js +1 -29
  38. package/dist/scripts/ensure-spa-shell-stub.js.map +7 -1
  39. package/dist/scripts/init-secrets.d.ts +0 -16
  40. package/dist/scripts/init-secrets.d.ts.map +1 -1
  41. package/dist/scripts/init-secrets.js +2 -239
  42. package/dist/scripts/init-secrets.js.map +7 -1
  43. package/dist/scripts/lib/cli-args.d.ts.map +1 -1
  44. package/dist/scripts/lib/cli-args.js +1 -116
  45. package/dist/scripts/lib/cli-args.js.map +7 -1
  46. package/dist/scripts/lib/github-actions.js +3 -38
  47. package/dist/scripts/lib/github-actions.js.map +7 -1
  48. package/dist/scripts/lib/wrangler-table.d.ts.map +1 -1
  49. package/dist/scripts/lib/wrangler-table.js +2 -99
  50. package/dist/scripts/lib/wrangler-table.js.map +7 -1
  51. package/dist/scripts/migrations-lock.js +1 -44
  52. package/dist/scripts/migrations-lock.js.map +7 -1
  53. package/dist/scripts/prepare-wrangler-config.js +1 -49
  54. package/dist/scripts/prepare-wrangler-config.js.map +7 -1
  55. package/dist/scripts/spa-shell.d.ts +12 -4
  56. package/dist/scripts/spa-shell.d.ts.map +1 -1
  57. package/dist/scripts/spa-shell.js +3 -160
  58. package/dist/scripts/spa-shell.js.map +7 -1
  59. package/dist/scripts/validate-locales.d.ts +13 -5
  60. package/dist/scripts/validate-locales.d.ts.map +1 -1
  61. package/dist/scripts/validate-locales.js +4 -350
  62. package/dist/scripts/validate-locales.js.map +7 -1
  63. package/dist/scripts/verify-migrations.d.ts +27 -9
  64. package/dist/scripts/verify-migrations.d.ts.map +1 -1
  65. package/dist/scripts/verify-migrations.js +2 -312
  66. package/dist/scripts/verify-migrations.js.map +7 -1
  67. package/dist/scripts/verify-spa-shell.js +1 -52
  68. package/dist/scripts/verify-spa-shell.js.map +7 -1
  69. package/dist/scripts/wrangler-config/cli.js +3 -51
  70. package/dist/scripts/wrangler-config/cli.js.map +7 -1
  71. package/dist/scripts/wrangler-config/patches.d.ts +10 -4
  72. package/dist/scripts/wrangler-config/patches.d.ts.map +1 -1
  73. package/dist/scripts/wrangler-config/patches.js +4 -141
  74. package/dist/scripts/wrangler-config/patches.js.map +7 -1
  75. package/dist/scripts/wrangler-config/resources.d.ts +19 -7
  76. package/dist/scripts/wrangler-config/resources.d.ts.map +1 -1
  77. package/dist/scripts/wrangler-config/resources.js +1 -290
  78. package/dist/scripts/wrangler-config/resources.js.map +7 -1
  79. package/dist/scripts/wrangler-config/types.d.ts +24 -8
  80. package/dist/scripts/wrangler-config/types.d.ts.map +1 -1
  81. package/dist/scripts/wrangler-config/types.js +1 -49
  82. package/dist/scripts/wrangler-config/types.js.map +7 -1
  83. package/dist/test/integration-migrations.d.ts +29 -12
  84. package/dist/test/integration-migrations.d.ts.map +1 -1
  85. package/dist/test/integration-migrations.js +2 -171
  86. package/dist/test/integration-migrations.js.map +7 -1
  87. package/dist/test/mocks/cloudflare-workers.js +1 -90
  88. package/dist/test/mocks/cloudflare-workers.js.map +7 -1
  89. package/dist/vite.d.ts +5 -3
  90. package/dist/vite.d.ts.map +1 -1
  91. package/dist/vite.js +3 -125
  92. package/dist/vite.js.map +7 -1
  93. package/dist/vitest-aliases.d.ts +90 -0
  94. package/dist/vitest-aliases.d.ts.map +1 -0
  95. package/dist/vitest-aliases.js +1 -0
  96. package/dist/vitest-aliases.js.map +7 -0
  97. package/dist/vitest-integration.d.ts +96 -0
  98. package/dist/vitest-integration.d.ts.map +1 -0
  99. package/dist/vitest-integration.js +1 -0
  100. package/dist/vitest-integration.js.map +7 -0
  101. package/dist/vitest-repo.d.ts +154 -0
  102. package/dist/vitest-repo.d.ts.map +1 -0
  103. package/dist/vitest-repo.js +1 -0
  104. package/dist/vitest-repo.js.map +7 -0
  105. package/dist/vitest-web.d.ts +76 -19
  106. package/dist/vitest-web.d.ts.map +1 -1
  107. package/dist/vitest-web.js +1 -72
  108. package/dist/vitest-web.js.map +7 -1
  109. package/dist/vitest.d.ts +70 -19
  110. package/dist/vitest.d.ts.map +1 -1
  111. package/dist/vitest.js +1 -128
  112. package/dist/vitest.js.map +7 -1
  113. package/package.json +9 -3
  114. package/src/eslint-boundaries.ts +112 -11
  115. package/src/eslint.test.ts +40 -9
  116. package/src/eslint.ts +14 -9
  117. package/src/functions/pages-proxy.test.ts +3 -3
  118. package/src/functions/pages-proxy.ts +4 -2
  119. package/src/index.ts +23 -14
  120. package/src/scripts/backup/backup-rules.test.ts +4 -4
  121. package/src/scripts/backup/d1-target.ts +16 -6
  122. package/src/scripts/backup/destination-config.ts +27 -9
  123. package/src/scripts/backup/encrypt-backup.ts +12 -10
  124. package/src/scripts/backup/naming.ts +3 -1
  125. package/src/scripts/check-god-files.test.ts +19 -19
  126. package/src/scripts/check-god-files.ts +62 -33
  127. package/src/scripts/ensure-spa-shell-stub.ts +1 -1
  128. package/src/scripts/init-secrets.ts +20 -10
  129. package/src/scripts/lib/cli-args.ts +6 -3
  130. package/src/scripts/lib/wrangler-table.ts +5 -3
  131. package/src/scripts/migrations-lock.ts +2 -2
  132. package/src/scripts/prepare-wrangler-config.ts +3 -3
  133. package/src/scripts/spa-shell.test.ts +18 -18
  134. package/src/scripts/spa-shell.ts +26 -14
  135. package/src/scripts/validate-locales.test.ts +18 -18
  136. package/src/scripts/validate-locales.ts +43 -25
  137. package/src/scripts/verify-migrations.test.ts +8 -8
  138. package/src/scripts/verify-migrations.ts +47 -24
  139. package/src/scripts/verify-spa-shell.ts +1 -1
  140. package/src/scripts/wrangler-config/patches.ts +13 -5
  141. package/src/scripts/wrangler-config/resources.ts +34 -18
  142. package/src/scripts/wrangler-config/types.ts +24 -8
  143. package/src/test/integration-migrations.test.ts +7 -7
  144. package/src/test/integration-migrations.ts +33 -14
  145. package/src/vite.test.ts +25 -14
  146. package/src/vite.ts +5 -5
  147. package/src/vitest-aliases.test.ts +53 -0
  148. package/src/vitest-aliases.ts +125 -0
  149. package/src/vitest-factories.test.ts +127 -0
  150. package/src/vitest-integration.ts +118 -0
  151. package/src/vitest-repo.ts +269 -0
  152. package/src/vitest-web.ts +110 -28
  153. package/src/vitest.ts +96 -47
@@ -1,273 +1 @@
1
- /**
2
- * The rule-override blocks of the repo lint config.
3
- *
4
- * Extracted from `eslint.ts` with the boundary rules: each block is a plain
5
- * rules object with the provenance comment that says *why* it is set to this
6
- * value, because a per-rule decision with no reason attached is a decision the
7
- * next reader re-litigates. `eslint.ts` composes these; this file is where a
8
- * rule's story lives.
9
- */
10
- /**
11
- * TypeScript rules, identical in all four source stacks.
12
- */
13
- export const TYPESCRIPT_RULES = {
14
- '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
15
- // Allow `void expr` for intentional fire-and-forget in Workers.
16
- '@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
17
- // Relax the unsafe-any rules to warn: the external API boundaries (Cloudflare
18
- // bindings, provider SDKs) are typed `any` upstream, and the alternative is a
19
- // config that cannot be adopted.
20
- '@typescript-eslint/no-explicit-any': 'warn',
21
- '@typescript-eslint/no-unsafe-assignment': 'warn',
22
- '@typescript-eslint/no-unsafe-member-access': 'warn',
23
- '@typescript-eslint/no-unsafe-call': 'warn',
24
- '@typescript-eslint/no-unsafe-return': 'warn',
25
- '@typescript-eslint/no-unsafe-argument': 'warn',
26
- // JSX event handlers and hook callback objects commonly use async functions
27
- // where void is expected.
28
- '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: { attributes: false, properties: false } }],
29
- // An `async` function with no `await`: every handler and DAO method is
30
- // `async` by shape so a future `await` does not change its signature.
31
- '@typescript-eslint/require-await': 'off',
32
- // `await` on a value the types say is not thenable, where the value is a
33
- // `PromiseLike` from an interface declared that way.
34
- '@typescript-eslint/await-thenable': 'off',
35
- };
36
- /**
37
- * Unicorn and SonarJS rules carried from the source repos, each off for a
38
- * stated reason.
39
- *
40
- * This is the family's "deliberately does not follow" block: every entry is
41
- * off because complying would make the code worse for what the project is,
42
- * and each is listed rather than dropped so the decision stays reviewable.
43
- */
44
- export const UNICORN_RULES = {
45
- // Codebase uses ctx, req, res, env, err, util, db, dao, etc. — too invasive
46
- // to rename.
47
- 'unicorn/prevent-abbreviations': 'off',
48
- // D1/DAO layer returns null; disabling this avoids mass rewrites.
49
- 'unicorn/no-null': 'off',
50
- // Monorepo uses CommonJS-compatible module style in some configs.
51
- 'unicorn/prefer-module': 'off',
52
- // Top-level await not available in all Workers entry points.
53
- 'unicorn/prefer-top-level-await': 'off',
54
- // Error subclassing via `new MyError()` is intentional in backend-errors.
55
- 'unicorn/custom-error-definition': 'off',
56
- // Allow process.exit in build/script files.
57
- 'unicorn/no-process-exit': 'off',
58
- // Array reduce is used intentionally in analytics/data transformation.
59
- 'unicorn/no-array-reduce': 'off',
60
- // Allow Number() — parseInt/parseFloat are used in some cases intentionally.
61
- 'unicorn/prefer-number-properties': ['error', { checkInfinity: false }],
62
- // Allow nested ternaries in JSX (React render patterns).
63
- 'unicorn/no-nested-ternary': 'off',
64
- // Allow Array.from — codebase uses it for iterables.
65
- 'unicorn/prefer-spread': 'off',
66
- // Entire codebase uses PascalCase for TS files; kebab-case would require
67
- // mass renames.
68
- 'unicorn/filename-case': 'off',
69
- // Established names should not be force-renamed.
70
- 'unicorn/name-replacements': 'off',
71
- // Zod schema builder chains and other deep method chains are intentional.
72
- 'unicorn/max-nested-calls': 'off',
73
- // import.meta.dirname is not available in all test environments.
74
- 'unicorn/prefer-import-meta-properties': 'off',
75
- // Codebase uses `err` as catch parameter name throughout.
76
- 'unicorn/catch-error-name': 'off',
77
- // Established boolean param names (retryable, enabled, etc.).
78
- 'unicorn/consistent-boolean-name': 'off',
79
- // Uint8Array#toBase64 / fromBase64 are not in all Workers runtime versions.
80
- 'unicorn/prefer-uint8array-base64': 'off',
81
- // Class member ordering would require extensive restructuring.
82
- 'unicorn/consistent-class-member-order': 'off',
83
- // API response fields use verb prefixes by convention.
84
- 'unicorn/no-non-function-verb-prefix': 'off',
85
- // forEach is used intentionally throughout the provider and utility layers.
86
- 'unicorn/no-for-each': 'off',
87
- // .then() chains in DAO and provider layers are often intentional.
88
- 'unicorn/prefer-await': 'warn',
89
- // Callback references (e.g. .map(Number)) are sometimes intentional.
90
- 'unicorn/no-array-callback-reference': 'warn',
91
- // toSorted() is ES2023 and may not be in all tsconfig lib targets.
92
- 'unicorn/no-array-sort': 'warn',
93
- // Early-return guard clauses are the established style; the rule only
94
- // rewrites the final guard of a ladder, which yields asymmetric mixed style
95
- // and long inline ternaries. Off in Mail-Meow and Edge-Sonic; canonical here
96
- // because it is the family's established style.
97
- 'unicorn/prefer-ternary': 'off',
98
- // `(await x).y` -> a named intermediate. Fires constantly in the tests,
99
- // where destructuring beside the assertion it serves is clearer.
100
- 'unicorn/no-await-expression-member': 'off',
101
- // `Number(x)` over `+x`: the `+` form is used where an explicit typeof check
102
- // has already narrowed the operand.
103
- 'unicorn/prefer-number-coercion': 'off',
104
- // Code-point iteration: the byte-level readers index deliberately, because
105
- // the offset *is* what they are reading.
106
- 'unicorn/prefer-code-point': 'off',
107
- // `if (!x) return;` over a compound condition: one guard per line, each with
108
- // its own comment, is what keeps endpoint guards readable.
109
- 'unicorn/prefer-simple-condition-first': 'off',
110
- // Module-scope `let` assigned from `beforeEach` in the test harnesses.
111
- 'unicorn/no-top-level-assignment-in-function': 'off',
112
- // Sequential `for...of` with `await` in the DAOs — D1's subrequest budget is
113
- // the scarce resource.
114
- 'unicorn/no-unreadable-for-of-expression': 'off',
115
- // `Object.hasOwn` over `in`: used where a prototype-chain hit is harmless.
116
- 'unicorn/no-computed-property-existence-check': 'off',
117
- // A labeled `break` out of two loops.
118
- 'unicorn/no-break-in-nested-loop': 'off',
119
- // `this` outside a class body: the module-level cache singletons document
120
- // their `this` contract in prose.
121
- 'unicorn/no-this-outside-of-class': 'off',
122
- // A class named inside its own static method.
123
- 'unicorn/class-reference-in-static-methods': 'off',
124
- // Assigning `globalThis.fetch` in a test — the only way to intercept the
125
- // ambient fetch in Node without a module mock.
126
- 'unicorn/no-global-object-property-assignment': 'off',
127
- // `(a ? b : c) && d`: written longhand so each precedence decision is
128
- // visible.
129
- 'unicorn/prefer-logical-operator-over-ternary': 'off',
130
- // `children[0]` in the XML helpers, which index a child list positionally.
131
- 'unicorn/better-dom-traversing': 'off',
132
- // `entries()` -> `keys()`/`values()`: the full entry is destructured.
133
- 'unicorn/prefer-iterator-to-array': 'off',
134
- // `.map(fn, thisArg)`: rejected on purpose.
135
- 'unicorn/no-array-method-this-argument': 'off',
136
- // A module-scope function that closes over nothing.
137
- 'unicorn/consistent-function-scoping': 'off',
138
- // `foo[0] === 'a' || foo[0] === 'b'` written longhand where the
139
- // alternatives are not adjacent.
140
- 'unicorn/prefer-includes-over-repeated-comparisons': 'off',
141
- // A `type` alias over an inline union, where the name is what makes the
142
- // signature and its doc comment readable.
143
- 'sonarjs/use-type-alias': 'off',
144
- // A short local alias for a type imported from a protocol package.
145
- 'sonarjs/redundant-type-aliases': 'off',
146
- // `type: value` narrowing the other way, where both spellings appear in the
147
- // same schema and the code follows whichever the spec uses there.
148
- 'sonarjs/no-nested-assignment': 'off',
149
- // `Number.isInteger` plus a separate range check, where the bounds come from
150
- // the caller's own options in one place.
151
- 'unicorn/prefer-number-is-safe-integer': 'off',
152
- // `\u{...}` over a `\xNN` escape: the table is written in the byte form the
153
- // spec prints.
154
- 'unicorn/prefer-unicode-code-point-escapes': 'off',
155
- // `self.x = this.x` in an entry model: the alias makes the verbatim
156
- // round-trip explicit.
157
- 'unicorn/no-this-assignment': 'off',
158
- // Building a `Set` at module scope from a constant list, for O(1) membership
159
- // on a path that runs per parameter.
160
- 'unicorn/no-top-level-side-effects': 'off',
161
- // A conditional whose branches are identical, kept where the two branches
162
- // are named separately to document that they are meant to diverge.
163
- 'sonarjs/no-all-duplicated-branches': 'off',
164
- // An `else` after a `return`: the flat form keeps the remaining cases at one
165
- // indent level in the dispatch tables.
166
- 'unicorn/prefer-else-if': 'off',
167
- // A nested ternary in a sort comparator, where the three-way order is the
168
- // point.
169
- 'unicorn/prefer-minimal-ternary': 'off',
170
- // `void promise` where initiating the call is the point and the rejection is
171
- // handled at a named site elsewhere.
172
- 'sonarjs/void-use': 'off',
173
- // `x === undefined` reported as always-true/false. With
174
- // `noUncheckedIndexedAccess` on, the guard is exactly right.
175
- 'sonarjs/different-types-comparison': 'off',
176
- // An accumulating loop with a sequential `await` in it, over D1 writes.
177
- 'unicorn/prefer-array-from-async': 'off',
178
- };
179
- /**
180
- * SonarJS rules the sources turned from errors into advisories, with the
181
- * threshold raised to a value that has actually held.
182
- */
183
- export const SONARJS_RULES = {
184
- // Raise duplicate-string threshold to avoid flagging intentional repeated
185
- // literals like provider IDs.
186
- 'sonarjs/no-duplicate-string': ['warn', { threshold: 5 }],
187
- // Cognitive complexity — warn rather than error, so the ratchet can move
188
- // without a red build. Raise the number only as files are decomposed.
189
- 'sonarjs/cognitive-complexity': ['warn', 20],
190
- // False positives: connection method names like 'imap-password' and field
191
- // names like 'password_hash'.
192
- 'sonarjs/no-hardcoded-passwords': 'off',
193
- // Third-party deprecations are warnings, not errors.
194
- 'sonarjs/deprecation': 'warn',
195
- // Nested ternaries in complex data-mapping code.
196
- 'sonarjs/no-nested-conditional': 'warn',
197
- // React component props are commonly not marked Readonly<>.
198
- 'sonarjs/prefer-read-only-props': 'warn',
199
- // Static readonly properties require invasive refactoring.
200
- 'sonarjs/public-static-readonly': 'warn',
201
- // Nested template literals in SQL queries and prompt construction.
202
- 'sonarjs/no-nested-template-literals': 'warn',
203
- };
204
- /**
205
- * Test-suite overrides.
206
- *
207
- * `test/**` is deliberately *not* in the config's ignores list. Durable-DAV,
208
- * AWS and Mail-Meow all ignored it, and ~200 KB of test code had accumulated
209
- * violations that nothing reported. This block puts the suite back under the
210
- * same rules as the rest of the workspace and switches off only the handful
211
- * whose findings are structural artefacts of test code rather than defects.
212
- * It does not disable correctness rules: the unused-variable, dead-store,
213
- * regex and sorting findings in the suite are real and are fixed, not
214
- * suppressed.
215
- */
216
- export const TEST_RULES = {
217
- // `it('…', async () => …)` is the Vitest idiom.
218
- '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: { arguments: false, attributes: false } }],
219
- // Unbound method is a common false positive in mock assertions like
220
- // expect(fn).toHaveBeenCalledWith(...).
221
- '@typescript-eslint/unbound-method': 'off',
222
- // Test helpers and stubs routinely use async functions without await.
223
- '@typescript-eslint/require-await': 'off',
224
- // Redundant type constituents appear in typed mock stubs.
225
- '@typescript-eslint/no-redundant-type-constituents': 'off',
226
- // `as never` casts are the standard fake-DB double pattern in tests.
227
- '@typescript-eslint/no-unnecessary-type-assertion': 'off',
228
- // Promise.withResolvers() and function-scoping refactors are cosmetic.
229
- 'unicorn/prefer-promise-with-resolvers': 'off',
230
- 'unicorn/consistent-function-scoping': 'off',
231
- // Fake-DB builders push-then-return and sort without comparators.
232
- 'unicorn/no-return-array-push': 'off',
233
- 'unicorn/require-array-sort-compare': 'off',
234
- // Iterator-helper rewrites churn test fakes with no runtime benefit.
235
- 'unicorn/prefer-iterator-helpers': 'off',
236
- 'unicorn/prefer-iterator-to-array': 'off',
237
- // String replacement with test-driven values is intentional in assertions.
238
- 'unicorn/no-unsafe-string-replacement': 'off',
239
- // Fake-D1 doubles await a DAO thunk and call straight onto the result.
240
- 'unicorn/no-await-expression-member': 'off',
241
- // `void promise` marks a deliberately unawaited promise in a test.
242
- 'sonarjs/void-use': 'off',
243
- // A test asserting request routing has to name `http://` hosts, and a proxy
244
- // test has to name a loopback upstream. Both are the subject matter, not
245
- // leaked configuration. `unicorn/prefer-https` must stay off here and this
246
- // is not a style preference: it rewrites `http://` to `https://` *inside
247
- // string literals*, and `--fix` applies it silently.
248
- 'sonarjs/no-clear-text-protocols': 'off',
249
- 'sonarjs/no-hardcoded-ip': 'off',
250
- 'unicorn/prefer-https': 'off',
251
- // sonarjs/assertions-in-tests fires false positives when test helpers handle
252
- // assertions indirectly.
253
- 'sonarjs/assertions-in-tests': 'off',
254
- // sonarjs/no-extra-arguments fires incorrectly on Vitest mock overloads.
255
- 'sonarjs/no-extra-arguments': 'off',
256
- // Union/inline types in test fakes are more readable than aliases.
257
- 'sonarjs/use-type-alias': 'off',
258
- // Alphabetical-sort rule fights deterministic fixture ordering.
259
- 'sonarjs/no-alphabetical-sort': 'off',
260
- // Repeated string literals in fixtures/assertions are clearer inline.
261
- 'sonarjs/no-duplicate-string': 'off',
262
- // Fake-D1 doubles break out of a nested loop to model a statement miss.
263
- 'unicorn/no-break-in-nested-loop': 'off',
264
- // Fixtures are naturally built with sort()/for…of over composed expressions.
265
- 'unicorn/no-array-sort': 'off',
266
- 'unicorn/no-unreadable-for-of-expression': 'off',
267
- 'unicorn/no-useless-template-literals': 'off',
268
- 'unicorn/no-declarations-before-early-exit': 'off',
269
- 'unicorn/prefer-includes-over-repeated-comparisons': 'off',
270
- 'sonarjs/prefer-specific-assertions': 'off',
271
- 'sonarjs/no-inverted-boolean-check': 'off',
272
- };
273
- //# sourceMappingURL=eslint-rules.js.map
1
+ const n={"@typescript-eslint/no-unused-vars":["error",{argsIgnorePattern:"^_",varsIgnorePattern:"^_"}],"@typescript-eslint/no-floating-promises":["error",{ignoreVoid:!0}],"@typescript-eslint/no-explicit-any":"warn","@typescript-eslint/no-unsafe-assignment":"warn","@typescript-eslint/no-unsafe-member-access":"warn","@typescript-eslint/no-unsafe-call":"warn","@typescript-eslint/no-unsafe-return":"warn","@typescript-eslint/no-unsafe-argument":"warn","@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:{attributes:!1,properties:!1}}],"@typescript-eslint/require-await":"off","@typescript-eslint/await-thenable":"off"},r={"unicorn/prevent-abbreviations":"off","unicorn/no-null":"off","unicorn/prefer-module":"off","unicorn/prefer-top-level-await":"off","unicorn/custom-error-definition":"off","unicorn/no-process-exit":"off","unicorn/no-array-reduce":"off","unicorn/prefer-number-properties":["error",{checkInfinity:!1}],"unicorn/no-nested-ternary":"off","unicorn/prefer-spread":"off","unicorn/filename-case":"off","unicorn/name-replacements":"off","unicorn/max-nested-calls":"off","unicorn/prefer-import-meta-properties":"off","unicorn/catch-error-name":"off","unicorn/consistent-boolean-name":"off","unicorn/prefer-uint8array-base64":"off","unicorn/consistent-class-member-order":"off","unicorn/no-non-function-verb-prefix":"off","unicorn/no-for-each":"off","unicorn/prefer-await":"warn","unicorn/no-array-callback-reference":"warn","unicorn/no-array-sort":"warn","unicorn/prefer-ternary":"off","unicorn/no-await-expression-member":"off","unicorn/prefer-number-coercion":"off","unicorn/prefer-code-point":"off","unicorn/prefer-simple-condition-first":"off","unicorn/no-top-level-assignment-in-function":"off","unicorn/no-unreadable-for-of-expression":"off","unicorn/no-computed-property-existence-check":"off","unicorn/no-break-in-nested-loop":"off","unicorn/no-this-outside-of-class":"off","unicorn/class-reference-in-static-methods":"off","unicorn/no-global-object-property-assignment":"off","unicorn/prefer-logical-operator-over-ternary":"off","unicorn/better-dom-traversing":"off","unicorn/prefer-iterator-to-array":"off","unicorn/no-array-method-this-argument":"off","unicorn/consistent-function-scoping":"off","unicorn/prefer-includes-over-repeated-comparisons":"off","sonarjs/use-type-alias":"off","sonarjs/redundant-type-aliases":"off","sonarjs/no-nested-assignment":"off","unicorn/prefer-number-is-safe-integer":"off","unicorn/prefer-unicode-code-point-escapes":"off","unicorn/no-this-assignment":"off","unicorn/no-top-level-side-effects":"off","sonarjs/no-all-duplicated-branches":"off","unicorn/prefer-else-if":"off","unicorn/prefer-minimal-ternary":"off","sonarjs/void-use":"off","sonarjs/different-types-comparison":"off","unicorn/prefer-array-from-async":"off"},o={"sonarjs/no-duplicate-string":["warn",{threshold:5}],"sonarjs/cognitive-complexity":["warn",20],"sonarjs/no-hardcoded-passwords":"off","sonarjs/deprecation":"warn","sonarjs/no-nested-conditional":"warn","sonarjs/prefer-read-only-props":"warn","sonarjs/public-static-readonly":"warn","sonarjs/no-nested-template-literals":"warn"},e={"@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:{arguments:!1,attributes:!1}}],"@typescript-eslint/unbound-method":"off","@typescript-eslint/require-await":"off","@typescript-eslint/no-redundant-type-constituents":"off","@typescript-eslint/no-unnecessary-type-assertion":"off","unicorn/prefer-promise-with-resolvers":"off","unicorn/consistent-function-scoping":"off","unicorn/no-return-array-push":"off","unicorn/require-array-sort-compare":"off","unicorn/prefer-iterator-helpers":"off","unicorn/prefer-iterator-to-array":"off","unicorn/no-unsafe-string-replacement":"off","unicorn/no-await-expression-member":"off","sonarjs/void-use":"off","sonarjs/no-clear-text-protocols":"off","sonarjs/no-hardcoded-ip":"off","unicorn/prefer-https":"off","sonarjs/assertions-in-tests":"off","sonarjs/no-extra-arguments":"off","sonarjs/use-type-alias":"off","sonarjs/no-alphabetical-sort":"off","sonarjs/no-duplicate-string":"off","unicorn/no-break-in-nested-loop":"off","unicorn/no-array-sort":"off","unicorn/no-unreadable-for-of-expression":"off","unicorn/no-useless-template-literals":"off","unicorn/no-declarations-before-early-exit":"off","unicorn/prefer-includes-over-repeated-comparisons":"off","sonarjs/prefer-specific-assertions":"off","sonarjs/no-inverted-boolean-check":"off"};export{o as SONARJS_RULES,e as TEST_RULES,n as TYPESCRIPT_RULES,r as UNICORN_RULES};
@@ -1 +1,7 @@
1
- {"version":3,"file":"eslint-rules.js","sourceRoot":"","sources":["../src/eslint-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAsC;IACjE,mCAAmC,EAAE,CAAC,OAAO,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;IACpG,gEAAgE;IAChE,yCAAyC,EAAE,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;IAC1E,8EAA8E;IAC9E,8EAA8E;IAC9E,iCAAiC;IACjC,oCAAoC,EAAE,MAAM;IAC5C,yCAAyC,EAAE,MAAM;IACjD,4CAA4C,EAAE,MAAM;IACpD,mCAAmC,EAAE,MAAM;IAC3C,qCAAqC,EAAE,MAAM;IAC7C,uCAAuC,E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repo lint config.\n *\n * Extracted from `eslint.ts` with the boundary rules: each block is a plain\n * rules object with the provenance comment that says *why* it is set to this\n * value, because a per-rule decision with no reason attached is a decision the\n * next reader re-litigates. `eslint.ts` composes these; this file is where a\n * rule's story lives.\n */\n\n/**\n * TypeScript rules, identical in all four source stacks.\n */\nexport const TYPESCRIPT_RULES: Readonly<Record<string, unknown>> = {\n '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],\n // Allow `void expr` for intentional fire-and-forget in Workers.\n '@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],\n // Relax the unsafe-any rules to warn: the external API boundaries (Cloudflare\n // bindings, provider SDKs) are typed `any` upstream, and the alternative is a\n // config that cannot be adopted.\n '@typescript-eslint/no-explicit-any': 'warn',\n '@typescript-eslint/no-unsafe-assignment': 'warn',\n '@typescript-eslint/no-unsafe-member-access': 'warn',\n '@typescript-eslint/no-unsafe-call': 'warn',\n '@typescript-eslint/no-unsafe-return': 'warn',\n '@typescript-eslint/no-unsafe-argument': 'warn',\n // JSX event handlers and hook callback objects commonly use async functions\n // where void is expected.\n '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: { attributes: false, properties: false } }],\n // An `async` function with no `await`: every handler and DAO method is\n // `async` by shape so a future `await` does not change its signature.\n '@typescript-eslint/require-await': 'off',\n // `await` on a value the types say is not thenable, where the value is a\n // `PromiseLike` from an interface declared that way.\n '@typescript-eslint/await-thenable': 'off',\n};\n\n/**\n * Unicorn and SonarJS rules carried from the source repos, each off for a\n * stated reason.\n *\n * This is the family's \"deliberately does not follow\" block: every entry is\n * off because complying would make the code worse for what the project is,\n * and each is listed rather than dropped so the decision stays reviewable.\n */\nexport const UNICORN_RULES: Readonly<Record<string, unknown>> = {\n // Codebase uses ctx, req, res, env, err, util, db, dao, etc. — too invasive\n // to rename.\n 'unicorn/prevent-abbreviations': 'off',\n // D1/DAO layer returns null; disabling this avoids mass rewrites.\n 'unicorn/no-null': 'off',\n // Monorepo uses CommonJS-compatible module style in some configs.\n 'unicorn/prefer-module': 'off',\n // Top-level await not available in all Workers entry points.\n 'unicorn/prefer-top-level-await': 'off',\n // Error subclassing via `new MyError()` is intentional in backend-errors.\n 'unicorn/custom-error-definition': 'off',\n // Allow process.exit in build/script files.\n 'unicorn/no-process-exit': 'off',\n // Array reduce is used intentionally in analytics/data transformation.\n 'unicorn/no-array-reduce': 'off',\n // Allow Number() — parseInt/parseFloat are used in some cases intentionally.\n 'unicorn/prefer-number-properties': ['error', { checkInfinity: false }],\n // Allow nested ternaries in JSX (React render patterns).\n 'unicorn/no-nested-ternary': 'off',\n // Allow Array.from — codebase uses it for iterables.\n 'unicorn/prefer-spread': 'off',\n // Entire codebase uses PascalCase for TS files; kebab-case would require\n // mass renames.\n 'unicorn/filename-case': 'off',\n // Established names should not be force-renamed.\n 'unicorn/name-replacements': 'off',\n // Zod schema builder chains and other deep method chains are intentional.\n 'unicorn/max-nested-calls': 'off',\n // import.meta.dirname is not available in all test environments.\n 'unicorn/prefer-import-meta-properties': 'off',\n // Codebase uses `err` as catch parameter name throughout.\n 'unicorn/catch-error-name': 'off',\n // Established boolean param names (retryable, enabled, etc.).\n 'unicorn/consistent-boolean-name': 'off',\n // Uint8Array#toBase64 / fromBase64 are not in all Workers runtime versions.\n 'unicorn/prefer-uint8array-base64': 'off',\n // Class member ordering would require extensive restructuring.\n 'unicorn/consistent-class-member-order': 'off',\n // API response fields use verb prefixes by convention.\n 'unicorn/no-non-function-verb-prefix': 'off',\n // forEach is used intentionally throughout the provider and utility layers.\n 'unicorn/no-for-each': 'off',\n // .then() chains in DAO and provider layers are often intentional.\n 'unicorn/prefer-await': 'warn',\n // Callback references (e.g. .map(Number)) are sometimes intentional.\n 'unicorn/no-array-callback-reference': 'warn',\n // toSorted() is ES2023 and may not be in all tsconfig lib targets.\n 'unicorn/no-array-sort': 'warn',\n // Early-return guard clauses are the established style; the rule only\n // rewrites the final guard of a ladder, which yields asymmetric mixed style\n // and long inline ternaries. Off in Mail-Meow and Edge-Sonic; canonical here\n // because it is the family's established style.\n 'unicorn/prefer-ternary': 'off',\n // `(await x).y` -> a named intermediate. Fires constantly in the tests,\n // where destructuring beside the assertion it serves is clearer.\n 'unicorn/no-await-expression-member': 'off',\n // `Number(x)` over `+x`: the `+` form is used where an explicit typeof check\n // has already narrowed the operand.\n 'unicorn/prefer-number-coercion': 'off',\n // Code-point iteration: the byte-level readers index deliberately, because\n // the offset *is* what they are reading.\n 'unicorn/prefer-code-point': 'off',\n // `if (!x) return;` over a compound condition: one guard per line, each with\n // its own comment, is what keeps endpoint guards readable.\n 'unicorn/prefer-simple-condition-first': 'off',\n // Module-scope `let` assigned from `beforeEach` in the test harnesses.\n 'unicorn/no-top-level-assignment-in-function': 'off',\n // Sequential `for...of` with `await` in the DAOs — D1's subrequest budget is\n // the scarce resource.\n 'unicorn/no-unreadable-for-of-expression': 'off',\n // `Object.hasOwn` over `in`: used where a prototype-chain hit is harmless.\n 'unicorn/no-computed-property-existence-check': 'off',\n // A labeled `break` out of two loops.\n 'unicorn/no-break-in-nested-loop': 'off',\n // `this` outside a class body: the module-level cache singletons document\n // their `this` contract in prose.\n 'unicorn/no-this-outside-of-class': 'off',\n // A class named inside its own static method.\n 'unicorn/class-reference-in-static-methods': 'off',\n // Assigning `globalThis.fetch` in a test — the only way to intercept the\n // ambient fetch in Node without a module mock.\n 'unicorn/no-global-object-property-assignment': 'off',\n // `(a ? b : c) && d`: written longhand so each precedence decision is\n // visible.\n 'unicorn/prefer-logical-operator-over-ternary': 'off',\n // `children[0]` in the XML helpers, which index a child list positionally.\n 'unicorn/better-dom-traversing': 'off',\n // `entries()` -> `keys()`/`values()`: the full entry is destructured.\n 'unicorn/prefer-iterator-to-array': 'off',\n // `.map(fn, thisArg)`: rejected on purpose.\n 'unicorn/no-array-method-this-argument': 'off',\n // A module-scope function that closes over nothing.\n 'unicorn/consistent-function-scoping': 'off',\n // `foo[0] === 'a' || foo[0] === 'b'` written longhand where the\n // alternatives are not adjacent.\n 'unicorn/prefer-includes-over-repeated-comparisons': 'off',\n // A `type` alias over an inline union, where the name is what makes the\n // signature and its doc comment readable.\n 'sonarjs/use-type-alias': 'off',\n // A short local alias for a type imported from a protocol package.\n 'sonarjs/redundant-type-aliases': 'off',\n // `type: value` narrowing the other way, where both spellings appear in the\n // same schema and the code follows whichever the spec uses there.\n 'sonarjs/no-nested-assignment': 'off',\n // `Number.isInteger` plus a separate range check, where the bounds come from\n // the caller's own options in one place.\n 'unicorn/prefer-number-is-safe-integer': 'off',\n // `\\u{...}` over a `\\xNN` escape: the table is written in the byte form the\n // spec prints.\n 'unicorn/prefer-unicode-code-point-escapes': 'off',\n // `self.x = this.x` in an entry model: the alias makes the verbatim\n // round-trip explicit.\n 'unicorn/no-this-assignment': 'off',\n // Building a `Set` at module scope from a constant list, for O(1) membership\n // on a path that runs per parameter.\n 'unicorn/no-top-level-side-effects': 'off',\n // A conditional whose branches are identical, kept where the two branches\n // are named separately to document that they are meant to diverge.\n 'sonarjs/no-all-duplicated-branches': 'off',\n // An `else` after a `return`: the flat form keeps the remaining cases at one\n // indent level in the dispatch tables.\n 'unicorn/prefer-else-if': 'off',\n // A nested ternary in a sort comparator, where the three-way order is the\n // point.\n 'unicorn/prefer-minimal-ternary': 'off',\n // `void promise` where initiating the call is the point and the rejection is\n // handled at a named site elsewhere.\n 'sonarjs/void-use': 'off',\n // `x === undefined` reported as always-true/false. With\n // `noUncheckedIndexedAccess` on, the guard is exactly right.\n 'sonarjs/different-types-comparison': 'off',\n // An accumulating loop with a sequential `await` in it, over D1 writes.\n 'unicorn/prefer-array-from-async': 'off',\n};\n\n/**\n * SonarJS rules the sources turned from errors into advisories, with the\n * threshold raised to a value that has actually held.\n */\nexport const SONARJS_RULES: Readonly<Record<string, unknown>> = {\n // Raise duplicate-string threshold to avoid flagging intentional repeated\n // literals like provider IDs.\n 'sonarjs/no-duplicate-string': ['warn', { threshold: 5 }],\n // Cognitive complexity — warn rather than error, so the ratchet can move\n // without a red build. Raise the number only as files are decomposed.\n 'sonarjs/cognitive-complexity': ['warn', 20],\n // False positives: connection method names like 'imap-password' and field\n // names like 'password_hash'.\n 'sonarjs/no-hardcoded-passwords': 'off',\n // Third-party deprecations are warnings, not errors.\n 'sonarjs/deprecation': 'warn',\n // Nested ternaries in complex data-mapping code.\n 'sonarjs/no-nested-conditional': 'warn',\n // React component props are commonly not marked Readonly<>.\n 'sonarjs/prefer-read-only-props': 'warn',\n // Static readonly properties require invasive refactoring.\n 'sonarjs/public-static-readonly': 'warn',\n // Nested template literals in SQL queries and prompt construction.\n 'sonarjs/no-nested-template-literals': 'warn',\n};\n\n/**\n * Test-suite overrides.\n *\n * `test/**` is deliberately *not* in the config's ignores list. Durable-DAV,\n * AWS and Mail-Meow all ignored it, and ~200 KB of test code had accumulated\n * violations that nothing reported. This block puts the suite back under the\n * same rules as the rest of the workspace and switches off only the handful\n * whose findings are structural artefacts of test code rather than defects.\n * It does not disable correctness rules: the unused-variable, dead-store,\n * regex and sorting findings in the suite are real and are fixed, not\n * suppressed.\n */\nexport const TEST_RULES: Readonly<Record<string, unknown>> = {\n // `it('…', async () => …)` is the Vitest idiom.\n '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: { arguments: false, attributes: false } }],\n // Unbound method is a common false positive in mock assertions like\n // expect(fn).toHaveBeenCalledWith(...).\n '@typescript-eslint/unbound-method': 'off',\n // Test helpers and stubs routinely use async functions without await.\n '@typescript-eslint/require-await': 'off',\n // Redundant type constituents appear in typed mock stubs.\n '@typescript-eslint/no-redundant-type-constituents': 'off',\n // `as never` casts are the standard fake-DB double pattern in tests.\n '@typescript-eslint/no-unnecessary-type-assertion': 'off',\n // Promise.withResolvers() and function-scoping refactors are cosmetic.\n 'unicorn/prefer-promise-with-resolvers': 'off',\n 'unicorn/consistent-function-scoping': 'off',\n // Fake-DB builders push-then-return and sort without comparators.\n 'unicorn/no-return-array-push': 'off',\n 'unicorn/require-array-sort-compare': 'off',\n // Iterator-helper rewrites churn test fakes with no runtime benefit.\n 'unicorn/prefer-iterator-helpers': 'off',\n 'unicorn/prefer-iterator-to-array': 'off',\n // String replacement with test-driven values is intentional in assertions.\n 'unicorn/no-unsafe-string-replacement': 'off',\n // Fake-D1 doubles await a DAO thunk and call straight onto the result.\n 'unicorn/no-await-expression-member': 'off',\n // `void promise` marks a deliberately unawaited promise in a test.\n 'sonarjs/void-use': 'off',\n // A test asserting request routing has to name `http://` hosts, and a proxy\n // test has to name a loopback upstream. Both are the subject matter, not\n // leaked configuration. `unicorn/prefer-https` must stay off here and this\n // is not a style preference: it rewrites `http://` to `https://` *inside\n // string literals*, and `--fix` applies it silently.\n 'sonarjs/no-clear-text-protocols': 'off',\n 'sonarjs/no-hardcoded-ip': 'off',\n 'unicorn/prefer-https': 'off',\n // sonarjs/assertions-in-tests fires false positives when test helpers handle\n // assertions indirectly.\n 'sonarjs/assertions-in-tests': 'off',\n // sonarjs/no-extra-arguments fires incorrectly on Vitest mock overloads.\n 'sonarjs/no-extra-arguments': 'off',\n // Union/inline types in test fakes are more readable than aliases.\n 'sonarjs/use-type-alias': 'off',\n // Alphabetical-sort rule fights deterministic fixture ordering.\n 'sonarjs/no-alphabetical-sort': 'off',\n // Repeated string literals in fixtures/assertions are clearer inline.\n 'sonarjs/no-duplicate-string': 'off',\n // Fake-D1 doubles break out of a nested loop to model a statement miss.\n 'unicorn/no-break-in-nested-loop': 'off',\n // Fixtures are naturally built with sort()/for…of over composed expressions.\n 'unicorn/no-array-sort': 'off',\n 'unicorn/no-unreadable-for-of-expression': 'off',\n 'unicorn/no-useless-template-literals': 'off',\n 'unicorn/no-declarations-before-early-exit': 'off',\n 'unicorn/prefer-includes-over-repeated-comparisons': 'off',\n 'sonarjs/prefer-specific-assertions': 'off',\n 'sonarjs/no-inverted-boolean-check': 'off',\n};\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/eslint-rules.ts"],
4
+ "sourcesContent": ["/**\n * The rule-override blocks of the repo lint config.\n *\n * Extracted from `eslint.ts` with the boundary rules: each block is a plain\n * rules object with the provenance comment that says *why* it is set to this\n * value, because a per-rule decision with no reason attached is a decision the\n * next reader re-litigates. `eslint.ts` composes these; this file is where a\n * rule's story lives.\n */\n\n/**\n * TypeScript rules, identical in all four source stacks.\n */\nexport const TYPESCRIPT_RULES: Readonly<Record<string, unknown>> = {\n '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],\n // Allow `void expr` for intentional fire-and-forget in Workers.\n '@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],\n // Relax the unsafe-any rules to warn: the external API boundaries (Cloudflare\n // bindings, provider SDKs) are typed `any` upstream, and the alternative is a\n // config that cannot be adopted.\n '@typescript-eslint/no-explicit-any': 'warn',\n '@typescript-eslint/no-unsafe-assignment': 'warn',\n '@typescript-eslint/no-unsafe-member-access': 'warn',\n '@typescript-eslint/no-unsafe-call': 'warn',\n '@typescript-eslint/no-unsafe-return': 'warn',\n '@typescript-eslint/no-unsafe-argument': 'warn',\n // JSX event handlers and hook callback objects commonly use async functions\n // where void is expected.\n '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: { attributes: false, properties: false } }],\n // An `async` function with no `await`: every handler and DAO method is\n // `async` by shape so a future `await` does not change its signature.\n '@typescript-eslint/require-await': 'off',\n // `await` on a value the types say is not thenable, where the value is a\n // `PromiseLike` from an interface declared that way.\n '@typescript-eslint/await-thenable': 'off',\n};\n\n/**\n * Unicorn and SonarJS rules carried from the source repos, each off for a\n * stated reason.\n *\n * This is the family's \"deliberately does not follow\" block: every entry is\n * off because complying would make the code worse for what the project is,\n * and each is listed rather than dropped so the decision stays reviewable.\n */\nexport const UNICORN_RULES: Readonly<Record<string, unknown>> = {\n // Codebase uses ctx, req, res, env, err, util, db, dao, etc. — too invasive\n // to rename.\n 'unicorn/prevent-abbreviations': 'off',\n // D1/DAO layer returns null; disabling this avoids mass rewrites.\n 'unicorn/no-null': 'off',\n // Monorepo uses CommonJS-compatible module style in some configs.\n 'unicorn/prefer-module': 'off',\n // Top-level await not available in all Workers entry points.\n 'unicorn/prefer-top-level-await': 'off',\n // Error subclassing via `new MyError()` is intentional in backend-errors.\n 'unicorn/custom-error-definition': 'off',\n // Allow process.exit in build/script files.\n 'unicorn/no-process-exit': 'off',\n // Array reduce is used intentionally in analytics/data transformation.\n 'unicorn/no-array-reduce': 'off',\n // Allow Number() — parseInt/parseFloat are used in some cases intentionally.\n 'unicorn/prefer-number-properties': ['error', { checkInfinity: false }],\n // Allow nested ternaries in JSX (React render patterns).\n 'unicorn/no-nested-ternary': 'off',\n // Allow Array.from — codebase uses it for iterables.\n 'unicorn/prefer-spread': 'off',\n // Entire codebase uses PascalCase for TS files; kebab-case would require\n // mass renames.\n 'unicorn/filename-case': 'off',\n // Established names should not be force-renamed.\n 'unicorn/name-replacements': 'off',\n // Zod schema builder chains and other deep method chains are intentional.\n 'unicorn/max-nested-calls': 'off',\n // import.meta.dirname is not available in all test environments.\n 'unicorn/prefer-import-meta-properties': 'off',\n // Codebase uses `err` as catch parameter name throughout.\n 'unicorn/catch-error-name': 'off',\n // Established boolean param names (retryable, enabled, etc.).\n 'unicorn/consistent-boolean-name': 'off',\n // Uint8Array#toBase64 / fromBase64 are not in all Workers runtime versions.\n 'unicorn/prefer-uint8array-base64': 'off',\n // Class member ordering would require extensive restructuring.\n 'unicorn/consistent-class-member-order': 'off',\n // API response fields use verb prefixes by convention.\n 'unicorn/no-non-function-verb-prefix': 'off',\n // forEach is used intentionally throughout the provider and utility layers.\n 'unicorn/no-for-each': 'off',\n // .then() chains in DAO and provider layers are often intentional.\n 'unicorn/prefer-await': 'warn',\n // Callback references (e.g. .map(Number)) are sometimes intentional.\n 'unicorn/no-array-callback-reference': 'warn',\n // toSorted() is ES2023 and may not be in all tsconfig lib targets.\n 'unicorn/no-array-sort': 'warn',\n // Early-return guard clauses are the established style; the rule only\n // rewrites the final guard of a ladder, which yields asymmetric mixed style\n // and long inline ternaries. Off in Mail-Meow and Edge-Sonic; canonical here\n // because it is the family's established style.\n 'unicorn/prefer-ternary': 'off',\n // `(await x).y` -> a named intermediate. Fires constantly in the tests,\n // where destructuring beside the assertion it serves is clearer.\n 'unicorn/no-await-expression-member': 'off',\n // `Number(x)` over `+x`: the `+` form is used where an explicit typeof check\n // has already narrowed the operand.\n 'unicorn/prefer-number-coercion': 'off',\n // Code-point iteration: the byte-level readers index deliberately, because\n // the offset *is* what they are reading.\n 'unicorn/prefer-code-point': 'off',\n // `if (!x) return;` over a compound condition: one guard per line, each with\n // its own comment, is what keeps endpoint guards readable.\n 'unicorn/prefer-simple-condition-first': 'off',\n // Module-scope `let` assigned from `beforeEach` in the test harnesses.\n 'unicorn/no-top-level-assignment-in-function': 'off',\n // Sequential `for...of` with `await` in the DAOs — D1's subrequest budget is\n // the scarce resource.\n 'unicorn/no-unreadable-for-of-expression': 'off',\n // `Object.hasOwn` over `in`: used where a prototype-chain hit is harmless.\n 'unicorn/no-computed-property-existence-check': 'off',\n // A labeled `break` out of two loops.\n 'unicorn/no-break-in-nested-loop': 'off',\n // `this` outside a class body: the module-level cache singletons document\n // their `this` contract in prose.\n 'unicorn/no-this-outside-of-class': 'off',\n // A class named inside its own static method.\n 'unicorn/class-reference-in-static-methods': 'off',\n // Assigning `globalThis.fetch` in a test — the only way to intercept the\n // ambient fetch in Node without a module mock.\n 'unicorn/no-global-object-property-assignment': 'off',\n // `(a ? b : c) && d`: written longhand so each precedence decision is\n // visible.\n 'unicorn/prefer-logical-operator-over-ternary': 'off',\n // `children[0]` in the XML helpers, which index a child list positionally.\n 'unicorn/better-dom-traversing': 'off',\n // `entries()` -> `keys()`/`values()`: the full entry is destructured.\n 'unicorn/prefer-iterator-to-array': 'off',\n // `.map(fn, thisArg)`: rejected on purpose.\n 'unicorn/no-array-method-this-argument': 'off',\n // A module-scope function that closes over nothing.\n 'unicorn/consistent-function-scoping': 'off',\n // `foo[0] === 'a' || foo[0] === 'b'` written longhand where the\n // alternatives are not adjacent.\n 'unicorn/prefer-includes-over-repeated-comparisons': 'off',\n // A `type` alias over an inline union, where the name is what makes the\n // signature and its doc comment readable.\n 'sonarjs/use-type-alias': 'off',\n // A short local alias for a type imported from a protocol package.\n 'sonarjs/redundant-type-aliases': 'off',\n // `type: value` narrowing the other way, where both spellings appear in the\n // same schema and the code follows whichever the spec uses there.\n 'sonarjs/no-nested-assignment': 'off',\n // `Number.isInteger` plus a separate range check, where the bounds come from\n // the caller's own options in one place.\n 'unicorn/prefer-number-is-safe-integer': 'off',\n // `\\u{...}` over a `\\xNN` escape: the table is written in the byte form the\n // spec prints.\n 'unicorn/prefer-unicode-code-point-escapes': 'off',\n // `self.x = this.x` in an entry model: the alias makes the verbatim\n // round-trip explicit.\n 'unicorn/no-this-assignment': 'off',\n // Building a `Set` at module scope from a constant list, for O(1) membership\n // on a path that runs per parameter.\n 'unicorn/no-top-level-side-effects': 'off',\n // A conditional whose branches are identical, kept where the two branches\n // are named separately to document that they are meant to diverge.\n 'sonarjs/no-all-duplicated-branches': 'off',\n // An `else` after a `return`: the flat form keeps the remaining cases at one\n // indent level in the dispatch tables.\n 'unicorn/prefer-else-if': 'off',\n // A nested ternary in a sort comparator, where the three-way order is the\n // point.\n 'unicorn/prefer-minimal-ternary': 'off',\n // `void promise` where initiating the call is the point and the rejection is\n // handled at a named site elsewhere.\n 'sonarjs/void-use': 'off',\n // `x === undefined` reported as always-true/false. With\n // `noUncheckedIndexedAccess` on, the guard is exactly right.\n 'sonarjs/different-types-comparison': 'off',\n // An accumulating loop with a sequential `await` in it, over D1 writes.\n 'unicorn/prefer-array-from-async': 'off',\n};\n\n/**\n * SonarJS rules the sources turned from errors into advisories, with the\n * threshold raised to a value that has actually held.\n */\nexport const SONARJS_RULES: Readonly<Record<string, unknown>> = {\n // Raise duplicate-string threshold to avoid flagging intentional repeated\n // literals like provider IDs.\n 'sonarjs/no-duplicate-string': ['warn', { threshold: 5 }],\n // Cognitive complexity — warn rather than error, so the ratchet can move\n // without a red build. Raise the number only as files are decomposed.\n 'sonarjs/cognitive-complexity': ['warn', 20],\n // False positives: connection method names like 'imap-password' and field\n // names like 'password_hash'.\n 'sonarjs/no-hardcoded-passwords': 'off',\n // Third-party deprecations are warnings, not errors.\n 'sonarjs/deprecation': 'warn',\n // Nested ternaries in complex data-mapping code.\n 'sonarjs/no-nested-conditional': 'warn',\n // React component props are commonly not marked Readonly<>.\n 'sonarjs/prefer-read-only-props': 'warn',\n // Static readonly properties require invasive refactoring.\n 'sonarjs/public-static-readonly': 'warn',\n // Nested template literals in SQL queries and prompt construction.\n 'sonarjs/no-nested-template-literals': 'warn',\n};\n\n/**\n * Test-suite overrides.\n *\n * `test/**` is deliberately *not* in the config's ignores list. Durable-DAV,\n * AWS and Mail-Meow all ignored it, and ~200 KB of test code had accumulated\n * violations that nothing reported. This block puts the suite back under the\n * same rules as the rest of the workspace and switches off only the handful\n * whose findings are structural artefacts of test code rather than defects.\n * It does not disable correctness rules: the unused-variable, dead-store,\n * regex and sorting findings in the suite are real and are fixed, not\n * suppressed.\n */\nexport const TEST_RULES: Readonly<Record<string, unknown>> = {\n // `it('…', async () => …)` is the Vitest idiom.\n '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: { arguments: false, attributes: false } }],\n // Unbound method is a common false positive in mock assertions like\n // expect(fn).toHaveBeenCalledWith(...).\n '@typescript-eslint/unbound-method': 'off',\n // Test helpers and stubs routinely use async functions without await.\n '@typescript-eslint/require-await': 'off',\n // Redundant type constituents appear in typed mock stubs.\n '@typescript-eslint/no-redundant-type-constituents': 'off',\n // `as never` casts are the standard fake-DB double pattern in tests.\n '@typescript-eslint/no-unnecessary-type-assertion': 'off',\n // Promise.withResolvers() and function-scoping refactors are cosmetic.\n 'unicorn/prefer-promise-with-resolvers': 'off',\n 'unicorn/consistent-function-scoping': 'off',\n // Fake-DB builders push-then-return and sort without comparators.\n 'unicorn/no-return-array-push': 'off',\n 'unicorn/require-array-sort-compare': 'off',\n // Iterator-helper rewrites churn test fakes with no runtime benefit.\n 'unicorn/prefer-iterator-helpers': 'off',\n 'unicorn/prefer-iterator-to-array': 'off',\n // String replacement with test-driven values is intentional in assertions.\n 'unicorn/no-unsafe-string-replacement': 'off',\n // Fake-D1 doubles await a DAO thunk and call straight onto the result.\n 'unicorn/no-await-expression-member': 'off',\n // `void promise` marks a deliberately unawaited promise in a test.\n 'sonarjs/void-use': 'off',\n // A test asserting request routing has to name `http://` hosts, and a proxy\n // test has to name a loopback upstream. Both are the subject matter, not\n // leaked configuration. `unicorn/prefer-https` must stay off here and this\n // is not a style preference: it rewrites `http://` to `https://` *inside\n // string literals*, and `--fix` applies it silently.\n 'sonarjs/no-clear-text-protocols': 'off',\n 'sonarjs/no-hardcoded-ip': 'off',\n 'unicorn/prefer-https': 'off',\n // sonarjs/assertions-in-tests fires false positives when test helpers handle\n // assertions indirectly.\n 'sonarjs/assertions-in-tests': 'off',\n // sonarjs/no-extra-arguments fires incorrectly on Vitest mock overloads.\n 'sonarjs/no-extra-arguments': 'off',\n // Union/inline types in test fakes are more readable than aliases.\n 'sonarjs/use-type-alias': 'off',\n // Alphabetical-sort rule fights deterministic fixture ordering.\n 'sonarjs/no-alphabetical-sort': 'off',\n // Repeated string literals in fixtures/assertions are clearer inline.\n 'sonarjs/no-duplicate-string': 'off',\n // Fake-D1 doubles break out of a nested loop to model a statement miss.\n 'unicorn/no-break-in-nested-loop': 'off',\n // Fixtures are naturally built with sort()/for…of over composed expressions.\n 'unicorn/no-array-sort': 'off',\n 'unicorn/no-unreadable-for-of-expression': 'off',\n 'unicorn/no-useless-template-literals': 'off',\n 'unicorn/no-declarations-before-early-exit': 'off',\n 'unicorn/prefer-includes-over-repeated-comparisons': 'off',\n 'sonarjs/prefer-specific-assertions': 'off',\n 'sonarjs/no-inverted-boolean-check': 'off',\n};\n"],
5
+ "mappings": "AAaO,MAAMA,EAAsD,CACjE,oCAAqC,CAAC,QAAS,CAAE,kBAAmB,KAAM,kBAAmB,IAAI,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,+BAAgC,CAAC,OAAQ,EAAE,EAG3C,iCAAkC,MAElC,sBAAuB,OAEvB,gCAAiC,OAEjC,iCAAkC,OAElC,iCAAkC,OAElC,sCAAuC,QAe5BC,EAAgD,CAE3D,yCAA0C,CAAC,QAAS,CAAE,iBAAkB,CAAE,UAAW,GAAO,WAAY,EAAK,CAAE,CAAE,EAGjH,oCAAqC,MAErC,mCAAoC,MAEpC,oDAAqD,MAErD,mDAAoD,MAEpD,wCAAyC,MACzC,sCAAuC,MAEvC,+BAAgC,MAChC,qCAAsC,MAEtC,kCAAmC,MACnC,mCAAoC,MAEpC,uCAAwC,MAExC,qCAAsC,MAEtC,mBAAoB,MAMpB,kCAAmC,MACnC,0BAA2B,MAC3B,uBAAwB,MAGxB,8BAA+B,MAE/B,6BAA8B,MAE9B,yBAA0B,MAE1B,+BAAgC,MAEhC,8BAA+B,MAE/B,kCAAmC,MAEnC,wBAAyB,MACzB,0CAA2C,MAC3C,uCAAwC,MACxC,4CAA6C,MAC7C,oDAAqD,MACrD,qCAAsC,MACtC,oCAAqC",
6
+ "names": ["TYPESCRIPT_RULES", "UNICORN_RULES", "SONARJS_RULES", "TEST_RULES"]
7
+ }
package/dist/eslint.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * The converged ESLint flat config for a monorepo in the Rexezuge family.
3
3
  *
4
- * Provenance: the base is Durable-DAV's `eslint.config.mjs` (380+ lines, the most
4
+ * Provenance: the base is Durable-DAV's `eslint.config.mjs` (the most
5
5
  * elaborate of the nine repos, with the layered `no-restricted-imports` boundary
6
- * rules). Merged in from the other three stacks that share the same plugin set:
6
+ * rules). Merged in from the stacks that share the same plugin set:
7
7
  *
8
8
  * - **Edge-Sonic** — `test/**` is *not* ignored (it is linted like everything else,
9
9
  * with a narrow override block for Vitest idioms), and `unicorn/prefer-ternary`
@@ -14,6 +14,9 @@
14
14
  * `allowTypeImports` where the source repos do not. It is also the source for
15
15
  * the anchored skip patterns and the symlink-safe walk that came out of its own
16
16
  * backlog.
17
+ * - **CalDAV-Bridge, Mail-Otter, Durable-DAV-Router, Edge-Git, Agent-Router** —
18
+ * the `provider-clients` / `webdav`+`dav-store` / `git-protocol`+`git-service`
19
+ * layers and the per-client `apps/api` alternatives in the boundary table.
17
20
  *
18
21
  * Canonical decisions, and why each one:
19
22
  *
@@ -21,9 +24,11 @@
21
24
  * `warn`, which under `eslint --quiet` is unenforceable — a gate nobody can see
22
25
  * is a gate that has never run. Formatting drift is therefore a hard failure.
23
26
  * 2. **The layered boundary rules are parameterized by `scope`.** Every source
24
- * repo wrote the same seven blocks with a different npm scope hardcoded; the
27
+ * repo wrote the same blocks with a different npm scope hardcoded; the
25
28
  * factory takes `scope` (`'@myapp'`) and generates the `@myapp/*` patterns.
26
- * The table itself lives in {@link ./eslint-boundaries}.
29
+ * The table itself lives in {@link ./eslint-boundaries.ts} and covers the
30
+ * family superset — a repo without a domain package never triggers its ban,
31
+ * so no repo needs `extraLayers` for a known package.
27
32
  * 3. **`test/**` is linted, not ignored.** Durable-DAV/AWS/Mail-Meow ignored it;
28
33
  * Edge-Sonic does not, and records why: ~200 KB of test code had accumulated
29
34
  * violations that nothing reported.
@@ -39,13 +44,13 @@
39
44
  * zero-dependency, and the plugin belongs to the app that has JSX. A consumer
40
45
  * appends it — the README shows the four lines.
41
46
  *
42
- * The rule bodies live in {@link ./eslint-rules} and the boundary table in
43
- * {@link ./eslint-boundaries}; this file is the assembly. A repo that needs a
47
+ * The rule bodies live in {@link ./eslint-rules.ts} and the boundary table in
48
+ * {@link ./eslint-boundaries.ts}; this file is the assembly. A repo that needs a
44
49
  * boundary the canonical table does not name passes `extraLayers` — see
45
50
  * {@link RepoLintConfigOptions}.
46
51
  */
47
52
  import type { FlatConfig } from 'typescript-eslint';
48
- import type { LayerBan } from './eslint-boundaries';
53
+ import type { LayerBan } from './eslint-boundaries.ts';
49
54
  /**
50
55
  * What `defineRepoLintConfig` accepts.
51
56
  */
@@ -1 +1 @@
1
- {"version":3,"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