@ddd-ts-kit/eslint-plugin 0.0.0-stage → 0.1.1

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 (745) hide show
  1. package/README.md +292 -2
  2. package/dist/ddd-ts-kit.d.ts +5 -0
  3. package/dist/ddd-ts-kit.d.ts.map +1 -0
  4. package/dist/ddd-ts-kit.js +7 -0
  5. package/dist/ddd-ts-kit.js.map +1 -0
  6. package/dist/index.d.ts +9 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +6 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/plugin.d.ts +11 -0
  11. package/dist/plugin.d.ts.map +1 -0
  12. package/dist/plugin.js +30 -0
  13. package/dist/plugin.js.map +1 -0
  14. package/dist/presets/braces-rules.d.ts +11 -0
  15. package/dist/presets/braces-rules.d.ts.map +1 -0
  16. package/dist/presets/braces-rules.js +10 -0
  17. package/dist/presets/braces-rules.js.map +1 -0
  18. package/dist/presets/create-ddd-ts-kit.d.ts +21 -0
  19. package/dist/presets/create-ddd-ts-kit.d.ts.map +1 -0
  20. package/dist/presets/create-ddd-ts-kit.js +123 -0
  21. package/dist/presets/create-ddd-ts-kit.js.map +1 -0
  22. package/dist/presets/flat-rules.d.ts +3 -0
  23. package/dist/presets/flat-rules.d.ts.map +1 -0
  24. package/dist/presets/flat-rules.js +2 -0
  25. package/dist/presets/flat-rules.js.map +1 -0
  26. package/dist/presets/layout-rules.d.ts +11 -0
  27. package/dist/presets/layout-rules.d.ts.map +1 -0
  28. package/dist/presets/layout-rules.js +33 -0
  29. package/dist/presets/layout-rules.js.map +1 -0
  30. package/dist/presets/plugin-rule-levels.d.ts +4 -0
  31. package/dist/presets/plugin-rule-levels.d.ts.map +1 -0
  32. package/dist/presets/plugin-rule-levels.js +13 -0
  33. package/dist/presets/plugin-rule-levels.js.map +1 -0
  34. package/dist/presets/standard-rule-sets.d.ts +12 -0
  35. package/dist/presets/standard-rule-sets.d.ts.map +1 -0
  36. package/dist/presets/standard-rule-sets.js +15 -0
  37. package/dist/presets/standard-rule-sets.js.map +1 -0
  38. package/dist/presets/standard-rules.d.ts +24 -0
  39. package/dist/presets/standard-rules.d.ts.map +1 -0
  40. package/dist/presets/standard-rules.js +88 -0
  41. package/dist/presets/standard-rules.js.map +1 -0
  42. package/dist/project/alias-root.d.ts +8 -0
  43. package/dist/project/alias-root.d.ts.map +1 -0
  44. package/dist/project/alias-root.js +2 -0
  45. package/dist/project/alias-root.js.map +1 -0
  46. package/dist/project/alias-roots.d.ts +9 -0
  47. package/dist/project/alias-roots.d.ts.map +1 -0
  48. package/dist/project/alias-roots.js +17 -0
  49. package/dist/project/alias-roots.js.map +1 -0
  50. package/dist/project/config-file.d.ts +2 -0
  51. package/dist/project/config-file.d.ts.map +1 -0
  52. package/dist/project/config-file.js +2 -0
  53. package/dist/project/config-file.js.map +1 -0
  54. package/dist/project/config.d.ts +53 -0
  55. package/dist/project/config.d.ts.map +1 -0
  56. package/dist/project/config.js +2 -0
  57. package/dist/project/config.js.map +1 -0
  58. package/dist/project/configured-severity.d.ts +3 -0
  59. package/dist/project/configured-severity.d.ts.map +1 -0
  60. package/dist/project/configured-severity.js +5 -0
  61. package/dist/project/configured-severity.js.map +1 -0
  62. package/dist/project/describe-linted-file.d.ts +4 -0
  63. package/dist/project/describe-linted-file.d.ts.map +1 -0
  64. package/dist/project/describe-linted-file.js +38 -0
  65. package/dist/project/describe-linted-file.js.map +1 -0
  66. package/dist/project/find-project.d.ts +4 -0
  67. package/dist/project/find-project.d.ts.map +1 -0
  68. package/dist/project/find-project.js +37 -0
  69. package/dist/project/find-project.js.map +1 -0
  70. package/dist/project/is-record.d.ts +2 -0
  71. package/dist/project/is-record.d.ts.map +1 -0
  72. package/dist/project/is-record.js +4 -0
  73. package/dist/project/is-record.js.map +1 -0
  74. package/dist/project/is-test-file.d.ts +3 -0
  75. package/dist/project/is-test-file.d.ts.map +1 -0
  76. package/dist/project/is-test-file.js +4 -0
  77. package/dist/project/is-test-file.js.map +1 -0
  78. package/dist/project/layer.d.ts +2 -0
  79. package/dist/project/layer.d.ts.map +1 -0
  80. package/dist/project/layer.js +2 -0
  81. package/dist/project/layer.js.map +1 -0
  82. package/dist/project/lint-host.d.ts +6 -0
  83. package/dist/project/lint-host.d.ts.map +1 -0
  84. package/dist/project/lint-host.js +2 -0
  85. package/dist/project/lint-host.js.map +1 -0
  86. package/dist/project/linted-file.d.ts +13 -0
  87. package/dist/project/linted-file.d.ts.map +1 -0
  88. package/dist/project/linted-file.js +2 -0
  89. package/dist/project/linted-file.js.map +1 -0
  90. package/dist/project/locate.d.ts +5 -0
  91. package/dist/project/locate.d.ts.map +1 -0
  92. package/dist/project/locate.js +47 -0
  93. package/dist/project/locate.js.map +1 -0
  94. package/dist/project/location.d.ts +11 -0
  95. package/dist/project/location.d.ts.map +1 -0
  96. package/dist/project/location.js +2 -0
  97. package/dist/project/location.js.map +1 -0
  98. package/dist/project/parse-allowed-file.d.ts +4 -0
  99. package/dist/project/parse-allowed-file.d.ts.map +1 -0
  100. package/dist/project/parse-allowed-file.js +11 -0
  101. package/dist/project/parse-allowed-file.js.map +1 -0
  102. package/dist/project/parse-config.d.ts +10 -0
  103. package/dist/project/parse-config.d.ts.map +1 -0
  104. package/dist/project/parse-config.js +113 -0
  105. package/dist/project/parse-config.js.map +1 -0
  106. package/dist/project/plugin-settings.d.ts +8 -0
  107. package/dist/project/plugin-settings.d.ts.map +1 -0
  108. package/dist/project/plugin-settings.js +2 -0
  109. package/dist/project/plugin-settings.js.map +1 -0
  110. package/dist/project/posix.d.ts +2 -0
  111. package/dist/project/posix.d.ts.map +1 -0
  112. package/dist/project/posix.js +4 -0
  113. package/dist/project/posix.js.map +1 -0
  114. package/dist/project/resolve-import.d.ts +15 -0
  115. package/dist/project/resolve-import.d.ts.map +1 -0
  116. package/dist/project/resolve-import.js +32 -0
  117. package/dist/project/resolve-import.js.map +1 -0
  118. package/dist/project/to-alias.d.ts +7 -0
  119. package/dist/project/to-alias.d.ts.map +1 -0
  120. package/dist/project/to-alias.js +13 -0
  121. package/dist/project/to-alias.js.map +1 -0
  122. package/dist/project/to-posix.d.ts +2 -0
  123. package/dist/project/to-posix.d.ts.map +1 -0
  124. package/dist/project/to-posix.js +5 -0
  125. package/dist/project/to-posix.js.map +1 -0
  126. package/dist/rules/application-command-query-separation.d.ts +6 -0
  127. package/dist/rules/application-command-query-separation.d.ts.map +1 -0
  128. package/dist/rules/application-command-query-separation.js +49 -0
  129. package/dist/rules/application-command-query-separation.js.map +1 -0
  130. package/dist/rules/application-handler-shape.d.ts +4 -0
  131. package/dist/rules/application-handler-shape.d.ts.map +1 -0
  132. package/dist/rules/application-handler-shape.js +51 -0
  133. package/dist/rules/application-handler-shape.js.map +1 -0
  134. package/dist/rules/aspects-outside-in.d.ts +2 -0
  135. package/dist/rules/aspects-outside-in.d.ts.map +1 -0
  136. package/dist/rules/aspects-outside-in.js +45 -0
  137. package/dist/rules/aspects-outside-in.js.map +1 -0
  138. package/dist/rules/authz-actor-explicit.d.ts +5 -0
  139. package/dist/rules/authz-actor-explicit.d.ts.map +1 -0
  140. package/dist/rules/authz-actor-explicit.js +106 -0
  141. package/dist/rules/authz-actor-explicit.js.map +1 -0
  142. package/dist/rules/authz-declared.d.ts +5 -0
  143. package/dist/rules/authz-declared.d.ts.map +1 -0
  144. package/dist/rules/authz-declared.js +167 -0
  145. package/dist/rules/authz-declared.js.map +1 -0
  146. package/dist/rules/authz-in-application.d.ts +5 -0
  147. package/dist/rules/authz-in-application.d.ts.map +1 -0
  148. package/dist/rules/authz-in-application.js +202 -0
  149. package/dist/rules/authz-in-application.js.map +1 -0
  150. package/dist/rules/clean-file-size.d.ts +2 -0
  151. package/dist/rules/clean-file-size.d.ts.map +1 -0
  152. package/dist/rules/clean-file-size.js +25 -0
  153. package/dist/rules/clean-file-size.js.map +1 -0
  154. package/dist/rules/clean-function-ceiling.d.ts +6 -0
  155. package/dist/rules/clean-function-ceiling.d.ts.map +1 -0
  156. package/dist/rules/clean-function-ceiling.js +32 -0
  157. package/dist/rules/clean-function-ceiling.js.map +1 -0
  158. package/dist/rules/clean-function-size.d.ts +7 -0
  159. package/dist/rules/clean-function-size.d.ts.map +1 -0
  160. package/dist/rules/clean-function-size.js +70 -0
  161. package/dist/rules/clean-function-size.js.map +1 -0
  162. package/dist/rules/clean-no-commented-out-code.d.ts +3 -0
  163. package/dist/rules/clean-no-commented-out-code.d.ts.map +1 -0
  164. package/dist/rules/clean-no-commented-out-code.js +60 -0
  165. package/dist/rules/clean-no-commented-out-code.js.map +1 -0
  166. package/dist/rules/clean-no-escape-hatch.d.ts +15 -0
  167. package/dist/rules/clean-no-escape-hatch.d.ts.map +1 -0
  168. package/dist/rules/clean-no-escape-hatch.js +116 -0
  169. package/dist/rules/clean-no-escape-hatch.js.map +1 -0
  170. package/dist/rules/clean-no-flag-argument.d.ts +2 -0
  171. package/dist/rules/clean-no-flag-argument.d.ts.map +1 -0
  172. package/dist/rules/clean-no-flag-argument.js +80 -0
  173. package/dist/rules/clean-no-flag-argument.js.map +1 -0
  174. package/dist/rules/clean-no-hash-private.d.ts +2 -0
  175. package/dist/rules/clean-no-hash-private.d.ts.map +1 -0
  176. package/dist/rules/clean-no-hash-private.js +36 -0
  177. package/dist/rules/clean-no-hash-private.js.map +1 -0
  178. package/dist/rules/clean-no-noise-comment.d.ts +5 -0
  179. package/dist/rules/clean-no-noise-comment.d.ts.map +1 -0
  180. package/dist/rules/clean-no-noise-comment.js +187 -0
  181. package/dist/rules/clean-no-noise-comment.js.map +1 -0
  182. package/dist/rules/clean-one-export-per-file.d.ts +10 -0
  183. package/dist/rules/clean-one-export-per-file.d.ts.map +1 -0
  184. package/dist/rules/clean-one-export-per-file.js +124 -0
  185. package/dist/rules/clean-one-export-per-file.js.map +1 -0
  186. package/dist/rules/clean-stepdown.d.ts +3 -0
  187. package/dist/rules/clean-stepdown.d.ts.map +1 -0
  188. package/dist/rules/clean-stepdown.js +33 -0
  189. package/dist/rules/clean-stepdown.js.map +1 -0
  190. package/dist/rules/context-boundaries.d.ts +4 -0
  191. package/dist/rules/context-boundaries.d.ts.map +1 -0
  192. package/dist/rules/context-boundaries.js +87 -0
  193. package/dist/rules/context-boundaries.js.map +1 -0
  194. package/dist/rules/context-extractable.d.ts +5 -0
  195. package/dist/rules/context-extractable.d.ts.map +1 -0
  196. package/dist/rules/context-extractable.js +242 -0
  197. package/dist/rules/context-extractable.js.map +1 -0
  198. package/dist/rules/declarations-role-declared.d.ts +5 -0
  199. package/dist/rules/declarations-role-declared.d.ts.map +1 -0
  200. package/dist/rules/declarations-role-declared.js +142 -0
  201. package/dist/rules/declarations-role-declared.js.map +1 -0
  202. package/dist/rules/domain-aggregate-encapsulation.d.ts +4 -0
  203. package/dist/rules/domain-aggregate-encapsulation.d.ts.map +1 -0
  204. package/dist/rules/domain-aggregate-encapsulation.js +93 -0
  205. package/dist/rules/domain-aggregate-encapsulation.js.map +1 -0
  206. package/dist/rules/domain-events-dispatched-on-save.d.ts +3 -0
  207. package/dist/rules/domain-events-dispatched-on-save.d.ts.map +1 -0
  208. package/dist/rules/domain-events-dispatched-on-save.js +87 -0
  209. package/dist/rules/domain-events-dispatched-on-save.js.map +1 -0
  210. package/dist/rules/domain-events-transactional-before-commit.d.ts +4 -0
  211. package/dist/rules/domain-events-transactional-before-commit.d.ts.map +1 -0
  212. package/dist/rules/domain-events-transactional-before-commit.js +121 -0
  213. package/dist/rules/domain-events-transactional-before-commit.js.map +1 -0
  214. package/dist/rules/domain-no-generic-error.d.ts +2 -0
  215. package/dist/rules/domain-no-generic-error.d.ts.map +1 -0
  216. package/dist/rules/domain-no-generic-error.js +32 -0
  217. package/dist/rules/domain-no-generic-error.js.map +1 -0
  218. package/dist/rules/domain-value-object-immutability.d.ts +4 -0
  219. package/dist/rules/domain-value-object-immutability.d.ts.map +1 -0
  220. package/dist/rules/domain-value-object-immutability.js +77 -0
  221. package/dist/rules/domain-value-object-immutability.js.map +1 -0
  222. package/dist/rules/events-consumer-idempotent.d.ts +5 -0
  223. package/dist/rules/events-consumer-idempotent.d.ts.map +1 -0
  224. package/dist/rules/events-consumer-idempotent.js +115 -0
  225. package/dist/rules/events-consumer-idempotent.js.map +1 -0
  226. package/dist/rules/events-name-format.d.ts +2 -0
  227. package/dist/rules/events-name-format.d.ts.map +1 -0
  228. package/dist/rules/events-name-format.js +53 -0
  229. package/dist/rules/events-name-format.js.map +1 -0
  230. package/dist/rules/events-outbox-required.d.ts +7 -0
  231. package/dist/rules/events-outbox-required.d.ts.map +1 -0
  232. package/dist/rules/events-outbox-required.js +82 -0
  233. package/dist/rules/events-outbox-required.js.map +1 -0
  234. package/dist/rules/governance-recorded-deviation.d.ts +2 -0
  235. package/dist/rules/governance-recorded-deviation.d.ts.map +1 -0
  236. package/dist/rules/governance-recorded-deviation.js +73 -0
  237. package/dist/rules/governance-recorded-deviation.js.map +1 -0
  238. package/dist/rules/imports-alias-only.d.ts +5 -0
  239. package/dist/rules/imports-alias-only.d.ts.map +1 -0
  240. package/dist/rules/imports-alias-only.js +63 -0
  241. package/dist/rules/imports-alias-only.js.map +1 -0
  242. package/dist/rules/layer-application-inward.d.ts +2 -0
  243. package/dist/rules/layer-application-inward.d.ts.map +1 -0
  244. package/dist/rules/layer-application-inward.js +66 -0
  245. package/dist/rules/layer-application-inward.js.map +1 -0
  246. package/dist/rules/layer-domain-purity.d.ts +4 -0
  247. package/dist/rules/layer-domain-purity.d.ts.map +1 -0
  248. package/dist/rules/layer-domain-purity.js +75 -0
  249. package/dist/rules/layer-domain-purity.js.map +1 -0
  250. package/dist/rules/layer-sideways.d.ts +3 -0
  251. package/dist/rules/layer-sideways.d.ts.map +1 -0
  252. package/dist/rules/layer-sideways.js +42 -0
  253. package/dist/rules/layer-sideways.js.map +1 -0
  254. package/dist/rules/ports-abstract-class.d.ts +2 -0
  255. package/dist/rules/ports-abstract-class.d.ts.map +1 -0
  256. package/dist/rules/ports-abstract-class.js +74 -0
  257. package/dist/rules/ports-abstract-class.js.map +1 -0
  258. package/dist/rules/ports-implements-never-extends.d.ts +5 -0
  259. package/dist/rules/ports-implements-never-extends.d.ts.map +1 -0
  260. package/dist/rules/ports-implements-never-extends.js +81 -0
  261. package/dist/rules/ports-implements-never-extends.js.map +1 -0
  262. package/dist/rules/ports-no-concrete-dependency.d.ts +2 -0
  263. package/dist/rules/ports-no-concrete-dependency.d.ts.map +1 -0
  264. package/dist/rules/ports-no-concrete-dependency.js +32 -0
  265. package/dist/rules/ports-no-concrete-dependency.js.map +1 -0
  266. package/dist/rules/ports-no-token-constant.d.ts +5 -0
  267. package/dist/rules/ports-no-token-constant.d.ts.map +1 -0
  268. package/dist/rules/ports-no-token-constant.js +109 -0
  269. package/dist/rules/ports-no-token-constant.js.map +1 -0
  270. package/dist/rules/ports-value-import.d.ts +3 -0
  271. package/dist/rules/ports-value-import.d.ts.map +1 -0
  272. package/dist/rules/ports-value-import.js +60 -0
  273. package/dist/rules/ports-value-import.js.map +1 -0
  274. package/dist/rules/purity.d.ts +4 -0
  275. package/dist/rules/purity.d.ts.map +1 -0
  276. package/dist/rules/purity.js +65 -0
  277. package/dist/rules/purity.js.map +1 -0
  278. package/dist/rules/rules.d.ts +4 -0
  279. package/dist/rules/rules.d.ts.map +1 -0
  280. package/dist/rules/rules.js +97 -0
  281. package/dist/rules/rules.js.map +1 -0
  282. package/dist/rules/scheduling-job-name.d.ts +5 -0
  283. package/dist/rules/scheduling-job-name.d.ts.map +1 -0
  284. package/dist/rules/scheduling-job-name.js +98 -0
  285. package/dist/rules/scheduling-job-name.js.map +1 -0
  286. package/dist/rules/scheduling-job-triggers-use-case.d.ts +5 -0
  287. package/dist/rules/scheduling-job-triggers-use-case.d.ts.map +1 -0
  288. package/dist/rules/scheduling-job-triggers-use-case.js +129 -0
  289. package/dist/rules/scheduling-job-triggers-use-case.js.map +1 -0
  290. package/dist/rules/standard-no-parallel-interface.d.ts +2 -0
  291. package/dist/rules/standard-no-parallel-interface.d.ts.map +1 -0
  292. package/dist/rules/standard-no-parallel-interface.js +57 -0
  293. package/dist/rules/standard-no-parallel-interface.js.map +1 -0
  294. package/dist/rules/test-no-mocks.d.ts +2 -0
  295. package/dist/rules/test-no-mocks.d.ts.map +1 -0
  296. package/dist/rules/test-no-mocks.js +50 -0
  297. package/dist/rules/test-no-mocks.js.map +1 -0
  298. package/dist/rules/tracing-platform-only.d.ts +2 -0
  299. package/dist/rules/tracing-platform-only.d.ts.map +1 -0
  300. package/dist/rules/tracing-platform-only.js +52 -0
  301. package/dist/rules/tracing-platform-only.js.map +1 -0
  302. package/dist/support/ancestors.d.ts +4 -0
  303. package/dist/support/ancestors.d.ts.map +1 -0
  304. package/dist/support/ancestors.js +7 -0
  305. package/dist/support/ancestors.js.map +1 -0
  306. package/dist/support/calls/accessed-name.d.ts +4 -0
  307. package/dist/support/calls/accessed-name.d.ts.map +1 -0
  308. package/dist/support/calls/accessed-name.js +14 -0
  309. package/dist/support/calls/accessed-name.js.map +1 -0
  310. package/dist/support/calls/callee-name.d.ts +4 -0
  311. package/dist/support/calls/callee-name.d.ts.map +1 -0
  312. package/dist/support/calls/callee-name.js +11 -0
  313. package/dist/support/calls/callee-name.js.map +1 -0
  314. package/dist/support/calls/has-spread.d.ts +4 -0
  315. package/dist/support/calls/has-spread.d.ts.map +1 -0
  316. package/dist/support/calls/has-spread.js +6 -0
  317. package/dist/support/calls/has-spread.js.map +1 -0
  318. package/dist/support/calls/method-chain.d.ts +8 -0
  319. package/dist/support/calls/method-chain.d.ts.map +1 -0
  320. package/dist/support/calls/method-chain.js +13 -0
  321. package/dist/support/calls/method-chain.js.map +1 -0
  322. package/dist/support/calls/missing-keys.d.ts +7 -0
  323. package/dist/support/calls/missing-keys.d.ts.map +1 -0
  324. package/dist/support/calls/missing-keys.js +28 -0
  325. package/dist/support/calls/missing-keys.js.map +1 -0
  326. package/dist/support/calls/property-of.d.ts +3 -0
  327. package/dist/support/calls/property-of.d.ts.map +1 -0
  328. package/dist/support/calls/property-of.js +8 -0
  329. package/dist/support/calls/property-of.js.map +1 -0
  330. package/dist/support/classes/class-finder.d.ts +18 -0
  331. package/dist/support/classes/class-finder.d.ts.map +1 -0
  332. package/dist/support/classes/class-finder.js +76 -0
  333. package/dist/support/classes/class-finder.js.map +1 -0
  334. package/dist/support/classes/class-name.d.ts +4 -0
  335. package/dist/support/classes/class-name.d.ts.map +1 -0
  336. package/dist/support/classes/class-name.js +4 -0
  337. package/dist/support/classes/class-name.js.map +1 -0
  338. package/dist/support/classes/constructor-of.d.ts +3 -0
  339. package/dist/support/classes/constructor-of.d.ts.map +1 -0
  340. package/dist/support/classes/constructor-of.js +5 -0
  341. package/dist/support/classes/constructor-of.js.map +1 -0
  342. package/dist/support/classes/enclosing-member.d.ts +8 -0
  343. package/dist/support/classes/enclosing-member.d.ts.map +1 -0
  344. package/dist/support/classes/enclosing-member.js +15 -0
  345. package/dist/support/classes/enclosing-member.js.map +1 -0
  346. package/dist/support/classes/exported-classes.d.ts +4 -0
  347. package/dist/support/classes/exported-classes.d.ts.map +1 -0
  348. package/dist/support/classes/exported-classes.js +22 -0
  349. package/dist/support/classes/exported-classes.js.map +1 -0
  350. package/dist/support/classes/is-callable.d.ts +4 -0
  351. package/dist/support/classes/is-callable.d.ts.map +1 -0
  352. package/dist/support/classes/is-callable.js +10 -0
  353. package/dist/support/classes/is-callable.js.map +1 -0
  354. package/dist/support/classes/is-constructor.d.ts +3 -0
  355. package/dist/support/classes/is-constructor.d.ts.map +1 -0
  356. package/dist/support/classes/is-constructor.js +5 -0
  357. package/dist/support/classes/is-constructor.js.map +1 -0
  358. package/dist/support/classes/is-function.d.ts +3 -0
  359. package/dist/support/classes/is-function.d.ts.map +1 -0
  360. package/dist/support/classes/is-function.js +5 -0
  361. package/dist/support/classes/is-function.js.map +1 -0
  362. package/dist/support/classes/is-inline-export.d.ts +3 -0
  363. package/dist/support/classes/is-inline-export.d.ts.map +1 -0
  364. package/dist/support/classes/is-inline-export.js +6 -0
  365. package/dist/support/classes/is-inline-export.js.map +1 -0
  366. package/dist/support/classes/is-keyed.d.ts +5 -0
  367. package/dist/support/classes/is-keyed.d.ts.map +1 -0
  368. package/dist/support/classes/is-keyed.js +5 -0
  369. package/dist/support/classes/is-keyed.js.map +1 -0
  370. package/dist/support/classes/key-name.d.ts +3 -0
  371. package/dist/support/classes/key-name.d.ts.map +1 -0
  372. package/dist/support/classes/key-name.js +11 -0
  373. package/dist/support/classes/key-name.js.map +1 -0
  374. package/dist/support/classes/member-name.d.ts +4 -0
  375. package/dist/support/classes/member-name.d.ts.map +1 -0
  376. package/dist/support/classes/member-name.js +7 -0
  377. package/dist/support/classes/member-name.js.map +1 -0
  378. package/dist/support/classes/top-level-classes.d.ts +4 -0
  379. package/dist/support/classes/top-level-classes.d.ts.map +1 -0
  380. package/dist/support/classes/top-level-classes.js +10 -0
  381. package/dist/support/classes/top-level-classes.js.map +1 -0
  382. package/dist/support/classes/visibility-of.d.ts +4 -0
  383. package/dist/support/classes/visibility-of.d.ts.map +1 -0
  384. package/dist/support/classes/visibility-of.js +12 -0
  385. package/dist/support/classes/visibility-of.js.map +1 -0
  386. package/dist/support/comments/comment-lines.d.ts +15 -0
  387. package/dist/support/comments/comment-lines.d.ts.map +1 -0
  388. package/dist/support/comments/comment-lines.js +47 -0
  389. package/dist/support/comments/comment-lines.js.map +1 -0
  390. package/dist/support/comments/is-commented-out-code.d.ts +6 -0
  391. package/dist/support/comments/is-commented-out-code.d.ts.map +1 -0
  392. package/dist/support/comments/is-commented-out-code.js +108 -0
  393. package/dist/support/comments/is-commented-out-code.js.map +1 -0
  394. package/dist/support/comments/is-directive.d.ts +3 -0
  395. package/dist/support/comments/is-directive.d.ts.map +1 -0
  396. package/dist/support/comments/is-directive.js +6 -0
  397. package/dist/support/comments/is-directive.js.map +1 -0
  398. package/dist/support/comments/is-fragment.d.ts +3 -0
  399. package/dist/support/comments/is-fragment.d.ts.map +1 -0
  400. package/dist/support/comments/is-fragment.js +18 -0
  401. package/dist/support/comments/is-fragment.js.map +1 -0
  402. package/dist/support/comments/is-jsdoc.d.ts +3 -0
  403. package/dist/support/comments/is-jsdoc.d.ts.map +1 -0
  404. package/dist/support/comments/is-jsdoc.js +5 -0
  405. package/dist/support/comments/is-jsdoc.js.map +1 -0
  406. package/dist/support/comments/prose-opening.d.ts +3 -0
  407. package/dist/support/comments/prose-opening.d.ts.map +1 -0
  408. package/dist/support/comments/prose-opening.js +3 -0
  409. package/dist/support/comments/prose-opening.js.map +1 -0
  410. package/dist/support/comments/reads-as-prose.d.ts +3 -0
  411. package/dist/support/comments/reads-as-prose.d.ts.map +1 -0
  412. package/dist/support/comments/reads-as-prose.js +7 -0
  413. package/dist/support/comments/reads-as-prose.js.map +1 -0
  414. package/dist/support/declarations/access-decorators.d.ts +3 -0
  415. package/dist/support/declarations/access-decorators.d.ts.map +1 -0
  416. package/dist/support/declarations/access-decorators.js +3 -0
  417. package/dist/support/declarations/access-decorators.js.map +1 -0
  418. package/dist/support/declarations/declaration-reader.d.ts +19 -0
  419. package/dist/support/declarations/declaration-reader.d.ts.map +1 -0
  420. package/dist/support/declarations/declaration-reader.js +46 -0
  421. package/dist/support/declarations/declaration-reader.js.map +1 -0
  422. package/dist/support/declarations/declared-role-of.d.ts +5 -0
  423. package/dist/support/declarations/declared-role-of.d.ts.map +1 -0
  424. package/dist/support/declarations/declared-role-of.js +12 -0
  425. package/dist/support/declarations/declared-role-of.js.map +1 -0
  426. package/dist/support/declarations/declared-role.d.ts +9 -0
  427. package/dist/support/declarations/declared-role.d.ts.map +1 -0
  428. package/dist/support/declarations/declared-role.js +2 -0
  429. package/dist/support/declarations/declared-role.js.map +1 -0
  430. package/dist/support/declarations/declared-roles.d.ts +4 -0
  431. package/dist/support/declarations/declared-roles.d.ts.map +1 -0
  432. package/dist/support/declarations/declared-roles.js +20 -0
  433. package/dist/support/declarations/declared-roles.js.map +1 -0
  434. package/dist/support/declarations/is-declared-style.d.ts +3 -0
  435. package/dist/support/declarations/is-declared-style.d.ts.map +1 -0
  436. package/dist/support/declarations/is-declared-style.js +4 -0
  437. package/dist/support/declarations/is-declared-style.js.map +1 -0
  438. package/dist/support/declarations/written-name.d.ts +11 -0
  439. package/dist/support/declarations/written-name.d.ts.map +1 -0
  440. package/dist/support/declarations/written-name.js +22 -0
  441. package/dist/support/declarations/written-name.js.map +1 -0
  442. package/dist/support/declarations/written-names.d.ts +3 -0
  443. package/dist/support/declarations/written-names.d.ts.map +1 -0
  444. package/dist/support/declarations/written-names.js +7 -0
  445. package/dist/support/declarations/written-names.js.map +1 -0
  446. package/dist/support/descendants.d.ts +4 -0
  447. package/dist/support/descendants.d.ts.map +1 -0
  448. package/dist/support/descendants.js +21 -0
  449. package/dist/support/descendants.js.map +1 -0
  450. package/dist/support/exports/derived-forms-of.d.ts +8 -0
  451. package/dist/support/exports/derived-forms-of.d.ts.map +1 -0
  452. package/dist/support/exports/derived-forms-of.js +23 -0
  453. package/dist/support/exports/derived-forms-of.js.map +1 -0
  454. package/dist/support/exports/explain-exports.d.ts +11 -0
  455. package/dist/support/exports/explain-exports.d.ts.map +1 -0
  456. package/dist/support/exports/explain-exports.js +60 -0
  457. package/dist/support/exports/explain-exports.js.map +1 -0
  458. package/dist/support/exports/export-explanation.d.ts +9 -0
  459. package/dist/support/exports/export-explanation.d.ts.map +1 -0
  460. package/dist/support/exports/export-explanation.js +2 -0
  461. package/dist/support/exports/export-explanation.js.map +1 -0
  462. package/dist/support/exports/is-named-after.d.ts +8 -0
  463. package/dist/support/exports/is-named-after.d.ts.map +1 -0
  464. package/dist/support/exports/is-named-after.js +16 -0
  465. package/dist/support/exports/is-named-after.js.map +1 -0
  466. package/dist/support/exports/module-shape-of.d.ts +4 -0
  467. package/dist/support/exports/module-shape-of.d.ts.map +1 -0
  468. package/dist/support/exports/module-shape-of.js +11 -0
  469. package/dist/support/exports/module-shape-of.js.map +1 -0
  470. package/dist/support/exports/module-shape.d.ts +10 -0
  471. package/dist/support/exports/module-shape.d.ts.map +1 -0
  472. package/dist/support/exports/module-shape.js +2 -0
  473. package/dist/support/exports/module-shape.js.map +1 -0
  474. package/dist/support/exports/shares-private-state.d.ts +11 -0
  475. package/dist/support/exports/shares-private-state.d.ts.map +1 -0
  476. package/dist/support/exports/shares-private-state.js +36 -0
  477. package/dist/support/exports/shares-private-state.js.map +1 -0
  478. package/dist/support/exports/signature-of.d.ts +8 -0
  479. package/dist/support/exports/signature-of.d.ts.map +1 -0
  480. package/dist/support/exports/signature-of.js +44 -0
  481. package/dist/support/exports/signature-of.js.map +1 -0
  482. package/dist/support/exports/top-level-declaration.d.ts +10 -0
  483. package/dist/support/exports/top-level-declaration.d.ts.map +1 -0
  484. package/dist/support/exports/top-level-declaration.js +2 -0
  485. package/dist/support/exports/top-level-declaration.js.map +1 -0
  486. package/dist/support/exports/top-level-declarations.d.ts +5 -0
  487. package/dist/support/exports/top-level-declarations.d.ts.map +1 -0
  488. package/dist/support/exports/top-level-declarations.js +48 -0
  489. package/dist/support/exports/top-level-declarations.js.map +1 -0
  490. package/dist/support/exports/type-closure.d.ts +5 -0
  491. package/dist/support/exports/type-closure.d.ts.map +1 -0
  492. package/dist/support/exports/type-closure.js +18 -0
  493. package/dist/support/exports/type-closure.js.map +1 -0
  494. package/dist/support/exports/type-family-of.d.ts +8 -0
  495. package/dist/support/exports/type-family-of.d.ts.map +1 -0
  496. package/dist/support/exports/type-family-of.js +43 -0
  497. package/dist/support/exports/type-family-of.js.map +1 -0
  498. package/dist/support/exports/type-names-in.d.ts +4 -0
  499. package/dist/support/exports/type-names-in.d.ts.map +1 -0
  500. package/dist/support/exports/type-names-in.js +21 -0
  501. package/dist/support/exports/type-names-in.js.map +1 -0
  502. package/dist/support/functions/code-lines.d.ts +5 -0
  503. package/dist/support/functions/code-lines.d.ts.map +1 -0
  504. package/dist/support/functions/code-lines.js +14 -0
  505. package/dist/support/functions/code-lines.js.map +1 -0
  506. package/dist/support/functions/described-function.d.ts +11 -0
  507. package/dist/support/functions/described-function.d.ts.map +1 -0
  508. package/dist/support/functions/described-function.js +9 -0
  509. package/dist/support/functions/described-function.js.map +1 -0
  510. package/dist/support/functions/function-node.d.ts +3 -0
  511. package/dist/support/functions/function-node.d.ts.map +1 -0
  512. package/dist/support/functions/function-node.js +2 -0
  513. package/dist/support/functions/function-node.js.map +1 -0
  514. package/dist/support/glob-matcher.d.ts +3 -0
  515. package/dist/support/glob-matcher.d.ts.map +1 -0
  516. package/dist/support/glob-matcher.js +8 -0
  517. package/dist/support/glob-matcher.js.map +1 -0
  518. package/dist/support/globals/ambient-name.d.ts +8 -0
  519. package/dist/support/globals/ambient-name.d.ts.map +1 -0
  520. package/dist/support/globals/ambient-name.js +26 -0
  521. package/dist/support/globals/ambient-name.js.map +1 -0
  522. package/dist/support/globals/property-name.d.ts +3 -0
  523. package/dist/support/globals/property-name.d.ts.map +1 -0
  524. package/dist/support/globals/property-name.js +10 -0
  525. package/dist/support/globals/property-name.js.map +1 -0
  526. package/dist/support/hash-private-fix.d.ts +12 -0
  527. package/dist/support/hash-private-fix.d.ts.map +1 -0
  528. package/dist/support/hash-private-fix.js +52 -0
  529. package/dist/support/hash-private-fix.js.map +1 -0
  530. package/dist/support/imports/describe-target.d.ts +3 -0
  531. package/dist/support/imports/describe-target.d.ts.map +1 -0
  532. package/dist/support/imports/describe-target.js +11 -0
  533. package/dist/support/imports/describe-target.js.map +1 -0
  534. package/dist/support/imports/import-listener.d.ts +23 -0
  535. package/dist/support/imports/import-listener.d.ts.map +1 -0
  536. package/dist/support/imports/import-listener.js +43 -0
  537. package/dist/support/imports/import-listener.js.map +1 -0
  538. package/dist/support/imports/in-context.d.ts +4 -0
  539. package/dist/support/imports/in-context.d.ts.map +1 -0
  540. package/dist/support/imports/in-context.js +4 -0
  541. package/dist/support/imports/in-context.js.map +1 -0
  542. package/dist/support/imports/in-layer.d.ts +5 -0
  543. package/dist/support/imports/in-layer.d.ts.map +1 -0
  544. package/dist/support/imports/in-layer.js +4 -0
  545. package/dist/support/imports/in-layer.js.map +1 -0
  546. package/dist/support/imports/in-source-root.d.ts +4 -0
  547. package/dist/support/imports/in-source-root.d.ts.map +1 -0
  548. package/dist/support/imports/in-source-root.js +5 -0
  549. package/dist/support/imports/in-source-root.js.map +1 -0
  550. package/dist/support/imports/inner-layer.d.ts +4 -0
  551. package/dist/support/imports/inner-layer.d.ts.map +1 -0
  552. package/dist/support/imports/inner-layer.js +9 -0
  553. package/dist/support/imports/inner-layer.js.map +1 -0
  554. package/dist/support/imports/static-string.d.ts +3 -0
  555. package/dist/support/imports/static-string.d.ts.map +1 -0
  556. package/dist/support/imports/static-string.js +11 -0
  557. package/dist/support/imports/static-string.js.map +1 -0
  558. package/dist/support/kebab-case.d.ts +7 -0
  559. package/dist/support/kebab-case.d.ts.map +1 -0
  560. package/dist/support/kebab-case.js +13 -0
  561. package/dist/support/kebab-case.js.map +1 -0
  562. package/dist/support/members/parameter-name.d.ts +3 -0
  563. package/dist/support/members/parameter-name.d.ts.map +1 -0
  564. package/dist/support/members/parameter-name.js +7 -0
  565. package/dist/support/members/parameter-name.js.map +1 -0
  566. package/dist/support/members/parameter-properties.d.ts +4 -0
  567. package/dist/support/members/parameter-properties.d.ts.map +1 -0
  568. package/dist/support/members/parameter-properties.js +6 -0
  569. package/dist/support/members/parameter-properties.js.map +1 -0
  570. package/dist/support/members/starts-at-this.d.ts +4 -0
  571. package/dist/support/members/starts-at-this.d.ts.map +1 -0
  572. package/dist/support/members/starts-at-this.js +10 -0
  573. package/dist/support/members/starts-at-this.js.map +1 -0
  574. package/dist/support/outside-concerns/outside-concern-message.d.ts +3 -0
  575. package/dist/support/outside-concerns/outside-concern-message.d.ts.map +1 -0
  576. package/dist/support/outside-concerns/outside-concern-message.js +3 -0
  577. package/dist/support/outside-concerns/outside-concern-message.js.map +1 -0
  578. package/dist/support/outside-concerns/outside-concern.d.ts +13 -0
  579. package/dist/support/outside-concerns/outside-concern.d.ts.map +1 -0
  580. package/dist/support/outside-concerns/outside-concern.js +31 -0
  581. package/dist/support/outside-concerns/outside-concern.js.map +1 -0
  582. package/dist/support/ports/binding-call-reader.d.ts +10 -0
  583. package/dist/support/ports/binding-call-reader.d.ts.map +1 -0
  584. package/dist/support/ports/binding-call-reader.js +25 -0
  585. package/dist/support/ports/binding-call-reader.js.map +1 -0
  586. package/dist/support/ports/dependency-list-listener.d.ts +10 -0
  587. package/dist/support/ports/dependency-list-listener.d.ts.map +1 -0
  588. package/dist/support/ports/dependency-list-listener.js +37 -0
  589. package/dist/support/ports/dependency-list-listener.js.map +1 -0
  590. package/dist/support/ports/imported-binding.d.ts +11 -0
  591. package/dist/support/ports/imported-binding.d.ts.map +1 -0
  592. package/dist/support/ports/imported-binding.js +2 -0
  593. package/dist/support/ports/imported-binding.js.map +1 -0
  594. package/dist/support/ports/imported-bindings.d.ts +6 -0
  595. package/dist/support/ports/imported-bindings.d.ts.map +1 -0
  596. package/dist/support/ports/imported-bindings.js +19 -0
  597. package/dist/support/ports/imported-bindings.js.map +1 -0
  598. package/dist/support/ports/is-port-file.d.ts +4 -0
  599. package/dist/support/ports/is-port-file.d.ts.map +1 -0
  600. package/dist/support/ports/is-port-file.js +13 -0
  601. package/dist/support/ports/is-port-file.js.map +1 -0
  602. package/dist/support/purity-rule.d.ts +19 -0
  603. package/dist/support/purity-rule.d.ts.map +1 -0
  604. package/dist/support/purity-rule.js +74 -0
  605. package/dist/support/purity-rule.js.map +1 -0
  606. package/dist/support/rule/define-rule.d.ts +30 -0
  607. package/dist/support/rule/define-rule.d.ts.map +1 -0
  608. package/dist/support/rule/define-rule.js +51 -0
  609. package/dist/support/rule/define-rule.js.map +1 -0
  610. package/dist/support/rule/docs-of.d.ts +6 -0
  611. package/dist/support/rule/docs-of.d.ts.map +1 -0
  612. package/dist/support/rule/docs-of.js +9 -0
  613. package/dist/support/rule/docs-of.js.map +1 -0
  614. package/dist/support/rule/rule-docs.d.ts +9 -0
  615. package/dist/support/rule/rule-docs.d.ts.map +1 -0
  616. package/dist/support/rule/rule-docs.js +2 -0
  617. package/dist/support/rule/rule-docs.js.map +1 -0
  618. package/dist/support/scheduling/is-job-file.d.ts +4 -0
  619. package/dist/support/scheduling/is-job-file.d.ts.map +1 -0
  620. package/dist/support/scheduling/is-job-file.js +11 -0
  621. package/dist/support/scheduling/is-job-file.js.map +1 -0
  622. package/dist/support/scheduling/registered-job.d.ts +11 -0
  623. package/dist/support/scheduling/registered-job.d.ts.map +1 -0
  624. package/dist/support/scheduling/registered-job.js +17 -0
  625. package/dist/support/scheduling/registered-job.js.map +1 -0
  626. package/dist/support/standard-interfaces/boundary-names.d.ts +3 -0
  627. package/dist/support/standard-interfaces/boundary-names.d.ts.map +1 -0
  628. package/dist/support/standard-interfaces/boundary-names.js +3 -0
  629. package/dist/support/standard-interfaces/boundary-names.js.map +1 -0
  630. package/dist/support/standard-interfaces/parallel-names.d.ts +4 -0
  631. package/dist/support/standard-interfaces/parallel-names.d.ts.map +1 -0
  632. package/dist/support/standard-interfaces/parallel-names.js +76 -0
  633. package/dist/support/standard-interfaces/parallel-names.js.map +1 -0
  634. package/dist/support/standard-interfaces/standard-names-in.d.ts +3 -0
  635. package/dist/support/standard-interfaces/standard-names-in.d.ts.map +1 -0
  636. package/dist/support/standard-interfaces/standard-names-in.js +5 -0
  637. package/dist/support/standard-interfaces/standard-names-in.js.map +1 -0
  638. package/dist/support/stepdown/call-graph.d.ts +8 -0
  639. package/dist/support/stepdown/call-graph.d.ts.map +1 -0
  640. package/dist/support/stepdown/call-graph.js +27 -0
  641. package/dist/support/stepdown/call-graph.js.map +1 -0
  642. package/dist/support/stepdown/member-use.d.ts +7 -0
  643. package/dist/support/stepdown/member-use.d.ts.map +1 -0
  644. package/dist/support/stepdown/member-use.js +2 -0
  645. package/dist/support/stepdown/member-use.js.map +1 -0
  646. package/dist/support/stepdown/member-uses.d.ts +9 -0
  647. package/dist/support/stepdown/member-uses.d.ts.map +1 -0
  648. package/dist/support/stepdown/member-uses.js +27 -0
  649. package/dist/support/stepdown/member-uses.js.map +1 -0
  650. package/dist/support/stepdown/misplaced-functions.d.ts +11 -0
  651. package/dist/support/stepdown/misplaced-functions.d.ts.map +1 -0
  652. package/dist/support/stepdown/misplaced-functions.js +80 -0
  653. package/dist/support/stepdown/misplaced-functions.js.map +1 -0
  654. package/dist/support/stepdown/misplaced-members.d.ts +10 -0
  655. package/dist/support/stepdown/misplaced-members.d.ts.map +1 -0
  656. package/dist/support/stepdown/misplaced-members.js +73 -0
  657. package/dist/support/stepdown/misplaced-members.js.map +1 -0
  658. package/dist/support/suppressions/shares-line-with-code.d.ts +3 -0
  659. package/dist/support/suppressions/shares-line-with-code.d.ts.map +1 -0
  660. package/dist/support/suppressions/shares-line-with-code.js +5 -0
  661. package/dist/support/suppressions/shares-line-with-code.js.map +1 -0
  662. package/dist/support/suppressions/suppressed-lines.d.ts +4 -0
  663. package/dist/support/suppressions/suppressed-lines.d.ts.map +1 -0
  664. package/dist/support/suppressions/suppressed-lines.js +17 -0
  665. package/dist/support/suppressions/suppressed-lines.js.map +1 -0
  666. package/dist/support/types/declared-type-name.d.ts +6 -0
  667. package/dist/support/types/declared-type-name.d.ts.map +1 -0
  668. package/dist/support/types/declared-type-name.js +33 -0
  669. package/dist/support/types/declared-type-name.js.map +1 -0
  670. package/dist/support/types/parameter-binding.d.ts +4 -0
  671. package/dist/support/types/parameter-binding.d.ts.map +1 -0
  672. package/dist/support/types/parameter-binding.js +7 -0
  673. package/dist/support/types/parameter-binding.js.map +1 -0
  674. package/dist/support/types/parameter-type-name.d.ts +3 -0
  675. package/dist/support/types/parameter-type-name.d.ts.map +1 -0
  676. package/dist/support/types/parameter-type-name.js +6 -0
  677. package/dist/support/types/parameter-type-name.js.map +1 -0
  678. package/dist/support/types/type-reference-name.d.ts +4 -0
  679. package/dist/support/types/type-reference-name.d.ts.map +1 -0
  680. package/dist/support/types/type-reference-name.js +14 -0
  681. package/dist/support/types/type-reference-name.js.map +1 -0
  682. package/dist/support/words/same-word.d.ts +3 -0
  683. package/dist/support/words/same-word.d.ts.map +1 -0
  684. package/dist/support/words/same-word.js +75 -0
  685. package/dist/support/words/same-word.js.map +1 -0
  686. package/dist/support/words/split-words.d.ts +3 -0
  687. package/dist/support/words/split-words.d.ts.map +1 -0
  688. package/dist/support/words/split-words.js +12 -0
  689. package/dist/support/words/split-words.js.map +1 -0
  690. package/dist/version.d.ts +2 -0
  691. package/dist/version.d.ts.map +1 -0
  692. package/dist/version.js +2 -0
  693. package/dist/version.js.map +1 -0
  694. package/docs/rules/application-command-query-separation.md +54 -0
  695. package/docs/rules/application-handler-shape.md +52 -0
  696. package/docs/rules/aspects-outside-in.md +54 -0
  697. package/docs/rules/authz-actor-explicit.md +70 -0
  698. package/docs/rules/authz-declared.md +87 -0
  699. package/docs/rules/authz-in-application.md +88 -0
  700. package/docs/rules/clean-blank-lines.md +87 -0
  701. package/docs/rules/clean-braces.md +61 -0
  702. package/docs/rules/clean-file-size.md +43 -0
  703. package/docs/rules/clean-formatted.md +32 -0
  704. package/docs/rules/clean-function-ceiling.md +53 -0
  705. package/docs/rules/clean-function-size.md +45 -0
  706. package/docs/rules/clean-no-commented-out-code.md +48 -0
  707. package/docs/rules/clean-no-escape-hatch.md +80 -0
  708. package/docs/rules/clean-no-flag-argument.md +50 -0
  709. package/docs/rules/clean-no-hash-private.md +63 -0
  710. package/docs/rules/clean-no-noise-comment.md +55 -0
  711. package/docs/rules/clean-one-export-per-file.md +88 -0
  712. package/docs/rules/clean-stepdown.md +60 -0
  713. package/docs/rules/context-declared-relationship.md +49 -0
  714. package/docs/rules/context-extractable.md +109 -0
  715. package/docs/rules/context-published-language-is-a-contract.md +47 -0
  716. package/docs/rules/context-published-language-only.md +47 -0
  717. package/docs/rules/declarations-role-declared.md +109 -0
  718. package/docs/rules/domain-aggregate-encapsulation.md +63 -0
  719. package/docs/rules/domain-events-dispatched-on-save.md +83 -0
  720. package/docs/rules/domain-events-transactional-before-commit.md +92 -0
  721. package/docs/rules/domain-no-generic-error.md +40 -0
  722. package/docs/rules/domain-value-object-immutability.md +52 -0
  723. package/docs/rules/events-consumer-idempotent.md +68 -0
  724. package/docs/rules/events-name-format.md +50 -0
  725. package/docs/rules/events-outbox-required.md +57 -0
  726. package/docs/rules/governance-recorded-deviation.md +55 -0
  727. package/docs/rules/imports-alias-only.md +73 -0
  728. package/docs/rules/layer-application-inward.md +62 -0
  729. package/docs/rules/layer-domain-purity.md +60 -0
  730. package/docs/rules/layer-infrastructure-no-presentation.md +46 -0
  731. package/docs/rules/layer-presentation-no-infrastructure.md +46 -0
  732. package/docs/rules/ports-abstract-class.md +70 -0
  733. package/docs/rules/ports-implements-never-extends.md +53 -0
  734. package/docs/rules/ports-no-concrete-dependency.md +52 -0
  735. package/docs/rules/ports-no-token-constant.md +57 -0
  736. package/docs/rules/ports-value-import.md +55 -0
  737. package/docs/rules/purity-no-ambient-randomness.md +43 -0
  738. package/docs/rules/purity-no-environment.md +45 -0
  739. package/docs/rules/purity-no-system-clock.md +49 -0
  740. package/docs/rules/scheduling-job-name.md +57 -0
  741. package/docs/rules/scheduling-job-triggers-use-case.md +71 -0
  742. package/docs/rules/standard-no-parallel-interface.md +95 -0
  743. package/docs/rules/test-no-mocks.md +47 -0
  744. package/docs/rules/tracing-platform-only.md +65 -0
  745. package/package.json +56 -4
