@ddd-ts-kit/eslint-plugin 0.0.0-stage → 0.1.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 (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,8 @@
1
+ /**
2
+ * The names an export allows its file to carry, without the extension: its own in kebab-case,
3
+ * also written with dots (`issue-invoice.handler` for `IssueInvoiceHandler`), and, in a role
4
+ * file `<name>.<role>` whose export does not end with the role word, the part before the first
5
+ * dot (`invoice.aggregate` for `Invoice`, `payment-gateway.port` for `PaymentGateway`).
6
+ */
7
+ export declare function isNamedAfter(stem: string, exported: string): boolean;
8
+ //# sourceMappingURL=is-named-after.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-named-after.d.ts","sourceRoot":"","sources":["../../../src/support/exports/is-named-after.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAUpE"}
@@ -0,0 +1,16 @@
1
+ import { kebabCase } from '../kebab-case.js';
2
+ /**
3
+ * The names an export allows its file to carry, without the extension: its own in kebab-case,
4
+ * also written with dots (`issue-invoice.handler` for `IssueInvoiceHandler`), and, in a role
5
+ * file `<name>.<role>` whose export does not end with the role word, the part before the first
6
+ * dot (`invoice.aggregate` for `Invoice`, `payment-gateway.port` for `PaymentGateway`).
7
+ */
8
+ export function isNamedAfter(stem, exported) {
9
+ const expected = kebabCase(exported);
10
+ if (stem.replaceAll('.', '-') === expected) {
11
+ return true;
12
+ }
13
+ const [name = '', ...roles] = stem.split('.');
14
+ return roles.length > 0 && name === expected && !expected.endsWith(`-${roles.at(-1) ?? ''}`);
15
+ }
16
+ //# sourceMappingURL=is-named-after.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-named-after.js","sourceRoot":"","sources":["../../../src/support/exports/is-named-after.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,QAAgB;IACzD,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IAErC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,IAAI,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE9C,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC/F,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { TSESTree } from '@typescript-eslint/utils';
2
+ import type { ModuleShape } from './module-shape.js';
3
+ export declare function moduleShapeOf(program: TSESTree.Program): ModuleShape;
4
+ //# sourceMappingURL=module-shape-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-shape-of.d.ts","sourceRoot":"","sources":["../../../src/support/exports/module-shape-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMrD,wBAAgB,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,GAAG,WAAW,CASpE"}
@@ -0,0 +1,11 @@
1
+ import { topLevelDeclarations } from './top-level-declarations.js';
2
+ const COUNTED = ['class', 'interface', 'function'];
3
+ export function moduleShapeOf(program) {
4
+ const declarations = topLevelDeclarations(program);
5
+ const exports = declarations.filter((declaration) => declaration.exported);
6
+ const counted = exports
7
+ .filter((declaration) => COUNTED.includes(declaration.kind))
8
+ .map((declaration) => declaration.name);
9
+ return { program, declarations, exports, counted: [...new Set(counted)] };
10
+ }
11
+ //# sourceMappingURL=module-shape-of.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-shape-of.js","sourceRoot":"","sources":["../../../src/support/exports/module-shape-of.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,MAAM,OAAO,GAA+B,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;AAE/E,MAAM,UAAU,aAAa,CAAC,OAAyB;IACrD,MAAM,YAAY,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAE3E,MAAM,OAAO,GAAG,OAAO;SACpB,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAC3D,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAE1C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;AAC5E,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { TSESTree } from '@typescript-eslint/utils';
2
+ import type { TopLevelDeclaration } from './top-level-declaration.js';
3
+ export interface ModuleShape {
4
+ readonly program: TSESTree.Program;
5
+ readonly declarations: readonly TopLevelDeclaration[];
6
+ readonly exports: readonly TopLevelDeclaration[];
7
+ /** Distinct names of the exported classes, interfaces and functions: what a file holds one of. */
8
+ readonly counted: readonly string[];
9
+ }
10
+ //# sourceMappingURL=module-shape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-shape.d.ts","sourceRoot":"","sources":["../../../src/support/exports/module-shape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC;IACnC,QAAQ,CAAC,YAAY,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACtD,QAAQ,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACjD,kGAAkG;IAClG,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=module-shape.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-shape.js","sourceRoot":"","sources":["../../../src/support/exports/module-shape.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { type TSESLint } from '@typescript-eslint/utils';
2
+ import type { ModuleShape } from './module-shape.js';
3
+ type Source = Readonly<TSESLint.SourceCode>;
4
+ /**
5
+ * True when the exported functions of the module are the accessors of one private state: each
6
+ * reads or writes a module-level variable that is not exported (`let current`, or a `const`
7
+ * holding a `new Map()`), and those variables tie the functions into one group.
8
+ */
9
+ export declare function sharesPrivateState(shape: ModuleShape, sourceCode: Source): boolean;
10
+ export {};
11
+ //# sourceMappingURL=shares-private-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shares-private-state.d.ts","sourceRoot":"","sources":["../../../src/support/exports/shares-private-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAiB,MAAM,0BAA0B,CAAC;AACxF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,KAAK,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CASlF"}
@@ -0,0 +1,36 @@
1
+ import { AST_NODE_TYPES } from '@typescript-eslint/utils';
2
+ /**
3
+ * True when the exported functions of the module are the accessors of one private state: each
4
+ * reads or writes a module-level variable that is not exported (`let current`, or a `const`
5
+ * holding a `new Map()`), and those variables tie the functions into one group.
6
+ */
7
+ export function sharesPrivateState(shape, sourceCode) {
8
+ const states = shape.declarations.flatMap((declaration) => (declaration.exported ? [] : stateOf(declaration.node)));
9
+ const functions = shape.exports.filter((declaration) => declaration.node.type === AST_NODE_TYPES.FunctionDeclaration);
10
+ const touched = functions.map((declaration) => states.filter((state) => isUsedIn(sourceCode, state, declaration.node)));
11
+ return touched.length > 1 && touched.every((states) => states.length > 0) && isOneGroup(touched);
12
+ }
13
+ function stateOf(node) {
14
+ if (node.type !== AST_NODE_TYPES.VariableDeclarator) {
15
+ return [];
16
+ }
17
+ return node.parent.kind === 'let' || node.parent.kind === 'var' || node.init?.type === AST_NODE_TYPES.NewExpression
18
+ ? [node]
19
+ : [];
20
+ }
21
+ function isUsedIn(sourceCode, state, user) {
22
+ const references = sourceCode.getDeclaredVariables(state).flatMap((variable) => variable.references);
23
+ return references.some(({ identifier }) => identifier.range[0] >= user.range[0] && identifier.range[1] <= user.range[1]);
24
+ }
25
+ function isOneGroup(touched) {
26
+ const group = new Set(touched[0]);
27
+ let waiting = touched.slice(1);
28
+ for (let joined = true; joined;) {
29
+ const joining = waiting.filter((states) => states.some((state) => group.has(state)));
30
+ joining.flat().forEach((state) => group.add(state));
31
+ waiting = waiting.filter((states) => !joining.includes(states));
32
+ joined = joining.length > 0;
33
+ }
34
+ return waiting.length === 0;
35
+ }
36
+ //# sourceMappingURL=shares-private-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shares-private-state.js","sourceRoot":"","sources":["../../../src/support/exports/shares-private-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAgC,MAAM,0BAA0B,CAAC;AAKxF;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAkB,EAAE,UAAkB;IACvE,MAAM,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpH,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,mBAAmB,CAAC,CAAC;IAEtH,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,C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AAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAClC,IAAI,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE/B,KAAK,IAAI,MAAM,GAAG,IAAI,EAAE,MAAM,GAAI,CAAC;QACjC,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAErF,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QACpD,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;QAChE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAC9B,CAAC;IAED,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type TSESTree } from '@typescript-eslint/utils';
2
+ /**
3
+ * The syntax that states what a declaration offers to its callers: the parameters and the
4
+ * return type of a function, the constructor, the public members and the heritage of a class,
5
+ * the whole of an interface or of a type alias, the annotation of a constant.
6
+ */
7
+ export declare function signatureOf(node: TSESTree.Node): TSESTree.Node[];
8
+ //# sourceMappingURL=signature-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signature-of.d.ts","sourceRoot":"","sources":["../../../src/support/exports/signature-of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAYzE;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,CAgBhE"}
@@ -0,0 +1,44 @@
1
+ import { AST_NODE_TYPES } from '@typescript-eslint/utils';
2
+ import { isConstructor } from '../classes/is-constructor.js';
3
+ import { isFunction } from '../classes/is-function.js';
4
+ import { visibilityOf } from '../classes/visibility-of.js';
5
+ /**
6
+ * The syntax that states what a declaration offers to its callers: the parameters and the
7
+ * return type of a function, the constructor, the public members and the heritage of a class,
8
+ * the whole of an interface or of a type alias, the annotation of a constant.
9
+ */
10
+ export function signatureOf(node) {
11
+ if (node.type === AST_NODE_TYPES.FunctionDeclaration || node.type === AST_NODE_TYPES.TSDeclareFunction) {
12
+ return callableSignature(node);
13
+ }
14
+ if (node.type === AST_NODE_TYPES.ClassDeclaration) {
15
+ return classSignature(node);
16
+ }
17
+ if (node.type === AST_NODE_TYPES.VariableDeclarator) {
18
+ return variableSignature(node);
19
+ }
20
+ return node.type === AST_NODE_TYPES.TSInterfaceDeclaration || node.type === AST_NODE_TYPES.TSTypeAliasDeclaration
21
+ ? [node]
22
+ : [];
23
+ }
24
+ function callableSignature(node) {
25
+ return [...node.params, node.returnType, node.typeParameters].filter((part) => part !== undefined);
26
+ }
27
+ function classSignature(node) {
28
+ const heritage = [node.typeParameters, node.superTypeArguments, ...node.implements].filter((part) => part !== undefined);
29
+ return [...heritage, ...node.body.body.flatMap(memberSignature)];
30
+ }
31
+ function memberSignature(member) {
32
+ if (visibilityOf(member) !== 'public' && !isConstructor(member)) {
33
+ return [];
34
+ }
35
+ if (member.type === AST_NODE_TYPES.MethodDefinition || member.type === AST_NODE_TYPES.TSAbstractMethodDefinition) {
36
+ return callableSignature(member.value);
37
+ }
38
+ return 'typeAnnotation' in member && member.typeAnnotation !== undefined ? [member.typeAnnotation] : [];
39
+ }
40
+ function variableSignature(node) {
41
+ const annotation = node.id.typeAnnotation === undefined ? [] : [node.id.typeAnnotation];
42
+ return node.init !== null && isFunction(node.init) ? [...annotation, ...callableSignature(node.init)] : annotation;
43
+ }
44
+ //# sourceMappingURL=signature-of.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signature-of.js","sourceRoot":"","sources":["../../../src/support/exports/signature-of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAS3D;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,IAAmB;IAC7C,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,mBAAmB,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,iBAAiB,EAAE,CAAC;QACvG,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,gBAAgB,EAAE,CAAC;QAClD,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,kBAAkB,EAAE,CAAC;QACpD,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,sBAAsB,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,sBAAsB;QAC/G,CAAC,CAAC,CAAC,IAAI,CAAC;QACR,CAAC,CAAC,EAAE,CAAC;AACT,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAc;IACvC,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;AACrG,CAAC;AAED,SAAS,cAAc,CAAC,IAA+B;IACrD,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
@@ -0,0 +1,10 @@
1
+ import type { TSESTree } from '@typescript-eslint/utils';
2
+ export type DeclarationKind = 'class' | 'interface' | 'function' | 'type' | 'variable' | 'other';
3
+ /** One declaration at the top of a module. Overloads, and a type sharing the name of a value, are several declarations of one name. */
4
+ export interface TopLevelDeclaration {
5
+ readonly name: string;
6
+ readonly kind: DeclarationKind;
7
+ readonly node: TSESTree.Node;
8
+ readonly exported: boolean;
9
+ }
10
+ //# sourceMappingURL=top-level-declaration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top-level-declaration.d.ts","sourceRoot":"","sources":["../../../src/support/exports/top-level-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC;AAEjG,uIAAuI;AACvI,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=top-level-declaration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top-level-declaration.js","sourceRoot":"","sources":["../../../src/support/exports/top-level-declaration.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { type TSESTree } from '@typescript-eslint/utils';
2
+ import type { TopLevelDeclaration } from './top-level-declaration.js';
3
+ /** What a module declares at its top, with whether it exports it: inline, by `export { a }` or by `export default a`. */
4
+ export declare function topLevelDeclarations(program: TSESTree.Program): TopLevelDeclaration[];
5
+ //# sourceMappingURL=top-level-declarations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top-level-declarations.d.ts","sourceRoot":"","sources":["../../../src/support/exports/top-level-declarations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,EAAmB,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAcvF,yHAAyH;AACzH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,GAAG,mBAAmB,EAAE,CAWrF"}
@@ -0,0 +1,48 @@
1
+ import { AST_NODE_TYPES } from '@typescript-eslint/utils';
2
+ const KINDS = {
3
+ [AST_NODE_TYPES.ClassDeclaration]: 'class',
4
+ [AST_NODE_TYPES.TSInterfaceDeclaration]: 'interface',
5
+ [AST_NODE_TYPES.FunctionDeclaration]: 'function',
6
+ [AST_NODE_TYPES.TSDeclareFunction]: 'function',
7
+ [AST_NODE_TYPES.TSTypeAliasDeclaration]: 'type',
8
+ [AST_NODE_TYPES.TSEnumDeclaration]: 'other',
9
+ [AST_NODE_TYPES.TSModuleDeclaration]: 'other',
10
+ };
11
+ /** What a module declares at its top, with whether it exports it: inline, by `export { a }` or by `export default a`. */
12
+ export function topLevelDeclarations(program) {
13
+ const later = new Set(program.body.flatMap(namesExportedLater));
14
+ return program.body.flatMap((statement) => {
15
+ const inline = isInlineExport(statement);
16
+ const declared = inline ? statement.declaration : statement;
17
+ return declared === null
18
+ ? []
19
+ : declarationsOf(declared).map((found) => ({ ...found, exported: inline || later.has(found.name) }));
20
+ });
21
+ }
22
+ function isInlineExport(statement) {
23
+ return (statement.type === AST_NODE_TYPES.ExportNamedDeclaration ||
24
+ statement.type === AST_NODE_TYPES.ExportDefaultDeclaration);
25
+ }
26
+ function declarationsOf(node) {
27
+ if (node.type === AST_NODE_TYPES.VariableDeclaration) {
28
+ return node.declarations.flatMap(variableOf);
29
+ }
30
+ const kind = KINDS[node.type];
31
+ const name = 'id' in node && node.id?.type === AST_NODE_TYPES.Identifier ? node.id.name : 'default';
32
+ return kind === undefined ? [] : [{ name, kind, node }];
33
+ }
34
+ function variableOf(declarator) {
35
+ return declarator.id.type === AST_NODE_TYPES.Identifier
36
+ ? [{ name: declarator.id.name, kind: 'variable', node: declarator }]
37
+ : [];
38
+ }
39
+ function namesExportedLater(statement) {
40
+ if (statement.type === AST_NODE_TYPES.ExportDefaultDeclaration) {
41
+ return statement.declaration.type === AST_NODE_TYPES.Identifier ? [statement.declaration.name] : [];
42
+ }
43
+ if (statement.type !== AST_NODE_TYPES.ExportNamedDeclaration || statement.source !== null) {
44
+ return [];
45
+ }
46
+ return statement.specifiers.map((specifier) => specifier.local.name);
47
+ }
48
+ //# sourceMappingURL=top-level-declarations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top-level-declarations.js","sourceRoot":"","sources":["../../../src/support/exports/top-level-declarations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAC;AAKzE,MAAM,KAAK,GAA+D;IACxE,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,OAAO;IAC1C,CAAC,cAAc,CAAC,sBAAsB,CAAC,EAAE,WAAW;IACpD,CAAC,cAAc,CAAC,mBAAmB,CAAC,EAAE,UAAU;IAChD,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,UAAU;IAC9C,CAAC,cAAc,CAAC,sBAAsB,CAAC,EAAE,MAAM;IAC/C,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,OAAO;IAC3C,CAAC,cAAc,CAAC,mBAAmB,CAAC,EAAE,OAAO;CAC9C,CAAC;AAEF,yHAAyH;AACzH,MAAM,UAAU,oBAAoB,CAAC,OAAyB;IAC5D,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAEhE,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;QACxC,MA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AO,UAAU,CAAC,EAAE,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU;QACrD,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QACpE,CAAC,CAAC,EAAE,CAAC;AACT,CAAC;AAED,SAAS,kBAAkB,CAAC,SAAoC;IAC9D,IAAI,SAAS,CAAC,IAAI,KAAK,cAAc,CAAC,wBAAwB,EAAE,CAAC;QAC/D,OAAO,SAAS,CAAC,WAAW,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACtG,CAAC;IAED,IAAI,SAAS,CAAC,IAAI,KAAK,cAAc,CAAC,sBAAsB,IAAI,SAAS,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;QAC1F,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACvE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { TSESTree } from '@typescript-eslint/utils';
2
+ import type { ModuleShape } from './module-shape.js';
3
+ /** The type names `roots` refer to, followed through the interfaces and the type aliases the module declares. */
4
+ export declare function typeClosure(shape: ModuleShape, roots: readonly TSESTree.Node[]): ReadonlySet<string>;
5
+ //# sourceMappingURL=type-closure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-closure.d.ts","sourceRoot":"","sources":["../../../src/support/exports/type-closure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,iHAAiH;AACjH,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,QAAQ,CAAC,IAAI,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,CAYpG"}
@@ -0,0 +1,18 @@
1
+ import { typeNamesIn } from './type-names-in.js';
2
+ /** The type names `roots` refer to, followed through the interfaces and the type aliases the module declares. */
3
+ export function typeClosure(shape, roots) {
4
+ const reached = new Set();
5
+ const pending = [...roots];
6
+ for (let node = pending.pop(); node !== undefined; node = pending.pop()) {
7
+ for (const name of typeNamesIn(node).filter((candidate) => !reached.has(candidate))) {
8
+ reached.add(name);
9
+ pending.push(...typesNamed(shape, name));
10
+ }
11
+ }
12
+ return reached;
13
+ }
14
+ function typesNamed(shape, name) {
15
+ const types = shape.declarations.filter((declaration) => declaration.name === name && (declaration.kind === 'interface' || declaration.kind === 'type'));
16
+ return types.map((declaration) => declaration.node);
17
+ }
18
+ //# sourceMappingURL=type-closure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-closure.js","sourceRoot":"","sources":["../../../src/support/exports/type-closure.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,iHAAiH;AACjH,MAAM,UAAU,WAAW,CAAC,KAAkB,EAAE,KAA+B;IAC7E,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,MAAM,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;IAE3B,KAAK,IAAI,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,KAAK,SAAS,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;QACxE,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;YACpF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAClB,OAAO,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,UAAU,CAAC,KAAkB,EAAE,IAAY;IAClD,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,CAAC,MAAM,CACrC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,WAAW,IAAI,WAAW,CAAC,IAAI,KAAK,MAAM,CAAC,CAChH,CAAC;IAEF,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACtD,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ModuleShape } from './module-shape.js';
2
+ /**
3
+ * The one type every exported function of the module returns, when there is one: a type with
4
+ * its constructors or its combinators. The type is declared by the module or imported by it; a
5
+ * function may return a member of the union when the type is a union the module declares.
6
+ */
7
+ export declare function typeFamilyOf(shape: ModuleShape): string | undefined;
8
+ //# sourceMappingURL=type-family-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-family-of.d.ts","sourceRoot":"","sources":["../../../src/support/exports/type-family-of.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAiBnE"}
@@ -0,0 +1,43 @@
1
+ import { AST_NODE_TYPES } from '@typescript-eslint/utils';
2
+ /**
3
+ * The one type every exported function of the module returns, when there is one: a type with
4
+ * its constructors or its combinators. The type is declared by the module or imported by it; a
5
+ * function may return a member of the union when the type is a union the module declares.
6
+ */
7
+ export function typeFamilyOf(shape) {
8
+ const functions = shape.exports.filter((declaration) => declaration.kind === 'function');
9
+ const returned = functions.map((declaration) => returnedTypeName(declaration.node));
10
+ const [first] = returned;
11
+ if (first === undefined) {
12
+ return undefined;
13
+ }
14
+ const declared = shape.exports
15
+ .filter((declaration) => declaration.kind !== 'function' && declaration.kind !== 'variable')
16
+ .map((declaration) => declaration.name);
17
+ return [...declared, first].find((type) => isKnown(shape, type) && returned.every((name) => name !== undefined && membersOf(shape, type).includes(name)));
18
+ }
19
+ function returnedTypeName(node) {
20
+ const type = 'returnType' in node ? node.returnType?.typeAnnotation : undefined;
21
+ return type?.type === AST_NODE_TYPES.TSTypeReference && type.typeName.type === AST_NODE_TYPES.Identifier
22
+ ? type.typeName.name
23
+ : undefined;
24
+ }
25
+ /** A global such as `Promise` or `Map` is nobody's family. */
26
+ function isKnown(shape, type) {
27
+ const imported = shape.program.body.some((statement) => statement.type === AST_NODE_TYPES.ImportDeclaration &&
28
+ statement.specifiers.some((specifier) => specifier.local.name === type));
29
+ return imported || shape.declarations.some((declaration) => declaration.name === type);
30
+ }
31
+ function membersOf(shape, type) {
32
+ const aliases = shape.declarations.flatMap((declaration) => declaration.name === type && declaration.node.type === AST_NODE_TYPES.TSTypeAliasDeclaration
33
+ ? [declaration.node.typeAnnotation]
34
+ : []);
35
+ const members = aliases.flatMap((alias) => (alias.type === AST_NODE_TYPES.TSUnionType ? alias.types : []));
36
+ return [
37
+ type,
38
+ ...members.flatMap((member) => member.type === AST_NODE_TYPES.TSTypeReference && member.typeName.type === AST_NODE_TYPES.Identifier
39
+ ? [member.typeName.name]
40
+ : []),
41
+ ];
42
+ }
43
+ //# sourceMappingURL=type-family-of.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-family-of.js","sourceRoot":"","sources":["../../../src/support/exports/type-family-of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAC;AAGzE;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAkB;IAC7C,M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CAAC,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU;YAClG,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;YACxB,CAAC,CAAC,EAAE,CACP;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type TSESTree } from '@typescript-eslint/utils';
2
+ /** The names of the types a piece of syntax refers to: `Options` for `Options`, `Partial<Options>` and `kernel.Options`. */
3
+ export declare function typeNamesIn(node: TSESTree.Node): string[];
4
+ //# sourceMappingURL=type-names-in.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-names-in.d.ts","sourceRoot":"","sources":["../../../src/support/exports/type-names-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzE,4HAA4H;AAC5H,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,MAAM,EAAE,CAYzD"}
@@ -0,0 +1,21 @@
1
+ import { AST_NODE_TYPES } from '@typescript-eslint/utils';
2
+ import { descendants } from '../descendants.js';
3
+ /** The names of the types a piece of syntax refers to: `Options` for `Options`, `Partial<Options>` and `kernel.Options`. */
4
+ export function typeNamesIn(node) {
5
+ return [...descendants(node)].flatMap((inner) => {
6
+ if (inner.type === AST_NODE_TYPES.TSTypeReference) {
7
+ return [leftmost(inner.typeName)];
8
+ }
9
+ if (inner.type !== AST_NODE_TYPES.TSClassImplements && inner.type !== AST_NODE_TYPES.TSInterfaceHeritage) {
10
+ return [];
11
+ }
12
+ return inner.expression.type === AST_NODE_TYPES.Identifier ? [inner.expression.name] : [];
13
+ });
14
+ }
15
+ function leftmost(name) {
16
+ if (name.type === AST_NODE_TYPES.Identifier) {
17
+ return name.name;
18
+ }
19
+ return name.type === AST_NODE_TYPES.TSQualifiedName ? leftmost(name.left) : 'this';
20
+ }
21
+ //# sourceMappingURL=type-names-in.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-names-in.js","sourceRoot":"","sources":["../../../src/support/exports/type-names-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,4HAA4H;AAC5H,MAAM,UAAU,WAAW,CAAC,IAAmB;IAC7C,OAAO,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QAC9C,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,CAAC,eAAe,EAAE,CAAC;YAClD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;QACpC,CAAC;QAED,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,CAAC,iBAAiB,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,CAAC,mBAAmB,EAAE,CAAC;YACzG,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5F,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,QAAQ,CAAC,IAAyB;IACzC,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU,EAAE,CAAC;QAC5C,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,OAAO,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACrF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type TSESLint } from '@typescript-eslint/utils';
2
+ import type { FunctionNode } from './function-node.js';
3
+ /** Lines of the body that hold code: blank lines and comment lines carry no token. */
4
+ export declare function codeLines(node: FunctionNode, sourceCode: Readonly<TSESLint.SourceCode>): number;
5
+ //# sourceMappingURL=code-lines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-lines.d.ts","sourceRoot":"","sources":["../../../src/support/functions/code-lines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,sFAAsF;AACtF,wBAAgB,SAAS,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,MAAM,CAY/F"}
@@ -0,0 +1,14 @@
1
+ import { AST_NODE_TYPES } from '@typescript-eslint/utils';
2
+ /** Lines of the body that hold code: blank lines and comment lines carry no token. */
3
+ export function codeLines(node, sourceCode) {
4
+ const tokens = sourceCode.getTokens(node.body);
5
+ const inside = node.body.type === AST_NODE_TYPES.BlockStatement ? tokens.slice(1, -1) : tokens;
6
+ const lines = new Set();
7
+ for (const token of inside) {
8
+ for (let line = token.loc.start.line; line <= token.loc.end.line; line += 1) {
9
+ lines.add(line);
10
+ }
11
+ }
12
+ return lines.size;
13
+ }
14
+ //# sourceMappingURL=code-lines.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-lines.js","sourceRoot":"","sources":["../../../src/support/functions/code-lines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAC;AAGzE,sFAAsF;AACtF,MAAM,UAAU,SAAS,CAAC,IAAkB,EAAE,UAAyC;IACrF,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAC/F,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAEhC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,KAAK,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC;YAC5E,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC;AACpB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type TSESLint, type TSESTree } from '@typescript-eslint/utils';
2
+ import type { FunctionNode } from './function-node.js';
3
+ interface DescribedFunction {
4
+ /** `Function 'charge'`, `Method 'execute'`, `Arrow function`: how a report names it. */
5
+ readonly name: string;
6
+ /** The head of the function: where a report points. */
7
+ readonly loc: TSESTree.SourceLocation;
8
+ }
9
+ export declare function describedFunction(node: FunctionNode, sourceCode: Readonly<TSESLint.SourceCode>): DescribedFunction;
10
+ export {};
11
+ //# sourceMappingURL=described-function.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"described-function.d.ts","sourceRoot":"","sources":["../../../src/support/functions/described-function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,UAAU,iBAAiB;IACzB,wFAAwF;IACxF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,cAAc,CAAC;CACvC;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,iBAAiB,CAOlH"}
@@ -0,0 +1,9 @@
1
+ import { ASTUtils } from '@typescript-eslint/utils';
2
+ export function describedFunction(node, sourceCode) {
3
+ const name = ASTUtils.getFunctionNameWithKind(node, sourceCode);
4
+ return {
5
+ name: name.charAt(0).toUpperCase() + name.slice(1),
6
+ loc: ASTUtils.getFunctionHeadLocation(node, sourceCode),
7
+ };
8
+ }
9
+ //# sourceMappingURL=described-function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"described-function.js","sourceRoot":"","sources":["../../../src/support/functions/described-function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAgC,MAAM,0BAA0B,CAAC;AAUlF,MAAM,UAAU,iBAAiB,CAAC,IAAkB,EAAE,UAAyC;IAC7F,MAAM,IAAI,GAAG,QAAQ,CAAC,uBAAuB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAEhE,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAClD,GAAG,EAAE,QAAQ,CAAC,uBAAuB,CAAC,IAAI,EAAE,UAAU,CAAC;KACxD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { TSESTree } from '@typescript-eslint/utils';
2
+ export type FunctionNode = TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression;
3
+ //# sourceMappingURL=function-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function-node.d.ts","sourceRoot":"","sources":["../../../src/support/functions/function-node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,MAAM,YAAY,GACpB,QAAQ,CAAC,uBAAuB,GAChC,QAAQ,CAAC,mBAAmB,GAC5B,QAAQ,CAAC,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=function-node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function-node.js","sourceRoot":"","sources":["../../../src/support/functions/function-node.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ /** A posix path matcher: `**` crosses directories, `*` stays inside one, `?` is one character, the rest is literal. */
2
+ export declare function globMatcher(globs: readonly string[]): (path: string) => boolean;
3
+ //# sourceMappingURL=glob-matcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glob-matcher.d.ts","sourceRoot":"","sources":["../../src/support/glob-matcher.ts"],"names":[],"mappings":"AAIA,uHAAuH;AACvH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAM/E"}
@@ -0,0 +1,8 @@
1
+ const TRANSLATION = { '**/': '(?:.*/)?', '**': '.*', '*': '[^/]*', '?': '[^/]' };
2
+ const TOKEN = /\*\*\/|\*\*|\*|\?|[.+^${}()|[\]\\]/g;
3
+ /** A posix path matcher: `**` crosses directories, `*` stays inside one, `?` is one character, the rest is literal. */
4
+ export function globMatcher(globs) {
5
+ const patterns = globs.map((glob) => new RegExp(`^${glob.replace(TOKEN, (token) => TRANSLATION[token] ?? `\\${token}`)}$`));
6
+ return (path) => patterns.some((pattern) => pattern.test(path));
7
+ }
8
+ //# sourceMappingURL=glob-matcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glob-matcher.js","sourceRoot":"","sources":["../../src/support/glob-matcher.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAqC,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;AAEnH,MAAM,KAAK,GAAG,qCAAqC,CAAC;AAEpD,uHAAuH;AACvH,MAAM,UAAU,WAAW,CAAC,KAAwB;IAClD,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CACxB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC,GAAG,CAAC,CAChG,CAAC;IAEF,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAClE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { TSESLint, type TSESTree } from '@typescript-eslint/utils';
2
+ /**
3
+ * The name under which `node` reaches something ambient: a global or an import binding
4
+ * (`crypto`), also through the global object (`globalThis.crypto`). Undefined when the name
5
+ * is a local declaration that merely shadows the global.
6
+ */
7
+ export declare function ambientName(sourceCode: Readonly<TSESLint.SourceCode>, node: TSESTree.Node): string | undefined;
8
+ //# sourceMappingURL=ambient-name.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ambient-name.d.ts","sourceRoot":"","sources":["../../../src/support/globals/ambient-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK7F;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,MAAM,GAAG,SAAS,CAc9G"}
@@ -0,0 +1,26 @@
1
+ import { ASTUtils, AST_NODE_TYPES, TSESLint } from '@typescript-eslint/utils';
2
+ import { propertyName } from './property-name.js';
3
+ const GLOBAL_OBJECTS = new Set(['globalThis', 'window', 'self', 'global']);
4
+ /**
5
+ * The name under which `node` reaches something ambient: a global or an import binding
6
+ * (`crypto`), also through the global object (`globalThis.crypto`). Undefined when the name
7
+ * is a local declaration that merely shadows the global.
8
+ */
9
+ export function ambientName(sourceCode, node) {
10
+ if (node.type === AST_NODE_TYPES.Identifier) {
11
+ return isAmbient(sourceCode, node) ? node.name : undefined;
12
+ }
13
+ if (node.type !== AST_NODE_TYPES.MemberExpression || node.object.type !== AST_NODE_TYPES.Identifier) {
14
+ return undefined;
15
+ }
16
+ if (!GLOBAL_OBJECTS.has(node.object.name) || !isAmbient(sourceCode, node.object)) {
17
+ return undefined;
18
+ }
19
+ return propertyName(node);
20
+ }
21
+ function isAmbient(sourceCode, identifier) {
22
+ const variable = ASTUtils.findVariable(sourceCode.getScope(identifier), identifier.name);
23
+ return (variable === null ||
24
+ variable.defs.every((definition) => definition.type === TSESLint.Scope.DefinitionType.ImportBinding));
25
+ }
26
+ //# sourceMappingURL=ambient-name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ambient-name.js","sourceRoot":"","sources":["../../../src/support/globals/ambient-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAiB,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE3E;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,UAAyC,EAAE,IAAmB;IACxF,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU,EAAE,CAAC;QAC5C,OAAO,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7D,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,gBAAgB,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU,EAAE,CAAC;QACpG,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACjF,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC;AAED,SAAS,SAAS,CAAC,UAAyC,EAAE,UAA+B;IAC3F,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IAEzF,OAAO,CACL,QAAQ,KAAK,IAAI;QACjB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,KAAK,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,CACrG,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type TSESTree } from '@typescript-eslint/utils';
2
+ export declare function propertyName(node: TSESTree.MemberExpression): string | undefined;
3
+ //# sourceMappingURL=property-name.d.ts.map