@codeperfect/eslint-plugin 2.1.0 → 2.2.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 (309) hide show
  1. package/README.md +3 -2
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/application/custom-rules.d.ts +8 -8
  4. package/dist/application/custom-rules.js +14 -14
  5. package/dist/application/index.d.ts +1 -1
  6. package/dist/application/index.d.ts.map +1 -1
  7. package/dist/application/index.js +2 -2
  8. package/dist/codeperfect-eslint-plugin-1.0.0.tgz +0 -0
  9. package/dist/domain/architecture/consistent-barrel-files/barrel-file-utilities.d.ts +3 -4
  10. package/dist/domain/architecture/consistent-barrel-files/barrel-file-utilities.d.ts.map +1 -1
  11. package/dist/domain/architecture/consistent-barrel-files/barrel-file-utilities.js +5 -3
  12. package/dist/domain/architecture/consistent-barrel-files/consistent-barrel-files-listeners.d.ts.map +1 -1
  13. package/dist/domain/architecture/consistent-barrel-files/consistent-barrel-files-listeners.js +17 -7
  14. package/dist/domain/architecture/consistent-barrel-files/exports-only-rule.d.ts.map +1 -1
  15. package/dist/domain/architecture/consistent-barrel-files/exports-only-rule.js +29 -2
  16. package/dist/domain/architecture/consistent-barrel-files/index.d.ts +2 -0
  17. package/dist/domain/architecture/consistent-barrel-files/index.d.ts.map +1 -1
  18. package/dist/domain/architecture/consistent-barrel-files/index.js +3 -1
  19. package/dist/domain/architecture/consistent-barrel-files/no-import-export-aliases-rule.d.ts +5 -0
  20. package/dist/domain/architecture/consistent-barrel-files/no-import-export-aliases-rule.d.ts.map +1 -0
  21. package/dist/domain/architecture/consistent-barrel-files/no-import-export-aliases-rule.js +247 -0
  22. package/dist/domain/architecture/consistent-barrel-files/no-import-export-extensions-rule.d.ts +5 -0
  23. package/dist/domain/architecture/consistent-barrel-files/no-import-export-extensions-rule.d.ts.map +1 -0
  24. package/dist/domain/architecture/consistent-barrel-files/no-import-export-extensions-rule.js +136 -0
  25. package/dist/domain/architecture/consistent-barrel-files/rule.d.ts.map +1 -1
  26. package/dist/domain/architecture/consistent-barrel-files/rule.js +1 -2
  27. package/dist/domain/architecture/index.d.ts +2 -1
  28. package/dist/domain/architecture/index.d.ts.map +1 -1
  29. package/dist/domain/architecture/index.js +3 -2
  30. package/dist/domain/architecture/no-unused-exports/index.d.ts +3 -0
  31. package/dist/domain/architecture/no-unused-exports/index.d.ts.map +1 -0
  32. package/dist/domain/architecture/no-unused-exports/index.js +2 -0
  33. package/dist/domain/architecture/no-unused-exports/no-unused-exports-options.d.ts +50 -0
  34. package/dist/domain/architecture/no-unused-exports/no-unused-exports-options.d.ts.map +1 -0
  35. package/dist/domain/architecture/no-unused-exports/no-unused-exports-options.js +141 -0
  36. package/dist/domain/architecture/no-unused-exports/no-unused-exports-utilities.d.ts +49 -0
  37. package/dist/domain/architecture/no-unused-exports/no-unused-exports-utilities.d.ts.map +1 -0
  38. package/dist/domain/architecture/no-unused-exports/no-unused-exports-utilities.js +608 -0
  39. package/dist/domain/architecture/no-unused-exports/rule.d.ts +5 -0
  40. package/dist/domain/architecture/no-unused-exports/rule.d.ts.map +1 -0
  41. package/dist/domain/architecture/no-unused-exports/rule.js +82 -0
  42. package/dist/domain/architecture/no-unused-exports/types.d.ts +32 -0
  43. package/dist/domain/architecture/no-unused-exports/types.d.ts.map +1 -0
  44. package/dist/domain/architecture/no-unused-exports/types.js +2 -0
  45. package/dist/domain/core/no-multiple-declarators/rule.d.ts.map +1 -1
  46. package/dist/domain/core/no-multiple-declarators/rule.js +53 -4
  47. package/dist/domain/core/no-multiple-declarators/types.d.ts +3 -1
  48. package/dist/domain/core/no-multiple-declarators/types.d.ts.map +1 -1
  49. package/dist/domain/core/no-multiple-declarators/types.js +5 -2
  50. package/dist/domain/core/prefer-interface-types/rule.d.ts.map +1 -1
  51. package/dist/domain/core/prefer-interface-types/rule.js +90 -22
  52. package/dist/domain/custom-rule-documentation.d.ts +1 -14
  53. package/dist/domain/custom-rule-documentation.d.ts.map +1 -1
  54. package/dist/domain/custom-rule-documentation.js +2 -2
  55. package/dist/domain/docs/no-interface-member-docs/comment-utilities.d.ts.map +1 -1
  56. package/dist/domain/docs/no-interface-member-docs/comment-utilities.js +11 -2
  57. package/dist/domain/docs/no-interface-member-docs/parameter-tags.d.ts.map +1 -1
  58. package/dist/domain/docs/no-interface-member-docs/parameter-tags.js +1 -1
  59. package/dist/domain/docs/no-interface-member-docs/rule.d.ts.map +1 -1
  60. package/dist/domain/docs/no-interface-member-docs/rule.js +7 -2
  61. package/dist/domain/docs/require-example-language/examples.d.ts +4 -15
  62. package/dist/domain/docs/require-example-language/examples.d.ts.map +1 -1
  63. package/dist/domain/docs/require-example-language/examples.js +119 -26
  64. package/dist/domain/docs/require-example-language/fixes.d.ts +1 -21
  65. package/dist/domain/docs/require-example-language/fixes.d.ts.map +1 -1
  66. package/dist/domain/docs/require-example-language/fixes.js +5 -2
  67. package/dist/domain/docs/require-example-language/reporting.d.ts +2 -38
  68. package/dist/domain/docs/require-example-language/reporting.d.ts.map +1 -1
  69. package/dist/domain/docs/require-example-language/reporting.js +2 -2
  70. package/dist/domain/docs/require-example-language/rule.d.ts.map +1 -1
  71. package/dist/domain/docs/require-example-language/rule.js +2 -1
  72. package/dist/domain/docs/require-example-language/types.d.ts +1 -1
  73. package/dist/domain/docs/require-example-language/types.d.ts.map +1 -1
  74. package/dist/domain/docs/require-example-language/types.js +1 -1
  75. package/dist/domain/docs/single-line-jsdoc/rule.js +8 -8
  76. package/dist/domain/index.d.ts +2 -3
  77. package/dist/domain/index.d.ts.map +1 -1
  78. package/dist/domain/index.js +3 -4
  79. package/dist/domain/testing/aaa/analyzer.analysis.d.ts +1 -19
  80. package/dist/domain/testing/aaa/analyzer.analysis.d.ts.map +1 -1
  81. package/dist/domain/testing/aaa/analyzer.analysis.helpers.d.ts +8 -31
  82. package/dist/domain/testing/aaa/analyzer.analysis.helpers.d.ts.map +1 -1
  83. package/dist/domain/testing/aaa/analyzer.analysis.helpers.js +18 -22
  84. package/dist/domain/testing/aaa/analyzer.analysis.js +46 -39
  85. package/dist/domain/testing/aaa/analyzer.assertions.d.ts +1 -17
  86. package/dist/domain/testing/aaa/analyzer.assertions.d.ts.map +1 -1
  87. package/dist/domain/testing/aaa/analyzer.assertions.helpers.d.ts +1 -3
  88. package/dist/domain/testing/aaa/analyzer.assertions.helpers.d.ts.map +1 -1
  89. package/dist/domain/testing/aaa/analyzer.assertions.helpers.js +3 -4
  90. package/dist/domain/testing/aaa/analyzer.assertions.js +5 -33
  91. package/dist/domain/testing/aaa/analyzer.assertions.operands.d.ts +1 -3
  92. package/dist/domain/testing/aaa/analyzer.assertions.operands.d.ts.map +1 -1
  93. package/dist/domain/testing/aaa/analyzer.assertions.operands.js +6 -5
  94. package/dist/domain/testing/aaa/analyzer.classification.d.ts +1 -15
  95. package/dist/domain/testing/aaa/analyzer.classification.d.ts.map +1 -1
  96. package/dist/domain/testing/aaa/analyzer.classification.helpers.d.ts +1 -3
  97. package/dist/domain/testing/aaa/analyzer.classification.helpers.d.ts.map +1 -1
  98. package/dist/domain/testing/aaa/analyzer.classification.helpers.js +5 -6
  99. package/dist/domain/testing/aaa/analyzer.classification.js +5 -31
  100. package/dist/domain/testing/aaa/analyzer.classification.traversal.d.ts +1 -3
  101. package/dist/domain/testing/aaa/analyzer.classification.traversal.d.ts.map +1 -1
  102. package/dist/domain/testing/aaa/analyzer.classification.traversal.js +3 -5
  103. package/dist/domain/testing/aaa/analyzer.super.d.ts +1 -7
  104. package/dist/domain/testing/aaa/analyzer.super.d.ts.map +1 -1
  105. package/dist/domain/testing/aaa/analyzer.super.helpers.d.ts +1 -14
  106. package/dist/domain/testing/aaa/analyzer.super.helpers.d.ts.map +1 -1
  107. package/dist/domain/testing/aaa/analyzer.super.helpers.js +2 -4
  108. package/dist/domain/testing/aaa/analyzer.super.js +5 -20
  109. package/dist/domain/testing/aaa/index.d.ts +1 -2
  110. package/dist/domain/testing/aaa/index.d.ts.map +1 -1
  111. package/dist/domain/testing/aaa/index.js +2 -2
  112. package/dist/domain/testing/aaa/types.d.ts +1 -1
  113. package/dist/domain/testing/aaa/types.d.ts.map +1 -1
  114. package/dist/domain/testing/aaa/types.js +1 -1
  115. package/dist/domain/testing/assert-actual-expected-names/rule.d.ts.map +1 -1
  116. package/dist/domain/testing/assert-actual-expected-names/rule.js +28 -3
  117. package/dist/domain/testing/enforce-aaa-phase-purity/index.d.ts +2 -1
  118. package/dist/domain/testing/enforce-aaa-phase-purity/index.d.ts.map +1 -1
  119. package/dist/domain/testing/enforce-aaa-phase-purity/index.js +3 -2
  120. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-identifiers.d.ts +1 -1
  121. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-identifiers.d.ts.map +1 -1
  122. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-identifiers.js +1 -1
  123. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.d.ts +1 -1
  124. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.d.ts.map +1 -1
  125. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.js +78 -16
  126. package/dist/domain/testing/{require-aaa-sections → enforce-aaa-structure}/missing-section-fixes.d.ts +1 -1
  127. package/dist/domain/testing/enforce-aaa-structure/missing-section-fixes.d.ts.map +1 -0
  128. package/dist/domain/testing/enforce-aaa-structure/missing-section-fixes.js +150 -0
  129. package/dist/domain/testing/enforce-aaa-structure/rule.d.ts.map +1 -1
  130. package/dist/domain/testing/enforce-aaa-structure/rule.js +166 -7
  131. package/dist/domain/testing/index.d.ts +0 -3
  132. package/dist/domain/testing/index.d.ts.map +1 -1
  133. package/dist/domain/testing/index.js +1 -4
  134. package/dist/domain/testing/prefer-vi-mocked-import/fix-import-statements.d.ts +1 -15
  135. package/dist/domain/testing/prefer-vi-mocked-import/fix-import-statements.d.ts.map +1 -1
  136. package/dist/domain/testing/prefer-vi-mocked-import/fix-import-statements.js +2 -71
  137. package/dist/domain/testing/prefer-vi-mocked-import/fix-imports.d.ts.map +1 -1
  138. package/dist/domain/testing/prefer-vi-mocked-import/fix-imports.js +4 -2
  139. package/dist/domain/testing/prefer-vi-mocked-import/fix.d.ts +1 -13
  140. package/dist/domain/testing/prefer-vi-mocked-import/fix.d.ts.map +1 -1
  141. package/dist/domain/testing/prefer-vi-mocked-import/fix.js +3 -21
  142. package/dist/domain/testing/prefer-vi-mocked-import/match-bindings.d.ts.map +1 -1
  143. package/dist/domain/testing/prefer-vi-mocked-import/match-bindings.js +2 -1
  144. package/dist/domain/testing/prefer-vi-mocked-import/match-declarations.d.ts.map +1 -1
  145. package/dist/domain/testing/prefer-vi-mocked-import/match-declarations.js +1 -1
  146. package/dist/domain/testing/prefer-vi-mocked-import/match-rewrites.js +6 -6
  147. package/dist/domain/testing/prefer-vi-mocked-import/match.d.ts +1 -12
  148. package/dist/domain/testing/prefer-vi-mocked-import/match.d.ts.map +1 -1
  149. package/dist/domain/testing/prefer-vi-mocked-import/match.js +149 -15
  150. package/dist/domain/testing/require-act-result-capture/rule.d.ts.map +1 -1
  151. package/dist/domain/testing/require-act-result-capture/rule.js +37 -8
  152. package/dist/domain/testing/require-test-companion/index.d.ts +0 -1
  153. package/dist/domain/testing/require-test-companion/index.d.ts.map +1 -1
  154. package/dist/domain/testing/require-test-companion/index.js +1 -2
  155. package/dist/domain/testing/require-test-companion/require-test-companion-listeners.d.ts +2 -1
  156. package/dist/domain/testing/require-test-companion/require-test-companion-listeners.d.ts.map +1 -1
  157. package/dist/domain/testing/require-test-companion/require-test-companion-listeners.js +13 -58
  158. package/dist/domain/testing/require-test-companion/require-test-companion-options.d.ts +2 -1
  159. package/dist/domain/testing/require-test-companion/require-test-companion-options.d.ts.map +1 -1
  160. package/dist/domain/testing/require-test-companion/require-test-companion-options.js +6 -5
  161. package/dist/domain/testing/require-test-companion/rule.d.ts.map +1 -1
  162. package/dist/domain/testing/require-test-companion/rule.js +7 -7
  163. package/dist/domain/testing/single-act-statement/rule.d.ts.map +1 -1
  164. package/dist/domain/testing/single-act-statement/rule.js +6 -3
  165. package/dist/index.d.ts +1 -1
  166. package/dist/index.d.ts.map +1 -1
  167. package/dist/index.js +2 -2
  168. package/dist/infrastructure/codeperfect-plugin.d.ts +6 -6
  169. package/dist/infrastructure/codeperfect-plugin.js +5 -5
  170. package/dist/infrastructure/presets.d.ts.map +1 -1
  171. package/dist/infrastructure/presets.js +23 -7
  172. package/package.json +21 -30
  173. package/dist/domain/architecture/consistent-barrel-files/exports-only-rule-test-utilities.d.ts +0 -41
  174. package/dist/domain/architecture/consistent-barrel-files/exports-only-rule-test-utilities.d.ts.map +0 -1
  175. package/dist/domain/architecture/consistent-barrel-files/exports-only-rule-test-utilities.js +0 -87
  176. package/dist/domain/architecture/consistent-barrel-files/no-reexports-outside-barrels-test-utilities.d.ts +0 -40
  177. package/dist/domain/architecture/consistent-barrel-files/no-reexports-outside-barrels-test-utilities.d.ts.map +0 -1
  178. package/dist/domain/architecture/consistent-barrel-files/no-reexports-outside-barrels-test-utilities.js +0 -91
  179. package/dist/domain/architecture/consistent-barrel-files/rule.repeat-runs.d.ts +0 -4
  180. package/dist/domain/architecture/consistent-barrel-files/rule.repeat-runs.d.ts.map +0 -1
  181. package/dist/domain/architecture/consistent-barrel-files/rule.repeat-runs.js +0 -4
  182. package/dist/domain/architecture/consistent-barrel-files/test-helpers.d.ts +0 -141
  183. package/dist/domain/architecture/consistent-barrel-files/test-helpers.d.ts.map +0 -1
  184. package/dist/domain/architecture/consistent-barrel-files/test-helpers.file-writers.d.ts +0 -20
  185. package/dist/domain/architecture/consistent-barrel-files/test-helpers.file-writers.d.ts.map +0 -1
  186. package/dist/domain/architecture/consistent-barrel-files/test-helpers.file-writers.js +0 -25
  187. package/dist/domain/architecture/consistent-barrel-files/test-helpers.js +0 -235
  188. package/dist/domain/core/no-multiple-declarators/rule-test-helpers.d.ts +0 -101
  189. package/dist/domain/core/no-multiple-declarators/rule-test-helpers.d.ts.map +0 -1
  190. package/dist/domain/core/no-multiple-declarators/rule-test-helpers.js +0 -108
  191. package/dist/domain/core/no-multiple-declarators/rule.fixes.d.ts +0 -35
  192. package/dist/domain/core/no-multiple-declarators/rule.fixes.d.ts.map +0 -1
  193. package/dist/domain/core/no-multiple-declarators/rule.fixes.js +0 -95
  194. package/dist/domain/core/no-multiple-declarators/rule.guardrails.d.ts +0 -4
  195. package/dist/domain/core/no-multiple-declarators/rule.guardrails.d.ts.map +0 -1
  196. package/dist/domain/core/no-multiple-declarators/rule.guardrails.js +0 -4
  197. package/dist/domain/core/no-multiple-declarators/rule.mocked-types.d.ts +0 -4
  198. package/dist/domain/core/no-multiple-declarators/rule.mocked-types.d.ts.map +0 -1
  199. package/dist/domain/core/no-multiple-declarators/rule.mocked-types.js +0 -4
  200. package/dist/domain/core/prefer-interface-types/test-helpers.d.ts +0 -110
  201. package/dist/domain/core/prefer-interface-types/test-helpers.d.ts.map +0 -1
  202. package/dist/domain/core/prefer-interface-types/test-helpers.js +0 -116
  203. package/dist/domain/docs/no-interface-member-docs/comment-utilities-test-helpers.d.ts +0 -89
  204. package/dist/domain/docs/no-interface-member-docs/comment-utilities-test-helpers.d.ts.map +0 -1
  205. package/dist/domain/docs/no-interface-member-docs/comment-utilities-test-helpers.js +0 -129
  206. package/dist/domain/docs/no-interface-member-docs/test-helpers.d.ts +0 -103
  207. package/dist/domain/docs/no-interface-member-docs/test-helpers.d.ts.map +0 -1
  208. package/dist/domain/docs/no-interface-member-docs/test-helpers.js +0 -157
  209. package/dist/domain/docs/require-example-language/create-fixer.d.ts +0 -5
  210. package/dist/domain/docs/require-example-language/create-fixer.d.ts.map +0 -1
  211. package/dist/domain/docs/require-example-language/create-fixer.js +0 -5
  212. package/dist/domain/docs/single-line-jsdoc/rule.edge-cases.d.ts +0 -4
  213. package/dist/domain/docs/single-line-jsdoc/rule.edge-cases.d.ts.map +0 -1
  214. package/dist/domain/docs/single-line-jsdoc/rule.edge-cases.js +0 -5
  215. package/dist/domain/docs/single-line-jsdoc/rule.node-lookups.d.ts +0 -4
  216. package/dist/domain/docs/single-line-jsdoc/rule.node-lookups.d.ts.map +0 -1
  217. package/dist/domain/docs/single-line-jsdoc/rule.node-lookups.js +0 -5
  218. package/dist/domain/docs/test-helpers.d.ts +0 -50
  219. package/dist/domain/docs/test-helpers.d.ts.map +0 -1
  220. package/dist/domain/docs/test-helpers.js +0 -107
  221. package/dist/domain/testing/aaa/analyzer.analysis.unsupported.d.ts +0 -4
  222. package/dist/domain/testing/aaa/analyzer.analysis.unsupported.d.ts.map +0 -1
  223. package/dist/domain/testing/aaa/analyzer.analysis.unsupported.js +0 -4
  224. package/dist/domain/testing/aaa/analyzer.assertions.destructured.d.ts +0 -4
  225. package/dist/domain/testing/aaa/analyzer.assertions.destructured.d.ts.map +0 -1
  226. package/dist/domain/testing/aaa/analyzer.assertions.destructured.js +0 -4
  227. package/dist/domain/testing/aaa/analyzer.classification.member-patterns.d.ts +0 -9
  228. package/dist/domain/testing/aaa/analyzer.classification.member-patterns.d.ts.map +0 -1
  229. package/dist/domain/testing/aaa/analyzer.classification.member-patterns.js +0 -10
  230. package/dist/domain/testing/aaa/analyzer.classification.mutations.d.ts +0 -4
  231. package/dist/domain/testing/aaa/analyzer.classification.mutations.d.ts.map +0 -1
  232. package/dist/domain/testing/aaa/analyzer.classification.mutations.js +0 -4
  233. package/dist/domain/testing/aaa/analyzer.d.ts +0 -46
  234. package/dist/domain/testing/aaa/analyzer.d.ts.map +0 -1
  235. package/dist/domain/testing/aaa/analyzer.js +0 -59
  236. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.combined.d.ts +0 -4
  237. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.combined.d.ts.map +0 -1
  238. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.combined.js +0 -4
  239. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.companion.d.ts +0 -4
  240. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.companion.d.ts.map +0 -1
  241. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.companion.js +0 -4
  242. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.d.ts +0 -4
  243. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.d.ts.map +0 -1
  244. package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.js +0 -4
  245. package/dist/domain/testing/enforce-aaa-phase-purity/rule-test-helpers.d.ts +0 -42
  246. package/dist/domain/testing/enforce-aaa-phase-purity/rule-test-helpers.d.ts.map +0 -1
  247. package/dist/domain/testing/enforce-aaa-phase-purity/rule-test-helpers.js +0 -188
  248. package/dist/domain/testing/enforce-aaa-phase-purity/rule.d.ts +0 -5
  249. package/dist/domain/testing/enforce-aaa-phase-purity/rule.d.ts.map +0 -1
  250. package/dist/domain/testing/enforce-aaa-phase-purity/rule.js +0 -37
  251. package/dist/domain/testing/prefer-vi-mocked-import/rule-test-helpers.d.ts +0 -20
  252. package/dist/domain/testing/prefer-vi-mocked-import/rule-test-helpers.d.ts.map +0 -1
  253. package/dist/domain/testing/prefer-vi-mocked-import/rule-test-helpers.js +0 -39
  254. package/dist/domain/testing/prefer-vitest-incremental-casts/ast-helpers.d.ts +0 -97
  255. package/dist/domain/testing/prefer-vitest-incremental-casts/ast-helpers.d.ts.map +0 -1
  256. package/dist/domain/testing/prefer-vitest-incremental-casts/ast-helpers.js +0 -174
  257. package/dist/domain/testing/prefer-vitest-incremental-casts/index.d.ts +0 -2
  258. package/dist/domain/testing/prefer-vitest-incremental-casts/index.d.ts.map +0 -1
  259. package/dist/domain/testing/prefer-vitest-incremental-casts/index.js +0 -2
  260. package/dist/domain/testing/prefer-vitest-incremental-casts/match-input.d.ts +0 -14
  261. package/dist/domain/testing/prefer-vitest-incremental-casts/match-input.d.ts.map +0 -1
  262. package/dist/domain/testing/prefer-vitest-incremental-casts/match-input.js +0 -84
  263. package/dist/domain/testing/prefer-vitest-incremental-casts/match.d.ts +0 -13
  264. package/dist/domain/testing/prefer-vitest-incremental-casts/match.d.ts.map +0 -1
  265. package/dist/domain/testing/prefer-vitest-incremental-casts/match.js +0 -195
  266. package/dist/domain/testing/prefer-vitest-incremental-casts/replacement-helpers.d.ts +0 -25
  267. package/dist/domain/testing/prefer-vitest-incremental-casts/replacement-helpers.d.ts.map +0 -1
  268. package/dist/domain/testing/prefer-vitest-incremental-casts/replacement-helpers.js +0 -96
  269. package/dist/domain/testing/prefer-vitest-incremental-casts/rule-test-helpers.d.ts +0 -32
  270. package/dist/domain/testing/prefer-vitest-incremental-casts/rule-test-helpers.d.ts.map +0 -1
  271. package/dist/domain/testing/prefer-vitest-incremental-casts/rule-test-helpers.js +0 -164
  272. package/dist/domain/testing/prefer-vitest-incremental-casts/rule.d.ts +0 -5
  273. package/dist/domain/testing/prefer-vitest-incremental-casts/rule.d.ts.map +0 -1
  274. package/dist/domain/testing/prefer-vitest-incremental-casts/rule.guardrails.d.ts +0 -4
  275. package/dist/domain/testing/prefer-vitest-incremental-casts/rule.guardrails.d.ts.map +0 -1
  276. package/dist/domain/testing/prefer-vitest-incremental-casts/rule.guardrails.js +0 -4
  277. package/dist/domain/testing/prefer-vitest-incremental-casts/rule.input-shapes.d.ts +0 -4
  278. package/dist/domain/testing/prefer-vitest-incremental-casts/rule.input-shapes.d.ts.map +0 -1
  279. package/dist/domain/testing/prefer-vitest-incremental-casts/rule.input-shapes.js +0 -4
  280. package/dist/domain/testing/prefer-vitest-incremental-casts/rule.js +0 -88
  281. package/dist/domain/testing/prefer-vitest-incremental-casts/rule.signature-fallback.d.ts +0 -4
  282. package/dist/domain/testing/prefer-vitest-incremental-casts/rule.signature-fallback.d.ts.map +0 -1
  283. package/dist/domain/testing/prefer-vitest-incremental-casts/rule.signature-fallback.js +0 -4
  284. package/dist/domain/testing/prefer-vitest-incremental-casts/type-helpers.d.ts +0 -24
  285. package/dist/domain/testing/prefer-vitest-incremental-casts/type-helpers.d.ts.map +0 -1
  286. package/dist/domain/testing/prefer-vitest-incremental-casts/type-helpers.js +0 -113
  287. package/dist/domain/testing/prefer-vitest-incremental-casts/type-shape-helpers.d.ts +0 -36
  288. package/dist/domain/testing/prefer-vitest-incremental-casts/type-shape-helpers.d.ts.map +0 -1
  289. package/dist/domain/testing/prefer-vitest-incremental-casts/type-shape-helpers.js +0 -138
  290. package/dist/domain/testing/prefer-vitest-incremental-casts/types.d.ts +0 -187
  291. package/dist/domain/testing/prefer-vitest-incremental-casts/types.d.ts.map +0 -1
  292. package/dist/domain/testing/prefer-vitest-incremental-casts/types.js +0 -2
  293. package/dist/domain/testing/require-aaa-sections/index.d.ts +0 -2
  294. package/dist/domain/testing/require-aaa-sections/index.d.ts.map +0 -1
  295. package/dist/domain/testing/require-aaa-sections/index.js +0 -2
  296. package/dist/domain/testing/require-aaa-sections/missing-section-fixes.d.ts.map +0 -1
  297. package/dist/domain/testing/require-aaa-sections/missing-section-fixes.js +0 -150
  298. package/dist/domain/testing/require-aaa-sections/rule.d.ts +0 -5
  299. package/dist/domain/testing/require-aaa-sections/rule.d.ts.map +0 -1
  300. package/dist/domain/testing/require-aaa-sections/rule.js +0 -134
  301. package/dist/domain/testing/require-aaa-sections/rule.reporting.d.ts +0 -104
  302. package/dist/domain/testing/require-aaa-sections/rule.reporting.d.ts.map +0 -1
  303. package/dist/domain/testing/require-aaa-sections/rule.reporting.js +0 -216
  304. package/dist/domain/testing/require-test-companion/require-test-companion-test-helpers.d.ts +0 -51
  305. package/dist/domain/testing/require-test-companion/require-test-companion-test-helpers.d.ts.map +0 -1
  306. package/dist/domain/testing/require-test-companion/require-test-companion-test-helpers.js +0 -184
  307. package/dist/domain/testing/require-test-companion/require-test-companion-utilities.d.ts +0 -28
  308. package/dist/domain/testing/require-test-companion/require-test-companion-utilities.d.ts.map +0 -1
  309. package/dist/domain/testing/require-test-companion/require-test-companion-utilities.js +0 -26