@@ -0,0 +1,68 @@
1
+ # ddd-ts-kit/events-consumer-idempotent
2
+
3
+ Architecture id: `events/consumer-idempotent`. Default severity: `error` in `recommended`, `error` in `strict`.
4
+
5
+ Applies to: every file of a context, tests excluded; the direct `subscribe` only in `application/` and the module file.
6
+
7
+ ## Why
8
+
9
+ Delivery is at least once. A consumer without a stable name and a processed-event store handles a redelivered event a second time: the invoice is issued twice. The name is the idempotency scope, so it is written once and never derived.
10
+
11
+ ## Reported
12
+
13
+ - `<builder>.on(definition)` or `<builder>.on(definition, {})` followed by `.handledBy(...)` or `.handledByFactory(...)`, without a `consumer` (an empty string counts as absent)
14
+ - `on(definition, handler)` of `@ddd-ts-kit/events` whose third argument does not carry both `consumer` and `processed`
15
+ - in `application/` and the module file: a direct `.subscribe(...)` whose handler is not wrapped by `idempotent(...)`
16
+ - in a declared-style project (`stack.style: "declared"`): a class carrying `@IntegrationEventHandler(...)` of `@ddd-ts-kit/kernel/declarations` whose options do not write `consumer` as a non-empty string literal (missing, empty, a variable, a template with a substitution, options held in a variable or only spread)
17
+
18
+ Incorrect:
19
+
20
+ ```ts
21
+ builder.on(productListedV1).handledBy(ProductListedHandler, [CommandBus]);
22
+
23
+ subscribeAll(platform.subscriber, [on(productListedV1, (event) => consumer.handle(event))]);
24
+
25
+ resolve(IntegrationEventSubscriber).subscribe('catalog.product.listed', (event) => consumer.handle(event));
26
+
27
+ // declared style
28
+ @IntegrationEventHandler(productListedV1, { consumer: consumerName }, [CommandBus])
29
+ export class CatalogProductListedHandler {}
30
+ ```
31
+
32
+ Correct:
33
+
34
+ ```ts
35
+ builder.on(productListedV1, { consumer: 'billing.price-list' }).handledBy(ProductListedHandler, [CommandBus]);
36
+
37
+ subscribeAll(platform.subscriber, [
38
+ on(productListedV1, (event) => consumer.handle(event), { consumer: 'billing.price-list', processed: platform.persistence.processedEvents }),
39
+ ]);
40
+
41
+ // declared style
42
+ @IntegrationEventHandler(productListedV1, { consumer: 'billing.catalog-product-listed' }, [CommandBus])
43
+ export class CatalogProductListedHandler {}
44
+ ```
45
+
46
+ ## Details
47
+
48
+ `on` is recognised by its import from `@ddd-ts-kit/events`, under any local name; `builder.on` by the chain that ends with a handler, which tells it from the `on` of an event emitter. `consume` requires both options by its type and is not judged. `subscribe(type, idempotent(name, store, handler))` is accepted: `idempotent` of the kernel is what `on` and `consume` are built on.
49
+
50
+ In a declared-style project an integration event handler class is its own registration: `@IntegrationEventHandler(definition, { consumer: '<context>.<reaction>' }, [ports])` satisfies the rule and nothing has to be written in a module file. The decorator counts when its name is imported from `@ddd-ts-kit/kernel/declarations` in the file, under an alias or a namespace too. A module file kept in a declared-style project is judged as in the explicit style. In an explicit-style project the decorator is not read.
51
+
52
+ ## Options
53
+
54
+ None.
55
+
56
+ `rules."events/consumer-idempotent"` in `ddd-ts-kit.config.json` set to `off` silences the rule, and `// ddd-ts-kit-disable-next-line events/consumer-idempotent -- <reason>` silences one line, exactly as for `ddd-ts-kit check`.
57
+
58
+ ## Limits
59
+
60
+ - Options held in a variable or spread from another object are not followed: nothing is reported as missing.
61
+ - That the consumer name is unique and stable over time is not checked here: ESLint judges one file at a time, and two `@IntegrationEventHandler`, or one and a module registration, live in two files. `ddd-ts-kit check` compares the names of the whole project, decorators included, and `createApplication` refuses a name declared twice for the same event.
62
+ - That a `*.integration-handler.ts` file carries `@IntegrationEventHandler` at all is the business of `declarations-role-declared`, which also reports the unwritten `consumer`.
63
+ - That the store is transactional, or that the mark commits with the handler, is not checked: prefer `consume`, or pass `unitOfWork`.
64
+ - Any `.subscribe(...)` in `application/` or the module file is taken for an event subscription, whatever the receiver is.
65
+
66
+ ## With the CLI checker
67
+
68
+ `ddd-ts-kit check` reports the same id from the text of the files and stays the fast edit-time guard. This rule is the authority.
@@ -0,0 +1,50 @@
1
+ # ddd-ts-kit/events-name-format
2
+
3
+ Architecture id: `events/name-format`. Default severity: `error` in `recommended`, `error` in `strict`.
4
+
5
+ Applies to: `domain/events/` and `published-language/` of a context, tests excluded.
6
+
7
+ ## Why
8
+
9
+ An event name is a public address: consumers subscribe to it, the catalog lists it. `<context>.<aggregate>.<fact>` says who owns it and what happened.
10
+
11
+ ## Reported
12
+
13
+ - in `domain/events/`: a `name` property or object key whose string is not `<this context>.<aggregate>.<fact>` in kebab-case
14
+ - in `published-language/`: the `type` given to `defineIntegrationEvent`, and any other `type` holding a dotted string
15
+
16
+ Incorrect:
17
+
18
+ ```ts
19
+ export class InvoiceIssued implements DomainEvent {
20
+ readonly name = 'InvoiceIssued';
21
+ }
22
+ ```
23
+
24
+ Correct:
25
+
26
+ ```ts
27
+ export class InvoiceIssued implements DomainEvent {
28
+ readonly name = 'billing.invoice.issued';
29
+ }
30
+ ```
31
+
32
+ ## Details
33
+
34
+ Template literals without interpolation are read like strings.
35
+
36
+ ## Options
37
+
38
+ None.
39
+
40
+ `rules."events/name-format"` in `ddd-ts-kit.config.json` set to `off` silences the rule, and `// ddd-ts-kit-disable-next-line events/name-format -- <reason>` silences one line, exactly as for `ddd-ts-kit check`.
41
+
42
+ ## Limits
43
+
44
+ - The shape and the context prefix are checked, not the grammar of the fact (past tense is checked by the generator).
45
+ - A name built at run time (`${context}.invoice.issued`) is not read.
46
+ - That an integration event is declared once, with a payload, is checked by `ddd-ts-kit check` (`events/defined-in-published-language`).
47
+
48
+ ## With the CLI checker
49
+
50
+ `ddd-ts-kit check` reports the same id and owns the companion rule `events/defined-in-published-language`. This rule is the authority for the format.
@@ -0,0 +1,57 @@
1
+ # ddd-ts-kit/events-outbox-required
2
+
3
+ Architecture id: `events/outbox-required`. Default severity: `error` in `recommended`, `error` in `strict`.
4
+
5
+ Applies to: `domain/` and `application/` of a context, tests excluded.
6
+
7
+ ## Why
8
+
9
+ Publishing an integration event and committing the state change it describes must succeed or fail together. A handler that talks to a broker does both separately: the event leaves and the transaction rolls back, or the reverse. The handler writes to the `IntegrationEventPublisher` port; the composition root binds it to the outbox, and a relay publishes afterwards.
10
+
11
+ ## Reported
12
+
13
+ - an import of a broker client: `amqplib`, `kafkajs`, `nats`, `@aws-sdk/client-sqs`, `@aws-sdk/client-sns`, `@google-cloud/pubsub`, `@ddd-ts-kit/rabbitmq` (configurable)
14
+ - an import of a concrete bus: `InMemoryEventBus`, `OutboxRelay`, `OutboxPublisher`, from any module, type-only imports included
15
+ - in `application/integration/publishers/`: a constructor parameter whose type is named `...EventBus` or `...Relay`
16
+
17
+ Incorrect:
18
+
19
+ ```ts
20
+ // application/integration/publishers/invoice-issued.publisher.ts
21
+ import type { RabbitMqEventBus } from '@ddd-ts-kit/rabbitmq';
22
+
23
+ export class InvoiceIssuedPublisher {
24
+ constructor(private readonly bus: RabbitMqEventBus) {}
25
+ }
26
+ ```
27
+
28
+ Correct:
29
+
30
+ ```ts
31
+ import type { IdGenerator, IntegrationEventPublisher } from '@ddd-ts-kit/kernel';
32
+
33
+ export class InvoiceIssuedPublisher {
34
+ constructor(private readonly publisher: IntegrationEventPublisher, private readonly ids: IdGenerator) {}
35
+ }
36
+ ```
37
+
38
+ ## Details
39
+
40
+ Static imports, type-only imports, `export ... from`, dynamic `import()` and `require()` are read for the broker packages; the concrete buses are recognised by their exported name, whatever they are renamed to.
41
+
42
+ ## Options
43
+
44
+ `[{ "brokerPackages": ["amqplib", "bullmq"] }]` replaces the default list of broker clients.
45
+
46
+ `rules."events/outbox-required"` in `ddd-ts-kit.config.json` set to `off` silences the rule, and `// ddd-ts-kit-disable-next-line events/outbox-required -- <reason>` silences one line, exactly as for `ddd-ts-kit check`.
47
+
48
+ ## Limits
49
+
50
+ - That the port is bound to an `OutboxPublisher` in the composition root, and that `stack.events` is `outbox` whenever `stack.orm` is set, is a matter of configuration and wiring: `ddd-ts-kit check` holds it.
51
+ - A handler that calls a broker through a port of its own (`NotificationQueue`) is not seen: the name of a port says nothing of what is behind.
52
+ - Outside `application/integration/publishers/` a constructor parameter typed `EventBus` is not reported: the kernel type is a port, only the publisher has a narrower one to prefer.
53
+ - A broker client that is not in the list is reported by `layer/application-inward` as a package, not by this rule.
54
+
55
+ ## With the CLI checker
56
+
57
+ `ddd-ts-kit check` reports the same id from the text of the files and owns the configuration side. This rule is the authority for the code.
@@ -0,0 +1,55 @@
1
+ # ddd-ts-kit/governance-recorded-deviation
2
+
3
+ Architecture id: `governance/recorded-deviation`. Default severity: `error` in `recommended`, `error` in `strict`.
4
+
5
+ Applies to: every linted file.
6
+
7
+ ## Why
8
+
9
+ The architecture can be changed deliberately, not bypassed case by case. A suppression is either refused or recorded as a decision, with its reason, its scope and the condition for removing it. A shortcut that is not written down is a defect, whoever asked for it.
10
+
11
+ ## Reported
12
+
13
+ - `eslint-disable`, `eslint-disable-line`, `eslint-disable-next-line` and `ddd-ts-kit-disable-next-line` whose reason after `--` holds no `ADR-<digits>`
14
+ - the same comments when they name no rule at all, whatever follows `--`
15
+
16
+ Incorrect:
17
+
18
+ ```ts
19
+ /* eslint-disable */
20
+ // eslint-disable-next-line no-console -- the CLI prints its result
21
+ console.log(result);
22
+ ```
23
+
24
+ Correct:
25
+
26
+ ```ts
27
+ // eslint-disable-next-line no-console -- ADR-0012: the CLI prints its result
28
+ console.log(result);
29
+ ```
30
+
31
+ ## Details
32
+
33
+ Record the decision with `ddd-ts-kit generate adr`, then reference its number.
34
+
35
+ ESLint drops a report made inside the range of a directive that covers its rule, so a blanket `/* eslint-disable */` would silence the very rule that judges it. Such a comment (blanket, or naming `ddd-ts-kit/governance-recorded-deviation` without a decision record) is therefore reported ahead of the range it opens: at the first position of the file for `eslint-disable`, on the line above for `eslint-disable-line`. The message always gives the line of the comment.
36
+
37
+ `clean/no-escape-hatch` reports an `eslint-disable` with no reason at all; this rule asks more of the reason. With both enabled, a comment without any reason is reported twice.
38
+
39
+ ## Options
40
+
41
+ None.
42
+
43
+ `rules."governance/recorded-deviation"` in `ddd-ts-kit.config.json` set to `off` silences the rule, and `// ddd-ts-kit-disable-next-line governance/recorded-deviation -- <reason>` silences one line, exactly as for `ddd-ts-kit check`.
44
+
45
+ ## Limits
46
+
47
+ - That `docs/adr/` holds the record named is not checked here: `ddd-ts-kit check` does.
48
+ - The other deviations of the architecture reference (a lowered severity, an extra directory, an extra allowed package in `ddd-ts-kit.config.json`) are not sources: `ddd-ts-kit check` judges them.
49
+ - A suppression written in the ESLint config (`rules: { ...: 'off' }`, `ignores`) or on the command line is out of reach of any rule.
50
+ - The report placed ahead of a blanket disable relies on the order in which ESLint applies directives; `// eslint-disable-next-line ddd-ts-kit/governance-recorded-deviation` written on the line above a comment still silences its report.
51
+ - `@ts-expect-error` and `@ts-ignore` are held by `@typescript-eslint/ban-ts-comment`.
52
+
53
+ ## With the CLI checker
54
+
55
+ `ddd-ts-kit check` reports the same id for the suppressions and for the config, and verifies that the decision record exists. This rule is the authority for the comments ESLint understands.
@@ -0,0 +1,73 @@
1
+ # ddd-ts-kit/imports-alias-only
2
+
3
+ Architecture id: `imports/alias-only`. Default severity: `error` in `recommended`, `error` in `strict`. Fixable (`eslint --fix`).
4
+
5
+ Applies to: every TypeScript file under the source root, under `test/` and under `scripts/`.
6
+
7
+ ## Why
8
+
9
+ An alias names a file from the root of the project. The import reads the same from every file, says which context and which layer it reaches without counting `../`, and does not change when the importing file moves. One spelling also means one thing to review: the layer and context rules of this plugin, `ddd-ts-kit check` and dependency-cruiser resolve an alias exactly as they resolve a relative path, so a boundary is never crossed by choosing the other spelling.
10
+
11
+ The alias is declared once, under `paths` in `tsconfig.json`, which the compiler and the tools read. Node reads no alias: `ddd-ts-kit build-aliases`, the second step of `npm run build`, rewrites each alias of the compiled output into a relative path, so the output runs with plain `node`: no loader, no runtime dependency. See [Import aliases](../../../../docs/tools/import-aliases.md).
12
+
13
+ ## Reported
14
+
15
+ - a relative specifier, `./x.js` or `../x.js`, the same directory included: fixed to the alias of the file
16
+ - a relative specifier that names a file under no aliased directory (a manifest, a build product): reported, not fixed
17
+ - an alias specifier with a `.` or `..` segment, which could name a file outside the directory of the alias: reported, not fixed
18
+
19
+ Incorrect:
20
+
21
+ ```ts
22
+ // src/contexts/billing/application/commands/issue-invoice/issue-invoice.handler.ts
23
+ import { Invoice } from '../../../domain/aggregates/invoice.aggregate.js';
24
+ import { IssueInvoiceCommand } from './issue-invoice.command.js';
25
+
26
+ // test/e2e/issue-invoice.e2e.spec.ts
27
+ import { startApplication } from './support/start-application.js';
28
+ ```
29
+
30
+ Correct:
31
+
32
+ ```ts
33
+ // src/contexts/billing/application/commands/issue-invoice/issue-invoice.handler.ts
34
+ import { IssueInvoiceCommand } from '@/contexts/billing/application/commands/issue-invoice/issue-invoice.command.js';
35
+ import { Invoice } from '@/contexts/billing/domain/aggregates/invoice.aggregate.js';
36
+
37
+ // test/e2e/issue-invoice.e2e.spec.ts
38
+ import { startApplication } from '$test/e2e/support/start-application.js';
39
+ ```
40
+
41
+ ## Details
42
+
43
+ Static imports, type-only imports, `export ... from`, `export *`, dynamic `import()`, `import()` types and `require()` are all read. A dynamic import whose specifier is computed is not judged.
44
+
45
+ The aliases of a project:
46
+
47
+ | Alias | Directory | Declared by |
48
+ |---|---|---|
49
+ | `importAlias` of `ddd-ts-kit.config.json`, `@/` by default | `sourceRoot` | the config |
50
+ | `$test/` | `test/` | fixed |
51
+ | `$scripts/` | `scripts/` | fixed |
52
+ | `$generated/` | `generated/`, with `stack.orm` `prisma` only | fixed |
53
+
54
+ The fix computes the alias from the place of the file and the config: the relative specifier is resolved from the directory of the file, and the result is written from the directory its alias names, with a `.js` extension. It keeps the quotes of the specifier. A fixed import is often longer than the line: run the formatter after the fix (`npm run format`). Fixing twice changes nothing.
55
+
56
+ Not judged: a file outside the three directories (a config file at the project root, a JavaScript migration), the client under `generated/`, which a tool writes, and a specifier that is neither relative nor one of the aliases (a package, a Node built-in).
57
+
58
+ An alias that names no file is not this rule's concern: the compiler reports it (`TS2307`), and the build refuses it (`ddd-ts-kit build-aliases`).
59
+
60
+ ## Options
61
+
62
+ None. `sourceRoot` and `importAlias` of `ddd-ts-kit.config.json` say what the alias of the sources is.
63
+
64
+ `rules."imports/alias-only"` in `ddd-ts-kit.config.json` set to `off` silences the rule, and `// ddd-ts-kit-disable-next-line imports/alias-only -- <reason>` silences one line, exactly as for `ddd-ts-kit check`.
65
+
66
+ ## Limits
67
+
68
+ - Only a module the build emits can be named by the alias: a JSON file or another asset is read at run time instead of imported.
69
+ - The rule does not check that `tsconfig.json` declares the alias, nor that the build rewrites it: `imports/alias-declared` of `ddd-ts-kit check` does, with everything else that has to follow the one declaration.
70
+
71
+ ## With the CLI checker
72
+
73
+ `ddd-ts-kit check` reports the same id from the import specifiers it reads in the text of the files, under the source root, `test/` and `scripts/`, and gives the alias to write in its fix sentence. This rule is the one that rewrites the import.
@@ -0,0 +1,62 @@
1
+ # ddd-ts-kit/layer-application-inward
2
+
3
+ Architecture id: `layer/application-inward`. Default severity: `error` in `recommended`, `error` in `strict`.
4
+
5
+ Applies to: `application/` of a context, tests excluded.
6
+
7
+ ## Why
8
+
9
+ Use cases orchestrate the domain through ports. An import of an adapter, a driver or a framework makes the use case impossible to run with fakes and moves a technical decision into the application.
10
+
11
+ ## Reported
12
+
13
+ - a package outside `applicationAllowedPackages`
14
+ - `@ddd-ts-kit/aspects`, `@ddd-ts-kit/audit`, `@ddd-ts-kit/redis`, `@ddd-ts-kit/scheduling`, `@ddd-ts-kit/sentry` and `@ddd-ts-kit/tracing`, by any entry (`.`, `/decorators`, `/testing`, `/node`, ...), with a message of their own: they apply or record a concern from outside the use cases
15
+ - any Node built-in
16
+ - `infrastructure/`, `presentation/` or the module file of the same context
17
+ - the platform or `main.ts`
18
+
19
+ Incorrect:
20
+
21
+ ```ts
22
+ // src/contexts/billing/application/commands/issue-invoice/issue-invoice.handler.ts
23
+ import { eq } from 'drizzle-orm';
24
+ import { retry } from '@ddd-ts-kit/aspects';
25
+ import { RedisCache } from '@ddd-ts-kit/redis';
26
+ import { DrizzleInvoiceRepository } from '@/contexts/billing/infrastructure/persistence/drizzle-invoice.repository.js';
27
+ ```
28
+
29
+ Correct:
30
+
31
+ ```ts
32
+ // a port is an abstract class: the type of the dependency and its injection token
33
+ import { Cache, Clock } from '@ddd-ts-kit/kernel';
34
+ import { InvoiceRepository } from '@/contexts/billing/domain/repositories/invoice.repository.js';
35
+ import { PaymentGateway } from '@/contexts/billing/application/ports/payment-gateway.port.js';
36
+
37
+ // declared style
38
+ import { CommandHandler } from '@ddd-ts-kit/kernel/declarations';
39
+
40
+ @CommandHandler(IssueInvoiceCommand, [InvoiceRepository, PaymentGateway, Clock])
41
+ export class IssueInvoiceHandler implements CommandHandler<IssueInvoiceCommand> {}
42
+ ```
43
+
44
+ ## Details
45
+
46
+ Static imports, type-only imports, `export ... from`, dynamic `import()`, `require()`, `import x = require()` and `import("...")` types are all read, through relative paths and the configured `importAlias`.
47
+
48
+ ## Options
49
+
50
+ None. `applicationAllowedPackages` in `ddd-ts-kit.config.json` replaces the allow-list, which defaults to `@ddd-ts-kit/kernel` and `@ddd-ts-kit/auth` (permissions and policies are declared in `application/authorization/`). In a declared-style project (`stack.style: "declared"`) `@ddd-ts-kit/kernel/declarations` is allowed whatever the list says: a handler, a consumer or a policy says what it is with a decorator of that entry, which is pure metadata. In an explicit-style project the entry is allowed like the rest of `@ddd-ts-kit/kernel`, by the list. `@ddd-ts-kit/aspects`, `@ddd-ts-kit/audit`, `@ddd-ts-kit/redis` and `@ddd-ts-kit/tracing` stay refused even when the list names them: an aspect is applied at the composition root (`.with(...)` on a binding, the `decorate` hook), in a bus middleware or on an adapter in `infrastructure/`; a use case depends on the port (`Cache` of the kernel, a port in `application/ports/`) and the platform binds the Redis adapter; the audit trail is fed by the bus middleware, the authorization hook and an event subscription, never by a use case. The only way around is a recorded suppression of the line.
51
+
52
+ `rules."layer/application-inward"` in `ddd-ts-kit.config.json` set to `off` silences the rule, and `// ddd-ts-kit-disable-next-line layer/application-inward -- <reason>` silences one line, exactly as for `ddd-ts-kit check`.
53
+
54
+ ## Limits
55
+
56
+ - The target is classified by its path: a barrel in an allowed layer that re-exports a forbidden one is not followed. `dependency-cruiser` (see `pipeline/depcruise-config.mjs`) resolves the real graph and closes that gap.
57
+ - A computed specifier (`import(name)`) is not judged.
58
+ - `tsconfig` paths other than `importAlias` are not resolved.
59
+
60
+ ## With the CLI checker
61
+
62
+ `ddd-ts-kit check` reports the same id from a regex reading of the file, fast enough for an editor hook. This rule is the authority: it reads the syntax tree.
@@ -0,0 +1,60 @@
1
+ # ddd-ts-kit/layer-domain-purity
2
+
3
+ Architecture id: `layer/domain-purity`. Default severity: `error` in `recommended`, `error` in `strict`.
4
+
5
+ Applies to: `domain/` of a context, tests excluded.
6
+
7
+ ## Why
8
+
9
+ The domain is the part of the system that must survive a change of framework, ORM or transport. Every outward import ties a business rule to a technical decision and makes it untestable without that technology.
10
+
11
+ ## Reported
12
+
13
+ - a package outside `domainAllowedPackages` (default: `@ddd-ts-kit/kernel`)
14
+ - `@ddd-ts-kit/aspects`, `@ddd-ts-kit/audit`, `@ddd-ts-kit/redis`, `@ddd-ts-kit/scheduling`, `@ddd-ts-kit/sentry` and `@ddd-ts-kit/tracing`, by any entry (`.`, `/decorators`, `/testing`, `/node`, ...), with a message of their own: they apply or record a concern from outside the model
15
+ - in a declared-style project (`stack.style: "declared"`): `@ddd-ts-kit/kernel/declarations`, even though `@ddd-ts-kit/kernel` is allowed, with a message of its own: the domain declares nothing
16
+ - any Node built-in
17
+ - another layer of the same context, the platform, `main.ts`
18
+ - the published language of another context (translate it in an integration event handler or an anti-corruption layer)
19
+
20
+ Incorrect:
21
+
22
+ ```ts
23
+ // src/contexts/billing/domain/aggregates/invoice.aggregate.ts
24
+ import { z } from 'zod';
25
+ import { randomUUID } from 'node:crypto';
26
+ import { Logged } from '@ddd-ts-kit/aspects/decorators';
27
+ import type { InvoiceRow } from '@/contexts/billing/infrastructure/persistence/billing.schema.js';
28
+ ```
29
+
30
+ Correct:
31
+
32
+ ```ts
33
+ // src/contexts/billing/domain/aggregates/invoice.aggregate.ts
34
+ import { AggregateRoot } from '@ddd-ts-kit/kernel';
35
+ import type { Amount } from '@/contexts/billing/domain/value-objects/amount.vo.js';
36
+ import { Money } from '@/shared-kernel/money.vo.js';
37
+ ```
38
+
39
+ ## Details
40
+
41
+ Aggregates, entities, value objects, events, services and repository ports carry no decorator and no dependency list: the decorator goes on the class of `application/` or `infrastructure/` that plays a role, and a port is an abstract class of `domain/repositories/` or `application/ports/`. The refusal of the declarations entry holds even when `domainAllowedPackages` names it. An explicit-style project is judged as before: the entry is part of `@ddd-ts-kit/kernel` there. A decorator that is nevertheless carried by a class of `domain/` is reported by `declarations-role-declared`.
42
+
43
+ Static imports, type-only imports, `export ... from`, dynamic `import()`, `require()`, `import x = require()` and `import("...")` types are all read, through relative paths and the configured `importAlias`.
44
+
45
+ ## Options
46
+
47
+ None. `domainAllowedPackages` in `ddd-ts-kit.config.json` extends the allow-list. The four packages above stay refused even when the list names them: logging, metrics, retry, timeout, circuit breaking, caching and tracing reach the model from the composition root (`.with(...)` on a binding, the `decorate` hook), a bus middleware or an adapter in `infrastructure/`; Redis sits behind a port; the audit trail is fed by the bus middleware, the authorization hook and an event subscription. The only way around is a recorded suppression of the line.
48
+
49
+ `rules."layer/domain-purity"` in `ddd-ts-kit.config.json` set to `off` silences the rule, and `// ddd-ts-kit-disable-next-line layer/domain-purity -- <reason>` silences one line, exactly as for `ddd-ts-kit check`.
50
+
51
+ ## Limits
52
+
53
+ - The target is classified by its path: a barrel in an allowed layer that re-exports a forbidden one is not followed. `dependency-cruiser` (see `pipeline/depcruise-config.mjs`) resolves the real graph and closes that gap.
54
+ - A computed specifier (`import(name)`) is not judged.
55
+ - `tsconfig` paths other than `importAlias` are not resolved.
56
+ - Internals of another context are left to `context-published-language-only`, so that one import gives one report.
57
+
58
+ ## With the CLI checker
59
+
60
+ `ddd-ts-kit check` reports the same id from a regex reading of the file, fast enough for an editor hook. This rule is the authority: it reads the syntax tree.
@@ -0,0 +1,46 @@
1
+ # ddd-ts-kit/layer-infrastructure-no-presentation
2
+
3
+ Architecture id: `layer/infrastructure-no-presentation`. Default severity: `error` in `recommended`, `error` in `strict`.
4
+
5
+ Applies to: `infrastructure/` of a context, tests excluded.
6
+
7
+ ## Why
8
+
9
+ Adapters implement ports of the application and the domain. An adapter that knows a DTO of the transport couples persistence to HTTP: the shared type belongs to the application.
10
+
11
+ ## Reported
12
+
13
+ - an import of `presentation/` of the same context
14
+
15
+ Incorrect:
16
+
17
+ ```ts
18
+ // src/contexts/billing/infrastructure/persistence/drizzle-invoice.repository.ts
19
+ import type { IssueInvoiceBody } from '@/contexts/billing/presentation/http/issue-invoice.dto.js';
20
+ ```
21
+
22
+ Correct:
23
+
24
+ ```ts
25
+ import type { InvoiceRepository } from '@/contexts/billing/domain/repositories/invoice.repository.js';
26
+ ```
27
+
28
+ ## Details
29
+
30
+ Static imports, type-only imports, `export ... from`, dynamic `import()`, `require()`, `import x = require()` and `import("...")` types are all read, through relative paths and the configured `importAlias`.
31
+
32
+ ## Options
33
+
34
+ None.
35
+
36
+ `rules."layer/infrastructure-no-presentation"` in `ddd-ts-kit.config.json` set to `off` silences the rule, and `// ddd-ts-kit-disable-next-line layer/infrastructure-no-presentation -- <reason>` silences one line, exactly as for `ddd-ts-kit check`.
37
+
38
+ ## Limits
39
+
40
+ - The target is classified by its path: a barrel in an allowed layer that re-exports a forbidden one is not followed. `dependency-cruiser` (see `pipeline/depcruise-config.mjs`) resolves the real graph and closes that gap.
41
+ - A computed specifier (`import(name)`) is not judged.
42
+ - `tsconfig` paths other than `importAlias` are not resolved.
43
+
44
+ ## With the CLI checker
45
+
46
+ `ddd-ts-kit check` reports the same id from a regex reading of the file, fast enough for an editor hook. This rule is the authority: it reads the syntax tree.
@@ -0,0 +1,46 @@
1
+ # ddd-ts-kit/layer-presentation-no-infrastructure
2
+
3
+ Architecture id: `layer/presentation-no-infrastructure`. Default severity: `error` in `recommended`, `error` in `strict`.
4
+
5
+ Applies to: `presentation/` of a context, tests excluded.
6
+
7
+ ## Why
8
+
9
+ A route translates a request into a command or a query and a result into a response. When it reaches an adapter directly, the use case is bypassed and so are its rules, its unit of work and its authorization.
10
+
11
+ ## Reported
12
+
13
+ - an import of `infrastructure/` of the same context
14
+
15
+ Incorrect:
16
+
17
+ ```ts
18
+ // src/contexts/billing/presentation/http/issue-invoice.route.ts
19
+ import { DrizzleInvoiceRepository } from '@/contexts/billing/infrastructure/persistence/drizzle-invoice.repository.js';
20
+ ```
21
+
22
+ Correct:
23
+
24
+ ```ts
25
+ import { IssueInvoiceCommand } from '@/contexts/billing/application/commands/issue-invoice/issue-invoice.command.js';
26
+ ```
27
+
28
+ ## Details
29
+
30
+ Static imports, type-only imports, `export ... from`, dynamic `import()`, `require()`, `import x = require()` and `import("...")` types are all read, through relative paths and the configured `importAlias`.
31
+
32
+ ## Options
33
+
34
+ None.
35
+
36
+ `rules."layer/presentation-no-infrastructure"` in `ddd-ts-kit.config.json` set to `off` silences the rule, and `// ddd-ts-kit-disable-next-line layer/presentation-no-infrastructure -- <reason>` silences one line, exactly as for `ddd-ts-kit check`.
37
+
38
+ ## Limits
39
+
40
+ - The target is classified by its path: a barrel in an allowed layer that re-exports a forbidden one is not followed. `dependency-cruiser` (see `pipeline/depcruise-config.mjs`) resolves the real graph and closes that gap.
41
+ - A computed specifier (`import(name)`) is not judged.
42
+ - `tsconfig` paths other than `importAlias` are not resolved.
43
+
44
+ ## With the CLI checker
45
+
46
+ `ddd-ts-kit check` reports the same id from a regex reading of the file, fast enough for an editor hook. This rule is the authority: it reads the syntax tree.
@@ -0,0 +1,70 @@
1
+ # ddd-ts-kit/ports-abstract-class
2
+
3
+ Architecture id: `ports/abstract-class`. Default severity: `error` in `recommended`, `error` in `strict`.
4
+
5
+ Applies to: port files of a context: `domain/repositories/*.repository.ts` and `application/ports/*.port.ts`.
6
+
7
+ ## Why
8
+
9
+ A port is an abstract class with abstract members only. The class is the contract and the injection token at once: it names the dependency in a dependency list, carries its type to the constructor, and there is no constant and no token file to keep in step with it. A port that holds a body, a field or a constructor is a base class in disguise: adapters start to inherit behaviour, and a fake no longer fits.
10
+
11
+ ## Reported
12
+
13
+ - a class that is not `abstract`
14
+ - a constructor
15
+ - a `private`, `protected` or `#` member
16
+ - a method with a body, a property with an initializer, a member that is not `abstract`
17
+ - an exported `interface`: a port is declared as an abstract class
18
+
19
+ Incorrect:
20
+
21
+ ```ts
22
+ // application/ports/payment-gateway.port.ts
23
+ export interface PaymentGateway {
24
+ charge(invoiceId: string): Promise<void>;
25
+ }
26
+
27
+ // domain/repositories/invoice.repository.ts
28
+ export abstract class InvoiceRepository {
29
+ constructor(protected readonly table: string) {}
30
+
31
+ async exists(id: string): Promise<boolean> {
32
+ return (await this.findById(id)) !== undefined;
33
+ }
34
+ }
35
+ ```
36
+
37
+ Correct:
38
+
39
+ ```ts
40
+ // application/ports/payment-gateway.port.ts
41
+ export abstract class PaymentGateway {
42
+ abstract charge(invoiceId: string): Promise<void>;
43
+ }
44
+
45
+ // domain/repositories/invoice.repository.ts
46
+ import { Repository } from '@ddd-ts-kit/kernel';
47
+
48
+ export abstract class InvoiceRepository extends Repository<Invoice> {}
49
+ ```
50
+
51
+ ## Details
52
+
53
+ A port may extend another one: the kernel `Repository<A>`, or a port of the same context. One member is allowed besides the abstract ones: `static readonly tokenKey = '<package>.<Port>'`, a string literal that gives the port one identity when its package is loaded twice. A value that is not a port (settings, a database handle) is typed the same way, by an abstract class with `abstract readonly` properties.
54
+
55
+ An exported `type` alias is not reported: the shape of the data that travels through the port may be a type. An interface that is not exported is left alone too.
56
+
57
+ ## Options
58
+
59
+ None.
60
+
61
+ `rules."ports/abstract-class"` in `ddd-ts-kit.config.json` set to `off` silences the rule, and `// ddd-ts-kit-disable-next-line ports/abstract-class -- <reason>` silences one line, exactly as for `ddd-ts-kit check`.
62
+
63
+ ## Limits
64
+
65
+ - A member inherited from a class of another file is not read: `@Repository`, `@Gateway` and `@Adapter` refuse a port with a body when the file loads.
66
+ - A port declared outside the two port folders is not judged.
67
+
68
+ ## With the CLI checker
69
+
70
+ `ddd-ts-kit check` reports the same id from the text of the files. This rule is the authority for the code.
@@ -0,0 +1,53 @@
1
+ # ddd-ts-kit/ports-implements-never-extends
2
+
3
+ Architecture id: `ports/implements-never-extends`. Default severity: `error` in `recommended`, `error` in `strict`.
4
+
5
+ Applies to: every linted file.
6
+
7
+ ## Why
8
+
9
+ An adapter honours a contract; it does not inherit from it. `implements` lets the compiler check the adapter against the port and keeps the port free of behaviour, so that a fake, an in-memory class and a remote client are interchangeable. `extends` turns the port into a base class and ties every adapter to it.
10
+
11
+ ## Reported
12
+
13
+ - a class carrying `@Repository(Port, ..)`, `@Gateway(Port, ..)` or `@Adapter(Port, ..)` that does not write `implements Port`, or that `extends Port`
14
+ - the class given to `bind(Port).toClass(Class, ..)` or `rebind(Port).toClass(Class, ..)` that does not implement `Port`, or that extends it
15
+ - under `infrastructure/` of a context: a class that `extends` a class imported from a port file
16
+
17
+ Incorrect:
18
+
19
+ ```ts
20
+ @Repository(InvoiceRepository, [Database])
21
+ export class KnexInvoiceRepository extends InvoiceRepository {}
22
+
23
+ builder.bind(PaymentGateway).toClass(StripePaymentGateway, [PaymentSettings]);
24
+ // where: export class StripePaymentGateway {}
25
+ ```
26
+
27
+ Correct:
28
+
29
+ ```ts
30
+ @Repository(InvoiceRepository, [Database])
31
+ export class KnexInvoiceRepository implements InvoiceRepository {}
32
+
33
+ export class StripePaymentGateway implements PaymentGateway {}
34
+ ```
35
+
36
+ ## Details
37
+
38
+ The class given to `toClass` is looked up in the linted file, then in the file it is imported from by a relative path or the import alias: that file is read from disk and parsed without types. When it cannot be found (a class of a package, a barrel, a renaming export), nothing is reported. A class bound to itself (`bind(Registry).toClass(Registry)`) is no port and is not judged. Port files are `domain/repositories/*.repository.ts` and `application/ports/*.port.ts`.
39
+
40
+ ## Options
41
+
42
+ None.
43
+
44
+ `rules."ports/implements-never-extends"` in `ddd-ts-kit.config.json` set to `off` silences the rule, and `// ddd-ts-kit-disable-next-line ports/implements-never-extends -- <reason>` silences one line, exactly as for `ddd-ts-kit check`.
45
+
46
+ ## Limits
47
+
48
+ - `implements` is compared by name: `implements kernel.Clock` for a port named `Clock` is not recognised; import the port by name.
49
+ - An adapter that extends its port through an intermediate class of another file is not seen: the decorators refuse it when the file loads.
50
+
51
+ ## With the CLI checker
52
+
53
+ `ddd-ts-kit check` reports the same id from the text of the files. This rule is the authority for the code.