@@ -0,0 +1,141 @@
1
+ import { minimatch } from "minimatch";
2
+ import path from "node:path";
3
+ /** Default public API files where exported symbols are intentionally exposed. */
4
+ export const DEFAULT_PUBLIC_API_FILES = [
5
+ "**/src/index.ts",
6
+ "**/__tests__/**/*.ts",
7
+ ];
8
+ /** Default glob patterns used to classify test files. */
9
+ export const DEFAULT_TEST_FILE_PATTERNS = [
10
+ "**/*.{test,spec,e2e}.ts",
11
+ "**/__tests__/**/*.ts",
12
+ ];
13
+ /** Default file pattern used to scope analysis to source files. */
14
+ const DEFAULT_LINTABLE_FILE_PATTERN = "**/src/**/*.ts";
15
+ /**
16
+ * Checks whether one path is absolute and non-empty.
17
+ * @param filename Input filename.
18
+ * @returns True when the path is absolute and non-empty.
19
+ * @example
20
+ * ```typescript
21
+ * const ok = isAbsolutePath("/repo/src/feature.ts");
22
+ * ```
23
+ */
24
+ const isAbsolutePath = (filename) => filename.length > 0 && path.isAbsolute(filename);
25
+ /**
26
+ * Checks whether one file path is lintable.
27
+ * @param filename Input filename.
28
+ * @returns True when the path is absolute and matches source-file scope.
29
+ * @example
30
+ * ```typescript
31
+ * const ok = isLintableFilename("/repo/src/feature.ts");
32
+ * ```
33
+ */
34
+ export const isLintableFilename = (filename) => {
35
+ if (!isAbsolutePath(filename)) {
36
+ return false;
37
+ }
38
+ const normalizedPath = filename.split(path.sep).join("/");
39
+ return minimatch(normalizedPath, DEFAULT_LINTABLE_FILE_PATTERN, {
40
+ dot: true,
41
+ });
42
+ };
43
+ /**
44
+ * Normalizes one rule option value into a string list.
45
+ * @param value Raw option value.
46
+ * @param defaults Default values.
47
+ * @returns Normalized list.
48
+ * @example
49
+ * ```typescript
50
+ * const list = normalizeStringList(["src/**"], ["src/**"]);
51
+ * ```
52
+ */
53
+ const normalizeStringList = (value, defaults) => {
54
+ if (Array.isArray(value)) {
55
+ const normalized = value
56
+ .filter((entry) => typeof entry === "string")
57
+ .map((entry) => entry.trim())
58
+ .filter((entry) => entry.length > 0);
59
+ return normalized.length > 0 ? normalized : [...defaults];
60
+ }
61
+ return [...defaults];
62
+ };
63
+ /**
64
+ * Builds normalized options from raw rule options.
65
+ * @param options Raw rule options.
66
+ * @returns Normalized options state.
67
+ * @example
68
+ * ```typescript
69
+ * const state = getOptions([{}]);
70
+ * ```
71
+ */
72
+ export const getOptions = (options) => {
73
+ const raw = options[0];
74
+ return {
75
+ publicApiFiles: normalizeStringList(raw?.publicApiFiles, DEFAULT_PUBLIC_API_FILES),
76
+ testFilePatterns: normalizeStringList(raw?.testFilePatterns, DEFAULT_TEST_FILE_PATTERNS),
77
+ };
78
+ };
79
+ /**
80
+ * Converts an absolute filename into a repo-root-relative POSIX path.
81
+ * @param filename Absolute filename.
82
+ * @param repoRoot Absolute repository root.
83
+ * @returns Repo-relative POSIX path or undefined when outside repo root.
84
+ * @example
85
+ * ```typescript
86
+ * const relativePath = toRepoRelativePosixPath("/repo/src/feature.ts", "/repo");
87
+ * ```
88
+ */
89
+ const toRepoRelativePosixPath = (filename, repoRoot) => {
90
+ if (!isAbsolutePath(filename) || !isAbsolutePath(repoRoot)) {
91
+ return void 0;
92
+ }
93
+ const relativePath = path.relative(repoRoot, filename);
94
+ if (relativePath.startsWith("..") || path.isAbsolute(relativePath)) {
95
+ return void 0;
96
+ }
97
+ return relativePath.split(path.sep).join("/");
98
+ };
99
+ /**
100
+ * Checks whether one filename matches any glob pattern.
101
+ * @param filename Absolute filename.
102
+ * @param patterns Glob patterns.
103
+ * @param repoRoot Absolute repository root.
104
+ * @returns True when any pattern matches.
105
+ * @example
106
+ * ```typescript
107
+ * const match = matchesAnyPattern("/repo/src/index.ts", ["src-pattern"], "/repo");
108
+ * ```
109
+ */
110
+ const matchesAnyPattern = (filename, patterns, repoRoot) => {
111
+ const relativePath = toRepoRelativePosixPath(filename, repoRoot);
112
+ if (relativePath === void 0 || patterns.length === 0) {
113
+ return false;
114
+ }
115
+ return patterns.some((pattern) => minimatch(relativePath, pattern, { dot: true }));
116
+ };
117
+ /**
118
+ * Checks whether one file defines a public API export surface.
119
+ * @param filename Absolute filename.
120
+ * @param state Normalized options.
121
+ * @param repoRoot Absolute repository root.
122
+ * @returns True when the file is a public API file.
123
+ * @example
124
+ * ```typescript
125
+ * const publicApiFile = isPublicApiFile("/repo/src/index.ts", state, "/repo");
126
+ * ```
127
+ */
128
+ export const isPublicApiFile = (filename, state, repoRoot) => matchesAnyPattern(filename, state.publicApiFiles, repoRoot);
129
+ /**
130
+ * Checks whether one file should be treated as a test file.
131
+ * @param filename Absolute filename.
132
+ * @param state Normalized options.
133
+ * @param repoRoot Absolute repository root.
134
+ * @returns True when the file path matches a test pattern.
135
+ * @example
136
+ * ```typescript
137
+ * const testFile = isTestFile("/repo/tests/e2e/demo.ts", state, "/repo");
138
+ * ```
139
+ */
140
+ export const isTestFile = (filename, state, repoRoot) => matchesAnyPattern(filename, state.testFilePatterns, repoRoot);
141
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm8tdW51c2VkLWV4cG9ydHMtb3B0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9kb21haW4vYXJjaGl0ZWN0dXJlL25vLXVudXNlZC1leHBvcnRzL25vLXVudXNlZC1leHBvcnRzLW9wdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLFdBQVcsQ0FBQztBQUN0QyxPQUFPLElBQUksTUFBTSxXQUFXLENBQUM7QUFJN0IsaUZBQWlGO0FBQ2pGLE1BQU0sQ0FBQyxNQUFNLHdCQUF3QixHQUFHO0lBQ3RDLGlCQUFpQjtJQUNqQixzQkFBc0I7Q0FDZCxDQUFDO0FBRVgseURBQXlEO0FBQ3pELE1BQU0sQ0FBQyxNQUFNLDBCQUEwQixHQUFHO0lBQ3hDLHlCQUF5QjtJQUN6QixzQkFBc0I7Q0FDZCxDQUFDO0FBR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4pOiBib29sZWFuID0+IG1hdGNoZXNBbnlQYXR0ZXJuKGZpbGVuYW1lLCBzdGF0ZS50ZXN0RmlsZVBhdHRlcm5zLCByZXBvUm9vdCk7XG4iXX0=
@@ -0,0 +1,49 @@
1
+ import type { AST, Rule } from "eslint";
2
+ import * as ts from "typescript";
3
+ import type { ExportedElement, ExportUsage, NoUnusedExportsState } from "./types.js";
4
+ /**
5
+ * Resolves TypeScript parser services program when available.
6
+ * @param context Rule context.
7
+ * @returns TypeScript program when available.
8
+ * @example
9
+ * ```typescript
10
+ * const program = getTypeScriptProgram(context);
11
+ * ```
12
+ */
13
+ declare const getTypeScriptProgram: (context: Rule.RuleContext) => ts.Program | undefined;
14
+ /**
15
+ * Collects exported elements from one program body.
16
+ * @param body Program body statements.
17
+ * @returns Exported elements in declaration order.
18
+ * @example
19
+ * ```typescript
20
+ * const exported = collectExportedElements(program.body);
21
+ * ```
22
+ */
23
+ declare const collectExportedElements: (body: AST.Program["body"]) => ExportedElement[];
24
+ /**
25
+ * Collects concrete usages of one exported element across the program.
26
+ * @param program TypeScript program.
27
+ * @param sourceFilename Source filename where export is defined.
28
+ * @param state Normalized rule options.
29
+ * @param repoRoot Absolute repository root used for test-file classification.
30
+ * @param exportedElement Exported element to classify.
31
+ * @returns Concrete usages for the exported element.
32
+ * @example
33
+ * ```typescript
34
+ * const usages = collectCrossFileUsages(program, "/repo/src/feature.ts", state, "/repo", exportedElement);
35
+ * ```
36
+ */
37
+ declare const collectCrossFileUsages: (program: ts.Program, sourceFilename: string, state: NoUnusedExportsState, repoRoot: string, exportedElement: ExportedElement) => ExportUsage[];
38
+ /**
39
+ * Classifies one exported name based on cross-file usages.
40
+ * @param usages Collected usages.
41
+ * @returns Classification label.
42
+ * @example
43
+ * ```typescript
44
+ * const classification = classifyExportUsage("feature", usages);
45
+ * ```
46
+ */
47
+ declare const classifyExportUsage: (usages: ExportUsage[]) => "production" | "test-only" | "unused";
48
+ export { classifyExportUsage, collectCrossFileUsages, collectExportedElements, getTypeScriptProgram, };
49
+ //# sourceMappingURL=no-unused-exports-utilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-unused-exports-utilities.d.ts","sourceRoot":"","sources":["../../../../src/domain/architecture/no-unused-exports/no-unused-exports-utilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAIxC,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EACV,eAAe,EAEf,WAAW,EACX,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAgFjB;;;;;;;;GAQG;AACH,QAAA,MAAM,oBAAoB,GACxB,SAAS,IAAI,CAAC,WAAW,KACxB,EAAE,CAAC,OAAO,GAAG,SAOf,CAAC;AA0LF;;;;;;;;GAQG;AACH,QAAA,MAAM,uBAAuB,GAC3B,MAAM,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,KACxB,eAAe,EAsFjB,CAAC;AA+VF;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,sBAAsB,GAC1B,SAAS,EAAE,CAAC,OAAO,EACnB,gBAAgB,MAAM,EACtB,OAAO,oBAAoB,EAC3B,UAAU,MAAM,EAChB,iBAAiB,eAAe,KAC/B,WAAW,EAoDb,CAAC;AAEF;;;;;;;;GAQG;AACH,QAAA,MAAM,mBAAmB,GACvB,QAAQ,WAAW,EAAE,KACpB,YAAY,GAAG,WAAW,GAAG,QAY/B,CAAC;AAEF,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,GACrB,CAAC"}