@opensip-cli/checks-universal 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 (620) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +8 -0
  3. package/README.md +31 -0
  4. package/dist/__tests__/all-checks-execute.test.d.ts +17 -0
  5. package/dist/__tests__/all-checks-execute.test.d.ts.map +1 -0
  6. package/dist/__tests__/all-checks-execute.test.js +452 -0
  7. package/dist/__tests__/all-checks-execute.test.js.map +1 -0
  8. package/dist/__tests__/behavior-fixtures-10.test.d.ts +8 -0
  9. package/dist/__tests__/behavior-fixtures-10.test.d.ts.map +1 -0
  10. package/dist/__tests__/behavior-fixtures-10.test.js +200 -0
  11. package/dist/__tests__/behavior-fixtures-10.test.js.map +1 -0
  12. package/dist/__tests__/behavior-fixtures-11.test.d.ts +8 -0
  13. package/dist/__tests__/behavior-fixtures-11.test.d.ts.map +1 -0
  14. package/dist/__tests__/behavior-fixtures-11.test.js +120 -0
  15. package/dist/__tests__/behavior-fixtures-11.test.js.map +1 -0
  16. package/dist/__tests__/behavior-fixtures-12.test.d.ts +8 -0
  17. package/dist/__tests__/behavior-fixtures-12.test.d.ts.map +1 -0
  18. package/dist/__tests__/behavior-fixtures-12.test.js +157 -0
  19. package/dist/__tests__/behavior-fixtures-12.test.js.map +1 -0
  20. package/dist/__tests__/behavior-fixtures-2.test.d.ts +8 -0
  21. package/dist/__tests__/behavior-fixtures-2.test.d.ts.map +1 -0
  22. package/dist/__tests__/behavior-fixtures-2.test.js +785 -0
  23. package/dist/__tests__/behavior-fixtures-2.test.js.map +1 -0
  24. package/dist/__tests__/behavior-fixtures-3.test.d.ts +6 -0
  25. package/dist/__tests__/behavior-fixtures-3.test.d.ts.map +1 -0
  26. package/dist/__tests__/behavior-fixtures-3.test.js +663 -0
  27. package/dist/__tests__/behavior-fixtures-3.test.js.map +1 -0
  28. package/dist/__tests__/behavior-fixtures-4.test.d.ts +5 -0
  29. package/dist/__tests__/behavior-fixtures-4.test.d.ts.map +1 -0
  30. package/dist/__tests__/behavior-fixtures-4.test.js +612 -0
  31. package/dist/__tests__/behavior-fixtures-4.test.js.map +1 -0
  32. package/dist/__tests__/behavior-fixtures-5.test.d.ts +5 -0
  33. package/dist/__tests__/behavior-fixtures-5.test.d.ts.map +1 -0
  34. package/dist/__tests__/behavior-fixtures-5.test.js +469 -0
  35. package/dist/__tests__/behavior-fixtures-5.test.js.map +1 -0
  36. package/dist/__tests__/behavior-fixtures-6.test.d.ts +8 -0
  37. package/dist/__tests__/behavior-fixtures-6.test.d.ts.map +1 -0
  38. package/dist/__tests__/behavior-fixtures-6.test.js +591 -0
  39. package/dist/__tests__/behavior-fixtures-6.test.js.map +1 -0
  40. package/dist/__tests__/behavior-fixtures-7.test.d.ts +5 -0
  41. package/dist/__tests__/behavior-fixtures-7.test.d.ts.map +1 -0
  42. package/dist/__tests__/behavior-fixtures-7.test.js +662 -0
  43. package/dist/__tests__/behavior-fixtures-7.test.js.map +1 -0
  44. package/dist/__tests__/behavior-fixtures-8.test.d.ts +11 -0
  45. package/dist/__tests__/behavior-fixtures-8.test.d.ts.map +1 -0
  46. package/dist/__tests__/behavior-fixtures-8.test.js +634 -0
  47. package/dist/__tests__/behavior-fixtures-8.test.js.map +1 -0
  48. package/dist/__tests__/behavior-fixtures-9.test.d.ts +11 -0
  49. package/dist/__tests__/behavior-fixtures-9.test.d.ts.map +1 -0
  50. package/dist/__tests__/behavior-fixtures-9.test.js +271 -0
  51. package/dist/__tests__/behavior-fixtures-9.test.js.map +1 -0
  52. package/dist/__tests__/behavior-fixtures.test.d.ts +14 -0
  53. package/dist/__tests__/behavior-fixtures.test.d.ts.map +1 -0
  54. package/dist/__tests__/behavior-fixtures.test.js +1423 -0
  55. package/dist/__tests__/behavior-fixtures.test.js.map +1 -0
  56. package/dist/__tests__/checks.test.d.ts +2 -0
  57. package/dist/__tests__/checks.test.d.ts.map +1 -0
  58. package/dist/__tests__/checks.test.js +61 -0
  59. package/dist/__tests__/checks.test.js.map +1 -0
  60. package/dist/__tests__/env-var-validation.test.d.ts +14 -0
  61. package/dist/__tests__/env-var-validation.test.d.ts.map +1 -0
  62. package/dist/__tests__/env-var-validation.test.js +53 -0
  63. package/dist/__tests__/env-var-validation.test.js.map +1 -0
  64. package/dist/__tests__/file-length-limit.test.d.ts +2 -0
  65. package/dist/__tests__/file-length-limit.test.d.ts.map +1 -0
  66. package/dist/__tests__/file-length-limit.test.js +29 -0
  67. package/dist/__tests__/file-length-limit.test.js.map +1 -0
  68. package/dist/__tests__/fixture-coverage.allowlist.d.ts +18 -0
  69. package/dist/__tests__/fixture-coverage.allowlist.d.ts.map +1 -0
  70. package/dist/__tests__/fixture-coverage.allowlist.js +35 -0
  71. package/dist/__tests__/fixture-coverage.allowlist.js.map +1 -0
  72. package/dist/__tests__/fixture-coverage.test.d.ts +13 -0
  73. package/dist/__tests__/fixture-coverage.test.d.ts.map +1 -0
  74. package/dist/__tests__/fixture-coverage.test.js +57 -0
  75. package/dist/__tests__/fixture-coverage.test.js.map +1 -0
  76. package/dist/__tests__/iic.test.d.ts +15 -0
  77. package/dist/__tests__/iic.test.d.ts.map +1 -0
  78. package/dist/__tests__/iic.test.js +316 -0
  79. package/dist/__tests__/iic.test.js.map +1 -0
  80. package/dist/__tests__/no-skipped-tests.test.d.ts +14 -0
  81. package/dist/__tests__/no-skipped-tests.test.d.ts.map +1 -0
  82. package/dist/__tests__/no-skipped-tests.test.js +144 -0
  83. package/dist/__tests__/no-skipped-tests.test.js.map +1 -0
  84. package/dist/__tests__/no-todo-comments.test.d.ts +2 -0
  85. package/dist/__tests__/no-todo-comments.test.d.ts.map +1 -0
  86. package/dist/__tests__/no-todo-comments.test.js +31 -0
  87. package/dist/__tests__/no-todo-comments.test.js.map +1 -0
  88. package/dist/__tests__/no-unimplemented-markers.test.d.ts +2 -0
  89. package/dist/__tests__/no-unimplemented-markers.test.d.ts.map +1 -0
  90. package/dist/__tests__/no-unimplemented-markers.test.js +140 -0
  91. package/dist/__tests__/no-unimplemented-markers.test.js.map +1 -0
  92. package/dist/__tests__/public-api-jsdoc-scope.test.d.ts +10 -0
  93. package/dist/__tests__/public-api-jsdoc-scope.test.d.ts.map +1 -0
  94. package/dist/__tests__/public-api-jsdoc-scope.test.js +176 -0
  95. package/dist/__tests__/public-api-jsdoc-scope.test.js.map +1 -0
  96. package/dist/__tests__/resilience-fp.test.d.ts +14 -0
  97. package/dist/__tests__/resilience-fp.test.d.ts.map +1 -0
  98. package/dist/__tests__/resilience-fp.test.js +110 -0
  99. package/dist/__tests__/resilience-fp.test.js.map +1 -0
  100. package/dist/checks/architecture/__tests__/no-kebab-option-indexing.test.d.ts +2 -0
  101. package/dist/checks/architecture/__tests__/no-kebab-option-indexing.test.d.ts.map +1 -0
  102. package/dist/checks/architecture/__tests__/no-kebab-option-indexing.test.js +32 -0
  103. package/dist/checks/architecture/__tests__/no-kebab-option-indexing.test.js.map +1 -0
  104. package/dist/checks/architecture/__tests__/tool-has-manifest.test.d.ts +2 -0
  105. package/dist/checks/architecture/__tests__/tool-has-manifest.test.d.ts.map +1 -0
  106. package/dist/checks/architecture/__tests__/tool-has-manifest.test.js +152 -0
  107. package/dist/checks/architecture/__tests__/tool-has-manifest.test.js.map +1 -0
  108. package/dist/checks/architecture/__tests__/vitest-config-required-with-tests.test.d.ts +2 -0
  109. package/dist/checks/architecture/__tests__/vitest-config-required-with-tests.test.d.ts.map +1 -0
  110. package/dist/checks/architecture/__tests__/vitest-config-required-with-tests.test.js +129 -0
  111. package/dist/checks/architecture/__tests__/vitest-config-required-with-tests.test.js.map +1 -0
  112. package/dist/checks/architecture/_yaml-doc-bindings.d.ts +23 -0
  113. package/dist/checks/architecture/_yaml-doc-bindings.d.ts.map +1 -0
  114. package/dist/checks/architecture/_yaml-doc-bindings.js +29 -0
  115. package/dist/checks/architecture/_yaml-doc-bindings.js.map +1 -0
  116. package/dist/checks/architecture/dependencies/index.d.ts +2 -0
  117. package/dist/checks/architecture/dependencies/index.d.ts.map +1 -0
  118. package/dist/checks/architecture/dependencies/index.js +2 -0
  119. package/dist/checks/architecture/dependencies/index.js.map +1 -0
  120. package/dist/checks/architecture/dependencies/no-duplicate-packages.d.ts +11 -0
  121. package/dist/checks/architecture/dependencies/no-duplicate-packages.d.ts.map +1 -0
  122. package/dist/checks/architecture/dependencies/no-duplicate-packages.js +171 -0
  123. package/dist/checks/architecture/dependencies/no-duplicate-packages.js.map +1 -0
  124. package/dist/checks/architecture/docker-best-practices.d.ts +23 -0
  125. package/dist/checks/architecture/docker-best-practices.d.ts.map +1 -0
  126. package/dist/checks/architecture/docker-best-practices.js +427 -0
  127. package/dist/checks/architecture/docker-best-practices.js.map +1 -0
  128. package/dist/checks/architecture/docker-ignore-validation.d.ts +18 -0
  129. package/dist/checks/architecture/docker-ignore-validation.d.ts.map +1 -0
  130. package/dist/checks/architecture/docker-ignore-validation.js +117 -0
  131. package/dist/checks/architecture/docker-ignore-validation.js.map +1 -0
  132. package/dist/checks/architecture/docker-version-sync.d.ts +16 -0
  133. package/dist/checks/architecture/docker-version-sync.d.ts.map +1 -0
  134. package/dist/checks/architecture/docker-version-sync.js +193 -0
  135. package/dist/checks/architecture/docker-version-sync.js.map +1 -0
  136. package/dist/checks/architecture/env-var-validation.d.ts +14 -0
  137. package/dist/checks/architecture/env-var-validation.d.ts.map +1 -0
  138. package/dist/checks/architecture/env-var-validation.js +289 -0
  139. package/dist/checks/architecture/env-var-validation.js.map +1 -0
  140. package/dist/checks/architecture/heavy-import-detection.d.ts +11 -0
  141. package/dist/checks/architecture/heavy-import-detection.d.ts.map +1 -0
  142. package/dist/checks/architecture/heavy-import-detection.js +91 -0
  143. package/dist/checks/architecture/heavy-import-detection.js.map +1 -0
  144. package/dist/checks/architecture/index.d.ts +16 -0
  145. package/dist/checks/architecture/index.d.ts.map +1 -0
  146. package/dist/checks/architecture/index.js +16 -0
  147. package/dist/checks/architecture/index.js.map +1 -0
  148. package/dist/checks/architecture/modules/empty-package-detection.d.ts +11 -0
  149. package/dist/checks/architecture/modules/empty-package-detection.d.ts.map +1 -0
  150. package/dist/checks/architecture/modules/empty-package-detection.js +277 -0
  151. package/dist/checks/architecture/modules/empty-package-detection.js.map +1 -0
  152. package/dist/checks/architecture/modules/index.d.ts +3 -0
  153. package/dist/checks/architecture/modules/index.d.ts.map +1 -0
  154. package/dist/checks/architecture/modules/index.js +3 -0
  155. package/dist/checks/architecture/modules/index.js.map +1 -0
  156. package/dist/checks/architecture/modules/interface-implementation-consistency.d.ts +12 -0
  157. package/dist/checks/architecture/modules/interface-implementation-consistency.d.ts.map +1 -0
  158. package/dist/checks/architecture/modules/interface-implementation-consistency.js +555 -0
  159. package/dist/checks/architecture/modules/interface-implementation-consistency.js.map +1 -0
  160. package/dist/checks/architecture/no-custom-event-emitter.d.ts +11 -0
  161. package/dist/checks/architecture/no-custom-event-emitter.d.ts.map +1 -0
  162. package/dist/checks/architecture/no-custom-event-emitter.js +123 -0
  163. package/dist/checks/architecture/no-custom-event-emitter.js.map +1 -0
  164. package/dist/checks/architecture/no-kebab-option-indexing.d.ts +33 -0
  165. package/dist/checks/architecture/no-kebab-option-indexing.d.ts.map +1 -0
  166. package/dist/checks/architecture/no-kebab-option-indexing.js +81 -0
  167. package/dist/checks/architecture/no-kebab-option-indexing.js.map +1 -0
  168. package/dist/checks/architecture/node-version-consistency.d.ts +22 -0
  169. package/dist/checks/architecture/node-version-consistency.d.ts.map +1 -0
  170. package/dist/checks/architecture/node-version-consistency.js +225 -0
  171. package/dist/checks/architecture/node-version-consistency.js.map +1 -0
  172. package/dist/checks/architecture/project-readme-existence.d.ts +13 -0
  173. package/dist/checks/architecture/project-readme-existence.d.ts.map +1 -0
  174. package/dist/checks/architecture/project-readme-existence.js +55 -0
  175. package/dist/checks/architecture/project-readme-existence.js.map +1 -0
  176. package/dist/checks/architecture/stale-build-artifacts.d.ts +10 -0
  177. package/dist/checks/architecture/stale-build-artifacts.d.ts.map +1 -0
  178. package/dist/checks/architecture/stale-build-artifacts.js +55 -0
  179. package/dist/checks/architecture/stale-build-artifacts.js.map +1 -0
  180. package/dist/checks/architecture/tool-has-manifest.d.ts +27 -0
  181. package/dist/checks/architecture/tool-has-manifest.d.ts.map +1 -0
  182. package/dist/checks/architecture/tool-has-manifest.js +135 -0
  183. package/dist/checks/architecture/tool-has-manifest.js.map +1 -0
  184. package/dist/checks/architecture/vitest-config-extends-base.d.ts +15 -0
  185. package/dist/checks/architecture/vitest-config-extends-base.d.ts.map +1 -0
  186. package/dist/checks/architecture/vitest-config-extends-base.js +104 -0
  187. package/dist/checks/architecture/vitest-config-extends-base.js.map +1 -0
  188. package/dist/checks/architecture/vitest-config-required-with-tests.d.ts +49 -0
  189. package/dist/checks/architecture/vitest-config-required-with-tests.d.ts.map +1 -0
  190. package/dist/checks/architecture/vitest-config-required-with-tests.js +199 -0
  191. package/dist/checks/architecture/vitest-config-required-with-tests.js.map +1 -0
  192. package/dist/checks/documentation/_directives/eslint.d.ts +9 -0
  193. package/dist/checks/documentation/_directives/eslint.d.ts.map +1 -0
  194. package/dist/checks/documentation/_directives/eslint.js +168 -0
  195. package/dist/checks/documentation/_directives/eslint.js.map +1 -0
  196. package/dist/checks/documentation/_directives/fitness.d.ts +9 -0
  197. package/dist/checks/documentation/_directives/fitness.d.ts.map +1 -0
  198. package/dist/checks/documentation/_directives/fitness.js +64 -0
  199. package/dist/checks/documentation/_directives/fitness.js.map +1 -0
  200. package/dist/checks/documentation/_directives/graph.d.ts +10 -0
  201. package/dist/checks/documentation/_directives/graph.d.ts.map +1 -0
  202. package/dist/checks/documentation/_directives/graph.js +65 -0
  203. package/dist/checks/documentation/_directives/graph.js.map +1 -0
  204. package/dist/checks/documentation/_directives/graph.test.d.ts +2 -0
  205. package/dist/checks/documentation/_directives/graph.test.d.ts.map +1 -0
  206. package/dist/checks/documentation/_directives/graph.test.js +54 -0
  207. package/dist/checks/documentation/_directives/graph.test.js.map +1 -0
  208. package/dist/checks/documentation/_directives/semgrep.d.ts +8 -0
  209. package/dist/checks/documentation/_directives/semgrep.d.ts.map +1 -0
  210. package/dist/checks/documentation/_directives/semgrep.js +72 -0
  211. package/dist/checks/documentation/_directives/semgrep.js.map +1 -0
  212. package/dist/checks/documentation/_directives/types.d.ts +21 -0
  213. package/dist/checks/documentation/_directives/types.d.ts.map +1 -0
  214. package/dist/checks/documentation/_directives/types.js +9 -0
  215. package/dist/checks/documentation/_directives/types.js.map +1 -0
  216. package/dist/checks/documentation/_directives/typescript.d.ts +10 -0
  217. package/dist/checks/documentation/_directives/typescript.d.ts.map +1 -0
  218. package/dist/checks/documentation/_directives/typescript.js +54 -0
  219. package/dist/checks/documentation/_directives/typescript.js.map +1 -0
  220. package/dist/checks/documentation/_public-api-graph.d.ts +30 -0
  221. package/dist/checks/documentation/_public-api-graph.d.ts.map +1 -0
  222. package/dist/checks/documentation/_public-api-graph.js +304 -0
  223. package/dist/checks/documentation/_public-api-graph.js.map +1 -0
  224. package/dist/checks/documentation/directive-audit.d.ts +26 -0
  225. package/dist/checks/documentation/directive-audit.d.ts.map +1 -0
  226. package/dist/checks/documentation/directive-audit.js +144 -0
  227. package/dist/checks/documentation/directive-audit.js.map +1 -0
  228. package/dist/checks/documentation/index.d.ts +3 -0
  229. package/dist/checks/documentation/index.d.ts.map +1 -0
  230. package/dist/checks/documentation/index.js +3 -0
  231. package/dist/checks/documentation/index.js.map +1 -0
  232. package/dist/checks/documentation/public-api-jsdoc.d.ts +10 -0
  233. package/dist/checks/documentation/public-api-jsdoc.d.ts.map +1 -0
  234. package/dist/checks/documentation/public-api-jsdoc.js +131 -0
  235. package/dist/checks/documentation/public-api-jsdoc.js.map +1 -0
  236. package/dist/checks/file-length-limit.d.ts +16 -0
  237. package/dist/checks/file-length-limit.d.ts.map +1 -0
  238. package/dist/checks/file-length-limit.js +47 -0
  239. package/dist/checks/file-length-limit.js.map +1 -0
  240. package/dist/checks/index.d.ts +16 -0
  241. package/dist/checks/index.d.ts.map +1 -0
  242. package/dist/checks/index.js +16 -0
  243. package/dist/checks/index.js.map +1 -0
  244. package/dist/checks/no-todo-comments.d.ts +18 -0
  245. package/dist/checks/no-todo-comments.d.ts.map +1 -0
  246. package/dist/checks/no-todo-comments.js +79 -0
  247. package/dist/checks/no-todo-comments.js.map +1 -0
  248. package/dist/checks/no-unimplemented-markers.d.ts +24 -0
  249. package/dist/checks/no-unimplemented-markers.d.ts.map +1 -0
  250. package/dist/checks/no-unimplemented-markers.js +198 -0
  251. package/dist/checks/no-unimplemented-markers.js.map +1 -0
  252. package/dist/checks/quality/api/graphql-offset-pagination.d.ts +9 -0
  253. package/dist/checks/quality/api/graphql-offset-pagination.d.ts.map +1 -0
  254. package/dist/checks/quality/api/graphql-offset-pagination.js +63 -0
  255. package/dist/checks/quality/api/graphql-offset-pagination.js.map +1 -0
  256. package/dist/checks/quality/api/index.d.ts +3 -0
  257. package/dist/checks/quality/api/index.d.ts.map +1 -0
  258. package/dist/checks/quality/api/index.js +3 -0
  259. package/dist/checks/quality/api/index.js.map +1 -0
  260. package/dist/checks/quality/api/zod-openapi-sync.d.ts +13 -0
  261. package/dist/checks/quality/api/zod-openapi-sync.d.ts.map +1 -0
  262. package/dist/checks/quality/api/zod-openapi-sync.js +88 -0
  263. package/dist/checks/quality/api/zod-openapi-sync.js.map +1 -0
  264. package/dist/checks/quality/code-structure/dead-code.d.ts +12 -0
  265. package/dist/checks/quality/code-structure/dead-code.d.ts.map +1 -0
  266. package/dist/checks/quality/code-structure/dead-code.js +238 -0
  267. package/dist/checks/quality/code-structure/dead-code.js.map +1 -0
  268. package/dist/checks/quality/code-structure/index.d.ts +5 -0
  269. package/dist/checks/quality/code-structure/index.d.ts.map +1 -0
  270. package/dist/checks/quality/code-structure/index.js +5 -0
  271. package/dist/checks/quality/code-structure/index.js.map +1 -0
  272. package/dist/checks/quality/code-structure/no-ai-attribution.d.ts +25 -0
  273. package/dist/checks/quality/code-structure/no-ai-attribution.d.ts.map +1 -0
  274. package/dist/checks/quality/code-structure/no-ai-attribution.js +76 -0
  275. package/dist/checks/quality/code-structure/no-ai-attribution.js.map +1 -0
  276. package/dist/checks/quality/code-structure/no-console-log.d.ts +17 -0
  277. package/dist/checks/quality/code-structure/no-console-log.d.ts.map +1 -0
  278. package/dist/checks/quality/code-structure/no-console-log.js +106 -0
  279. package/dist/checks/quality/code-structure/no-console-log.js.map +1 -0
  280. package/dist/checks/quality/code-structure/no-process-artifacts.d.ts +25 -0
  281. package/dist/checks/quality/code-structure/no-process-artifacts.d.ts.map +1 -0
  282. package/dist/checks/quality/code-structure/no-process-artifacts.js +104 -0
  283. package/dist/checks/quality/code-structure/no-process-artifacts.js.map +1 -0
  284. package/dist/checks/quality/dependency-version-consistency.d.ts +20 -0
  285. package/dist/checks/quality/dependency-version-consistency.d.ts.map +1 -0
  286. package/dist/checks/quality/dependency-version-consistency.js +266 -0
  287. package/dist/checks/quality/dependency-version-consistency.js.map +1 -0
  288. package/dist/checks/quality/fitness-ignore-hygiene.d.ts +10 -0
  289. package/dist/checks/quality/fitness-ignore-hygiene.d.ts.map +1 -0
  290. package/dist/checks/quality/fitness-ignore-hygiene.js +93 -0
  291. package/dist/checks/quality/fitness-ignore-hygiene.js.map +1 -0
  292. package/dist/checks/quality/frontend/expo-vector-icons.d.ts +13 -0
  293. package/dist/checks/quality/frontend/expo-vector-icons.d.ts.map +1 -0
  294. package/dist/checks/quality/frontend/expo-vector-icons.js +80 -0
  295. package/dist/checks/quality/frontend/expo-vector-icons.js.map +1 -0
  296. package/dist/checks/quality/frontend/image-optimization.d.ts +13 -0
  297. package/dist/checks/quality/frontend/image-optimization.d.ts.map +1 -0
  298. package/dist/checks/quality/frontend/image-optimization.js +166 -0
  299. package/dist/checks/quality/frontend/image-optimization.js.map +1 -0
  300. package/dist/checks/quality/frontend/index.d.ts +4 -0
  301. package/dist/checks/quality/frontend/index.d.ts.map +1 -0
  302. package/dist/checks/quality/frontend/index.js +4 -0
  303. package/dist/checks/quality/frontend/index.js.map +1 -0
  304. package/dist/checks/quality/frontend/navigation-typing.d.ts +12 -0
  305. package/dist/checks/quality/frontend/navigation-typing.d.ts.map +1 -0
  306. package/dist/checks/quality/frontend/navigation-typing.js +77 -0
  307. package/dist/checks/quality/frontend/navigation-typing.js.map +1 -0
  308. package/dist/checks/quality/graph-ignore-hygiene.d.ts +10 -0
  309. package/dist/checks/quality/graph-ignore-hygiene.d.ts.map +1 -0
  310. package/dist/checks/quality/graph-ignore-hygiene.js +95 -0
  311. package/dist/checks/quality/graph-ignore-hygiene.js.map +1 -0
  312. package/dist/checks/quality/graph-ignore-hygiene.test.d.ts +14 -0
  313. package/dist/checks/quality/graph-ignore-hygiene.test.d.ts.map +1 -0
  314. package/dist/checks/quality/graph-ignore-hygiene.test.js +58 -0
  315. package/dist/checks/quality/graph-ignore-hygiene.test.js.map +1 -0
  316. package/dist/checks/quality/index.d.ts +16 -0
  317. package/dist/checks/quality/index.d.ts.map +1 -0
  318. package/dist/checks/quality/index.js +16 -0
  319. package/dist/checks/quality/index.js.map +1 -0
  320. package/dist/checks/quality/linting/eslint-justifications.d.ts +12 -0
  321. package/dist/checks/quality/linting/eslint-justifications.d.ts.map +1 -0
  322. package/dist/checks/quality/linting/eslint-justifications.js +328 -0
  323. package/dist/checks/quality/linting/eslint-justifications.js.map +1 -0
  324. package/dist/checks/quality/linting/index.d.ts +4 -0
  325. package/dist/checks/quality/linting/index.d.ts.map +1 -0
  326. package/dist/checks/quality/linting/index.js +4 -0
  327. package/dist/checks/quality/linting/index.js.map +1 -0
  328. package/dist/checks/quality/linting/semgrep-justifications.d.ts +16 -0
  329. package/dist/checks/quality/linting/semgrep-justifications.d.ts.map +1 -0
  330. package/dist/checks/quality/linting/semgrep-justifications.js +229 -0
  331. package/dist/checks/quality/linting/semgrep-justifications.js.map +1 -0
  332. package/dist/checks/quality/linting/typescript-directive-hygiene.d.ts +12 -0
  333. package/dist/checks/quality/linting/typescript-directive-hygiene.d.ts.map +1 -0
  334. package/dist/checks/quality/linting/typescript-directive-hygiene.js +142 -0
  335. package/dist/checks/quality/linting/typescript-directive-hygiene.js.map +1 -0
  336. package/dist/checks/quality/no-compatibility-layer-names.d.ts +13 -0
  337. package/dist/checks/quality/no-compatibility-layer-names.d.ts.map +1 -0
  338. package/dist/checks/quality/no-compatibility-layer-names.js +100 -0
  339. package/dist/checks/quality/no-compatibility-layer-names.js.map +1 -0
  340. package/dist/checks/quality/no-deprecated-tags.d.ts +11 -0
  341. package/dist/checks/quality/no-deprecated-tags.d.ts.map +1 -0
  342. package/dist/checks/quality/no-deprecated-tags.js +76 -0
  343. package/dist/checks/quality/no-deprecated-tags.js.map +1 -0
  344. package/dist/checks/quality/no-markdown-references.d.ts +16 -0
  345. package/dist/checks/quality/no-markdown-references.d.ts.map +1 -0
  346. package/dist/checks/quality/no-markdown-references.js +145 -0
  347. package/dist/checks/quality/no-markdown-references.js.map +1 -0
  348. package/dist/checks/quality/no-raw-regex-on-code.d.ts +9 -0
  349. package/dist/checks/quality/no-raw-regex-on-code.d.ts.map +1 -0
  350. package/dist/checks/quality/no-raw-regex-on-code.js +61 -0
  351. package/dist/checks/quality/no-raw-regex-on-code.js.map +1 -0
  352. package/dist/checks/quality/no-temporary-workarounds.d.ts +11 -0
  353. package/dist/checks/quality/no-temporary-workarounds.d.ts.map +1 -0
  354. package/dist/checks/quality/no-temporary-workarounds.js +69 -0
  355. package/dist/checks/quality/no-temporary-workarounds.js.map +1 -0
  356. package/dist/checks/quality/no-window-alert.d.ts +19 -0
  357. package/dist/checks/quality/no-window-alert.d.ts.map +1 -0
  358. package/dist/checks/quality/no-window-alert.js +74 -0
  359. package/dist/checks/quality/no-window-alert.js.map +1 -0
  360. package/dist/checks/quality/observability/index.d.ts +2 -0
  361. package/dist/checks/quality/observability/index.d.ts.map +1 -0
  362. package/dist/checks/quality/observability/index.js +2 -0
  363. package/dist/checks/quality/observability/index.js.map +1 -0
  364. package/dist/checks/quality/observability/pino-serializer-coverage.d.ts +15 -0
  365. package/dist/checks/quality/observability/pino-serializer-coverage.d.ts.map +1 -0
  366. package/dist/checks/quality/observability/pino-serializer-coverage.js +209 -0
  367. package/dist/checks/quality/observability/pino-serializer-coverage.js.map +1 -0
  368. package/dist/checks/quality/patterns/async-state-pattern.d.ts +14 -0
  369. package/dist/checks/quality/patterns/async-state-pattern.d.ts.map +1 -0
  370. package/dist/checks/quality/patterns/async-state-pattern.js +80 -0
  371. package/dist/checks/quality/patterns/async-state-pattern.js.map +1 -0
  372. package/dist/checks/quality/patterns/index.d.ts +4 -0
  373. package/dist/checks/quality/patterns/index.d.ts.map +1 -0
  374. package/dist/checks/quality/patterns/index.js +4 -0
  375. package/dist/checks/quality/patterns/index.js.map +1 -0
  376. package/dist/checks/quality/patterns/no-non-null-assertions.d.ts +10 -0
  377. package/dist/checks/quality/patterns/no-non-null-assertions.d.ts.map +1 -0
  378. package/dist/checks/quality/patterns/no-non-null-assertions.js +97 -0
  379. package/dist/checks/quality/patterns/no-non-null-assertions.js.map +1 -0
  380. package/dist/checks/quality/patterns/performance-anti-patterns.d.ts +16 -0
  381. package/dist/checks/quality/patterns/performance-anti-patterns.d.ts.map +1 -0
  382. package/dist/checks/quality/patterns/performance-anti-patterns.js +239 -0
  383. package/dist/checks/quality/patterns/performance-anti-patterns.js.map +1 -0
  384. package/dist/checks/resilience/_helpers/config-validation.d.ts +27 -0
  385. package/dist/checks/resilience/_helpers/config-validation.d.ts.map +1 -0
  386. package/dist/checks/resilience/_helpers/config-validation.js +61 -0
  387. package/dist/checks/resilience/_helpers/config-validation.js.map +1 -0
  388. package/dist/checks/resilience/batch-operations.d.ts +22 -0
  389. package/dist/checks/resilience/batch-operations.d.ts.map +1 -0
  390. package/dist/checks/resilience/batch-operations.js +422 -0
  391. package/dist/checks/resilience/batch-operations.js.map +1 -0
  392. package/dist/checks/resilience/cache-ttl-validation.d.ts +13 -0
  393. package/dist/checks/resilience/cache-ttl-validation.d.ts.map +1 -0
  394. package/dist/checks/resilience/cache-ttl-validation.js +222 -0
  395. package/dist/checks/resilience/cache-ttl-validation.js.map +1 -0
  396. package/dist/checks/resilience/catch-clause-safety.d.ts +12 -0
  397. package/dist/checks/resilience/catch-clause-safety.d.ts.map +1 -0
  398. package/dist/checks/resilience/catch-clause-safety.js +110 -0
  399. package/dist/checks/resilience/catch-clause-safety.js.map +1 -0
  400. package/dist/checks/resilience/dangerous-config-defaults.d.ts +11 -0
  401. package/dist/checks/resilience/dangerous-config-defaults.d.ts.map +1 -0
  402. package/dist/checks/resilience/dangerous-config-defaults.js +304 -0
  403. package/dist/checks/resilience/dangerous-config-defaults.js.map +1 -0
  404. package/dist/checks/resilience/error-code-registration.d.ts +11 -0
  405. package/dist/checks/resilience/error-code-registration.d.ts.map +1 -0
  406. package/dist/checks/resilience/error-code-registration.js +88 -0
  407. package/dist/checks/resilience/error-code-registration.js.map +1 -0
  408. package/dist/checks/resilience/event-patterns.d.ts +21 -0
  409. package/dist/checks/resilience/event-patterns.d.ts.map +1 -0
  410. package/dist/checks/resilience/event-patterns.js +232 -0
  411. package/dist/checks/resilience/event-patterns.js.map +1 -0
  412. package/dist/checks/resilience/exit-code-correctness.d.ts +12 -0
  413. package/dist/checks/resilience/exit-code-correctness.d.ts.map +1 -0
  414. package/dist/checks/resilience/exit-code-correctness.js +107 -0
  415. package/dist/checks/resilience/exit-code-correctness.js.map +1 -0
  416. package/dist/checks/resilience/index.d.ts +18 -0
  417. package/dist/checks/resilience/index.d.ts.map +1 -0
  418. package/dist/checks/resilience/index.js +18 -0
  419. package/dist/checks/resilience/index.js.map +1 -0
  420. package/dist/checks/resilience/no-hardcoded-timeouts.d.ts +10 -0
  421. package/dist/checks/resilience/no-hardcoded-timeouts.d.ts.map +1 -0
  422. package/dist/checks/resilience/no-hardcoded-timeouts.js +291 -0
  423. package/dist/checks/resilience/no-hardcoded-timeouts.js.map +1 -0
  424. package/dist/checks/resilience/no-process-exit-in-finally.d.ts +11 -0
  425. package/dist/checks/resilience/no-process-exit-in-finally.d.ts.map +1 -0
  426. package/dist/checks/resilience/no-process-exit-in-finally.js +89 -0
  427. package/dist/checks/resilience/no-process-exit-in-finally.js.map +1 -0
  428. package/dist/checks/resilience/readline-cleanup.d.ts +11 -0
  429. package/dist/checks/resilience/readline-cleanup.d.ts.map +1 -0
  430. package/dist/checks/resilience/readline-cleanup.js +107 -0
  431. package/dist/checks/resilience/readline-cleanup.js.map +1 -0
  432. package/dist/checks/resilience/recovery-patterns.d.ts +25 -0
  433. package/dist/checks/resilience/recovery-patterns.d.ts.map +1 -0
  434. package/dist/checks/resilience/recovery-patterns.js +273 -0
  435. package/dist/checks/resilience/recovery-patterns.js.map +1 -0
  436. package/dist/checks/resilience/reentrancy-guard.d.ts +12 -0
  437. package/dist/checks/resilience/reentrancy-guard.d.ts.map +1 -0
  438. package/dist/checks/resilience/reentrancy-guard.js +86 -0
  439. package/dist/checks/resilience/reentrancy-guard.js.map +1 -0
  440. package/dist/checks/resilience/retry-config-validation.d.ts +13 -0
  441. package/dist/checks/resilience/retry-config-validation.d.ts.map +1 -0
  442. package/dist/checks/resilience/retry-config-validation.js +159 -0
  443. package/dist/checks/resilience/retry-config-validation.js.map +1 -0
  444. package/dist/checks/resilience/sentry/_helpers/sentry.d.ts +25 -0
  445. package/dist/checks/resilience/sentry/_helpers/sentry.d.ts.map +1 -0
  446. package/dist/checks/resilience/sentry/_helpers/sentry.js +68 -0
  447. package/dist/checks/resilience/sentry/_helpers/sentry.js.map +1 -0
  448. package/dist/checks/resilience/sentry/index.d.ts +8 -0
  449. package/dist/checks/resilience/sentry/index.d.ts.map +1 -0
  450. package/dist/checks/resilience/sentry/index.js +8 -0
  451. package/dist/checks/resilience/sentry/index.js.map +1 -0
  452. package/dist/checks/resilience/sentry/sentry-dsn-configured.d.ts +12 -0
  453. package/dist/checks/resilience/sentry/sentry-dsn-configured.d.ts.map +1 -0
  454. package/dist/checks/resilience/sentry/sentry-dsn-configured.js +55 -0
  455. package/dist/checks/resilience/sentry/sentry-dsn-configured.js.map +1 -0
  456. package/dist/checks/resilience/sentry/sentry-environment-set.d.ts +12 -0
  457. package/dist/checks/resilience/sentry/sentry-environment-set.d.ts.map +1 -0
  458. package/dist/checks/resilience/sentry/sentry-environment-set.js +51 -0
  459. package/dist/checks/resilience/sentry/sentry-environment-set.js.map +1 -0
  460. package/dist/checks/resilience/sentry/sentry-error-boundary.d.ts +12 -0
  461. package/dist/checks/resilience/sentry/sentry-error-boundary.d.ts.map +1 -0
  462. package/dist/checks/resilience/sentry/sentry-error-boundary.js +75 -0
  463. package/dist/checks/resilience/sentry/sentry-error-boundary.js.map +1 -0
  464. package/dist/checks/resilience/sentry/sentry-pii-scrubbing.d.ts +13 -0
  465. package/dist/checks/resilience/sentry/sentry-pii-scrubbing.d.ts.map +1 -0
  466. package/dist/checks/resilience/sentry/sentry-pii-scrubbing.js +125 -0
  467. package/dist/checks/resilience/sentry/sentry-pii-scrubbing.js.map +1 -0
  468. package/dist/checks/resilience/sentry/sentry-release-set.d.ts +12 -0
  469. package/dist/checks/resilience/sentry/sentry-release-set.d.ts.map +1 -0
  470. package/dist/checks/resilience/sentry/sentry-release-set.js +51 -0
  471. package/dist/checks/resilience/sentry/sentry-release-set.js.map +1 -0
  472. package/dist/checks/resilience/sentry/sentry-sample-rate.d.ts +12 -0
  473. package/dist/checks/resilience/sentry/sentry-sample-rate.d.ts.map +1 -0
  474. package/dist/checks/resilience/sentry/sentry-sample-rate.js +78 -0
  475. package/dist/checks/resilience/sentry/sentry-sample-rate.js.map +1 -0
  476. package/dist/checks/resilience/sentry/sentry-source-maps.d.ts +12 -0
  477. package/dist/checks/resilience/sentry/sentry-source-maps.d.ts.map +1 -0
  478. package/dist/checks/resilience/sentry/sentry-source-maps.js +83 -0
  479. package/dist/checks/resilience/sentry/sentry-source-maps.js.map +1 -0
  480. package/dist/checks/resilience/service-patterns.d.ts +18 -0
  481. package/dist/checks/resilience/service-patterns.d.ts.map +1 -0
  482. package/dist/checks/resilience/service-patterns.js +230 -0
  483. package/dist/checks/resilience/service-patterns.js.map +1 -0
  484. package/dist/checks/resilience/timer-lifecycle.d.ts +10 -0
  485. package/dist/checks/resilience/timer-lifecycle.d.ts.map +1 -0
  486. package/dist/checks/resilience/timer-lifecycle.js +78 -0
  487. package/dist/checks/resilience/timer-lifecycle.js.map +1 -0
  488. package/dist/checks/resilience/transaction-patterns.d.ts +21 -0
  489. package/dist/checks/resilience/transaction-patterns.d.ts.map +1 -0
  490. package/dist/checks/resilience/transaction-patterns.js +258 -0
  491. package/dist/checks/resilience/transaction-patterns.js.map +1 -0
  492. package/dist/checks/security/__tests__/no-hardcoded-secrets.test.d.ts +9 -0
  493. package/dist/checks/security/__tests__/no-hardcoded-secrets.test.d.ts.map +1 -0
  494. package/dist/checks/security/__tests__/no-hardcoded-secrets.test.js +37 -0
  495. package/dist/checks/security/__tests__/no-hardcoded-secrets.test.js.map +1 -0
  496. package/dist/checks/security/__tests__/package-supply-chain-policy.test.d.ts +2 -0
  497. package/dist/checks/security/__tests__/package-supply-chain-policy.test.d.ts.map +1 -0
  498. package/dist/checks/security/__tests__/package-supply-chain-policy.test.js +128 -0
  499. package/dist/checks/security/__tests__/package-supply-chain-policy.test.js.map +1 -0
  500. package/dist/checks/security/api-key-rotation.d.ts +10 -0
  501. package/dist/checks/security/api-key-rotation.d.ts.map +1 -0
  502. package/dist/checks/security/api-key-rotation.js +186 -0
  503. package/dist/checks/security/api-key-rotation.js.map +1 -0
  504. package/dist/checks/security/auth-middleware-coverage.d.ts +11 -0
  505. package/dist/checks/security/auth-middleware-coverage.d.ts.map +1 -0
  506. package/dist/checks/security/auth-middleware-coverage.js +210 -0
  507. package/dist/checks/security/auth-middleware-coverage.js.map +1 -0
  508. package/dist/checks/security/auth-route-guard.d.ts +12 -0
  509. package/dist/checks/security/auth-route-guard.d.ts.map +1 -0
  510. package/dist/checks/security/auth-route-guard.js +70 -0
  511. package/dist/checks/security/auth-route-guard.js.map +1 -0
  512. package/dist/checks/security/cors-configuration.d.ts +11 -0
  513. package/dist/checks/security/cors-configuration.d.ts.map +1 -0
  514. package/dist/checks/security/cors-configuration.js +126 -0
  515. package/dist/checks/security/cors-configuration.js.map +1 -0
  516. package/dist/checks/security/csp-headers.d.ts +11 -0
  517. package/dist/checks/security/csp-headers.d.ts.map +1 -0
  518. package/dist/checks/security/csp-headers.js +192 -0
  519. package/dist/checks/security/csp-headers.js.map +1 -0
  520. package/dist/checks/security/dependency-vulnerability-audit.d.ts +15 -0
  521. package/dist/checks/security/dependency-vulnerability-audit.d.ts.map +1 -0
  522. package/dist/checks/security/dependency-vulnerability-audit.js +184 -0
  523. package/dist/checks/security/dependency-vulnerability-audit.js.map +1 -0
  524. package/dist/checks/security/env-secret-exposure.d.ts +11 -0
  525. package/dist/checks/security/env-secret-exposure.d.ts.map +1 -0
  526. package/dist/checks/security/env-secret-exposure.js +127 -0
  527. package/dist/checks/security/env-secret-exposure.js.map +1 -0
  528. package/dist/checks/security/hasura-production-config.d.ts +11 -0
  529. package/dist/checks/security/hasura-production-config.d.ts.map +1 -0
  530. package/dist/checks/security/hasura-production-config.js +122 -0
  531. package/dist/checks/security/hasura-production-config.js.map +1 -0
  532. package/dist/checks/security/index.d.ts +17 -0
  533. package/dist/checks/security/index.d.ts.map +1 -0
  534. package/dist/checks/security/index.js +17 -0
  535. package/dist/checks/security/index.js.map +1 -0
  536. package/dist/checks/security/jwt-validation.d.ts +11 -0
  537. package/dist/checks/security/jwt-validation.d.ts.map +1 -0
  538. package/dist/checks/security/jwt-validation.js +294 -0
  539. package/dist/checks/security/jwt-validation.js.map +1 -0
  540. package/dist/checks/security/no-eval.d.ts +16 -0
  541. package/dist/checks/security/no-eval.d.ts.map +1 -0
  542. package/dist/checks/security/no-eval.js +83 -0
  543. package/dist/checks/security/no-eval.js.map +1 -0
  544. package/dist/checks/security/no-hardcoded-secrets.d.ts +28 -0
  545. package/dist/checks/security/no-hardcoded-secrets.d.ts.map +1 -0
  546. package/dist/checks/security/no-hardcoded-secrets.js +209 -0
  547. package/dist/checks/security/no-hardcoded-secrets.js.map +1 -0
  548. package/dist/checks/security/package-supply-chain-policy.d.ts +12 -0
  549. package/dist/checks/security/package-supply-chain-policy.d.ts.map +1 -0
  550. package/dist/checks/security/package-supply-chain-policy.js +534 -0
  551. package/dist/checks/security/package-supply-chain-policy.js.map +1 -0
  552. package/dist/checks/security/rate-limit-coverage.d.ts +10 -0
  553. package/dist/checks/security/rate-limit-coverage.d.ts.map +1 -0
  554. package/dist/checks/security/rate-limit-coverage.js +143 -0
  555. package/dist/checks/security/rate-limit-coverage.js.map +1 -0
  556. package/dist/checks/security/semgrep-scan.d.ts +13 -0
  557. package/dist/checks/security/semgrep-scan.d.ts.map +1 -0
  558. package/dist/checks/security/semgrep-scan.js +86 -0
  559. package/dist/checks/security/semgrep-scan.js.map +1 -0
  560. package/dist/checks/security/use-centralized-crypto.d.ts +11 -0
  561. package/dist/checks/security/use-centralized-crypto.d.ts.map +1 -0
  562. package/dist/checks/security/use-centralized-crypto.js +129 -0
  563. package/dist/checks/security/use-centralized-crypto.js.map +1 -0
  564. package/dist/checks/security/webhook-signature-verification.d.ts +10 -0
  565. package/dist/checks/security/webhook-signature-verification.d.ts.map +1 -0
  566. package/dist/checks/security/webhook-signature-verification.js +183 -0
  567. package/dist/checks/security/webhook-signature-verification.js.map +1 -0
  568. package/dist/checks/testing/index.d.ts +6 -0
  569. package/dist/checks/testing/index.d.ts.map +1 -0
  570. package/dist/checks/testing/index.js +6 -0
  571. package/dist/checks/testing/index.js.map +1 -0
  572. package/dist/checks/testing/no-skipped-tests.d.ts +40 -0
  573. package/dist/checks/testing/no-skipped-tests.d.ts.map +1 -0
  574. package/dist/checks/testing/no-skipped-tests.js +174 -0
  575. package/dist/checks/testing/no-skipped-tests.js.map +1 -0
  576. package/dist/checks/testing/no-stub-tests.d.ts +11 -0
  577. package/dist/checks/testing/no-stub-tests.d.ts.map +1 -0
  578. package/dist/checks/testing/no-stub-tests.js +103 -0
  579. package/dist/checks/testing/no-stub-tests.js.map +1 -0
  580. package/dist/checks/testing/test-convention-consistency.d.ts +14 -0
  581. package/dist/checks/testing/test-convention-consistency.d.ts.map +1 -0
  582. package/dist/checks/testing/test-convention-consistency.js +93 -0
  583. package/dist/checks/testing/test-convention-consistency.js.map +1 -0
  584. package/dist/checks/testing/test-file-naming.d.ts +13 -0
  585. package/dist/checks/testing/test-file-naming.d.ts.map +1 -0
  586. package/dist/checks/testing/test-file-naming.js +218 -0
  587. package/dist/checks/testing/test-file-naming.js.map +1 -0
  588. package/dist/checks/testing/test-file-pairing.d.ts +13 -0
  589. package/dist/checks/testing/test-file-pairing.d.ts.map +1 -0
  590. package/dist/checks/testing/test-file-pairing.js +274 -0
  591. package/dist/checks/testing/test-file-pairing.js.map +1 -0
  592. package/dist/display/architecture.d.ts +9 -0
  593. package/dist/display/architecture.d.ts.map +1 -0
  594. package/dist/display/architecture.js +29 -0
  595. package/dist/display/architecture.js.map +1 -0
  596. package/dist/display/index.d.ts +20 -0
  597. package/dist/display/index.d.ts.map +1 -0
  598. package/dist/display/index.js +30 -0
  599. package/dist/display/index.js.map +1 -0
  600. package/dist/display/quality.d.ts +7 -0
  601. package/dist/display/quality.d.ts.map +1 -0
  602. package/dist/display/quality.js +34 -0
  603. package/dist/display/quality.js.map +1 -0
  604. package/dist/display/resilience.d.ts +7 -0
  605. package/dist/display/resilience.d.ts.map +1 -0
  606. package/dist/display/resilience.js +36 -0
  607. package/dist/display/resilience.js.map +1 -0
  608. package/dist/display/security-testing.d.ts +9 -0
  609. package/dist/display/security-testing.d.ts.map +1 -0
  610. package/dist/display/security-testing.js +31 -0
  611. package/dist/display/security-testing.js.map +1 -0
  612. package/dist/display/types.d.ts +6 -0
  613. package/dist/display/types.d.ts.map +1 -0
  614. package/dist/display/types.js +6 -0
  615. package/dist/display/types.js.map +1 -0
  616. package/dist/index.d.ts +19 -0
  617. package/dist/index.d.ts.map +1 -0
  618. package/dist/index.js +21 -0
  619. package/dist/index.js.map +1 -0
  620. package/package.json +52 -0
@@ -0,0 +1,218 @@
1
+ /**
2
+ * @fileoverview Validates test file naming conventions
3
+ *
4
+ * Test files should follow the pattern *.test.ts or *.spec.ts
5
+ * and be located in __tests__ directories.
6
+ */
7
+ // @fitness-ignore-file fitness-check-standards -- Uses fs for directory listing/stat operations, not file content reading
8
+ import * as fs from 'node:fs';
9
+ import * as path from 'node:path';
10
+ import { logger } from '@opensip-cli/core';
11
+ import { defineCheck } from '@opensip-cli/fitness';
12
+ /**
13
+ * Valid test file patterns
14
+ */
15
+ const VALID_TEST_PATTERNS = [
16
+ /\.test\.[jt]sx?$/,
17
+ /\.spec\.[jt]sx?$/,
18
+ /\.bench\.[jt]sx?$/, // Benchmark files
19
+ /\.contract\.[jt]sx?$/, // Contract test files
20
+ ];
21
+ /**
22
+ * Files/patterns to ignore (test utilities, helpers, setup files)
23
+ */
24
+ const IGNORED_PATTERNS = [
25
+ /^_/, // Underscore-prefixed files are private helpers/runners by convention
26
+ /^setup\.[jt]sx?$/, // Test setup files
27
+ /^test-setup\.[jt]sx?$/, // Test setup files
28
+ /-test-setup\.[jt]sx?$/, // Test setup files with module prefix (e.g. git-worktree-test-setup.ts)
29
+ /^test-context\.[jt]sx?$/, // Test context files
30
+ /\.setup\.[jt]sx?$/, // Setup files with prefix
31
+ /^mock[-_]/, // Mock files
32
+ /^_mocks?\.[jt]sx?$/, // Underscore-prefix mock files (e.g. _mocks.ts)
33
+ /-mock\.[jt]sx?$/, // Mock files with suffix
34
+ /-mocks\.[jt]sx?$/, // Mock files with plural suffix
35
+ /[-_]helpers?\.[jt]sx?$/, // Helper files
36
+ /\.test\.helpers?\.[jt]sx?$/, // Test-only helper files (e.g. service.test.helpers.ts)
37
+ /[-_.]fixtures?\.[jt]sx?$/, // Fixture files (foo-fixtures.ts, catalog.fixture.ts, โ€ฆ)
38
+ /[-_.]allowlist\.[jt]sx?$/, // Allowlist data modules (test config/data, not test cases)
39
+ /[-_]utils?\.[jt]sx?$/, // Utility files
40
+ /^services\.[jt]sx?$/, // Service mocks
41
+ /^index\.[jt]sx?$/, // Index files (re-exports)
42
+ ];
43
+ /**
44
+ * Directories to skip (build artifacts, etc.)
45
+ *
46
+ * `fixtures` / `__fixtures__` and `test-utils` are subdirectories used to
47
+ * host test inputs and per-package scope helpers โ€” their files don't follow
48
+ * `.test.ts` naming because they're not test files in the Vitest-discovery
49
+ * sense.
50
+ */
51
+ const SKIP_DIRECTORIES = new Set([
52
+ 'node_modules',
53
+ 'dist',
54
+ 'build',
55
+ 'coverage',
56
+ '.turbo',
57
+ 'fixtures',
58
+ '__fixtures__',
59
+ 'test-utils',
60
+ ]);
61
+ /**
62
+ * Directories to scan for tests
63
+ */
64
+ const SCAN_DIRECTORIES = ['packages', 'services', 'apps', 'tools'];
65
+ function isPotentialTestFile(entry) {
66
+ logger.debug({
67
+ evt: 'fitness.checks.test_file_naming.is_potential_test_file',
68
+ msg: 'Checking if entry is a potential test file',
69
+ });
70
+ const isTypeScriptFile = entry.endsWith('.ts') || entry.endsWith('.tsx');
71
+ const isJavaScriptFile = entry.endsWith('.js') || entry.endsWith('.jsx');
72
+ const isDeclarationFile = entry.endsWith('.d.ts');
73
+ return (isTypeScriptFile || isJavaScriptFile) && !isDeclarationFile;
74
+ }
75
+ /**
76
+ * Recursively check __tests__ directory for naming violations
77
+ */
78
+ function checkTestsDirectory(testsDir, cwd) {
79
+ logger.debug({
80
+ evt: 'fitness.checks.test_file_naming.check_tests_directory',
81
+ msg: 'Checking __tests__ directory for naming violations',
82
+ });
83
+ const violations = [];
84
+ try {
85
+ const entries = fs.readdirSync(testsDir);
86
+ for (const entry of entries) {
87
+ const fullPath = path.join(testsDir, entry);
88
+ const stat = fs.statSync(fullPath);
89
+ if (stat.isFile() && isPotentialTestFile(entry)) {
90
+ // Skip files matching ignored patterns (helpers, setup, mocks, etc.)
91
+ const isIgnoredFile = IGNORED_PATTERNS.some((pattern) => pattern.test(entry));
92
+ if (isIgnoredFile)
93
+ continue;
94
+ // Check if file follows valid test pattern
95
+ const isValidTestFile = VALID_TEST_PATTERNS.some((pattern) => pattern.test(entry));
96
+ if (!isValidTestFile) {
97
+ const baseName = entry.replace(/\.[jt]sx?$/, '');
98
+ violations.push({
99
+ line: 1,
100
+ message: `Test file "${entry}" should end with .test.ts or .spec.ts`,
101
+ severity: 'warning',
102
+ type: 'wrong-naming',
103
+ suggestion: `Rename the file: mv ${entry} ${baseName}.test.ts (or ${baseName}.spec.ts)`,
104
+ match: entry,
105
+ filePath: fullPath,
106
+ });
107
+ }
108
+ }
109
+ else if (stat.isDirectory()) {
110
+ // Skip build artifact directories
111
+ if (SKIP_DIRECTORIES.has(entry))
112
+ continue;
113
+ // Recurse into subdirectories (like unit/, integration/, fixtures/, helpers/)
114
+ const subViolations = checkTestsDirectory(fullPath, cwd);
115
+ violations.push(...subViolations);
116
+ }
117
+ }
118
+ }
119
+ catch {
120
+ // @swallow-ok Ignore read errors
121
+ }
122
+ return violations;
123
+ }
124
+ /**
125
+ * Recursively scan directory for __tests__ folders
126
+ */
127
+ function scanDirectory(dirPath, cwd) {
128
+ logger.debug({
129
+ evt: 'fitness.checks.test_file_naming.scan_directory',
130
+ msg: 'Scanning directory for __tests__ folders',
131
+ });
132
+ const violations = [];
133
+ try {
134
+ const entries = fs.readdirSync(dirPath);
135
+ for (const entry of entries) {
136
+ // Skip ignored directories (node_modules, dist, build, etc.)
137
+ if (SKIP_DIRECTORIES.has(entry) || entry.startsWith('.'))
138
+ continue;
139
+ const fullPath = path.join(dirPath, entry);
140
+ const stat = fs.statSync(fullPath);
141
+ if (!stat.isDirectory())
142
+ continue;
143
+ if (entry === '__tests__') {
144
+ // Found a __tests__ directory, check all files
145
+ const testViolations = checkTestsDirectory(fullPath, cwd);
146
+ violations.push(...testViolations);
147
+ }
148
+ else {
149
+ // Recurse into subdirectory
150
+ const subViolations = scanDirectory(fullPath, cwd);
151
+ violations.push(...subViolations);
152
+ }
153
+ }
154
+ }
155
+ catch {
156
+ // @swallow-ok Ignore read errors
157
+ }
158
+ return violations;
159
+ }
160
+ /**
161
+ * Analyze all files for test naming violations
162
+ */
163
+ // @fitness-ignore-next-line concurrency-safety -- async keyword required by analyzeAll interface contract; synchronous analysis implementation
164
+ // eslint-disable-next-line @typescript-eslint/require-await -- AnalyzeAllCheckConfig requires Promise<CheckViolation[]>; this implementation is synchronous
165
+ async function analyzeAll(files) {
166
+ logger.debug({
167
+ evt: 'fitness.checks.test_file_naming.analyze_all',
168
+ msg: 'Analyzing all files for test naming violations',
169
+ });
170
+ // Get the cwd from the first file path (all paths are absolute)
171
+ const firstPath = files.paths[0];
172
+ if (!firstPath) {
173
+ return [];
174
+ }
175
+ // Find the repo root by looking for packages directory
176
+ let cwd = path.dirname(firstPath);
177
+ while (cwd !== '/' && !fs.existsSync(path.join(cwd, 'packages'))) {
178
+ cwd = path.dirname(cwd);
179
+ }
180
+ const violations = [];
181
+ // Scan __tests__ directories
182
+ for (const dir of SCAN_DIRECTORIES) {
183
+ const dirPath = path.join(cwd, dir);
184
+ if (fs.existsSync(dirPath)) {
185
+ const dirViolations = scanDirectory(dirPath, cwd);
186
+ violations.push(...dirViolations);
187
+ }
188
+ }
189
+ return violations;
190
+ }
191
+ /**
192
+ * Check: testing/test-file-naming
193
+ *
194
+ * Validates test file naming conventions follow *.test.ts or *.spec.ts patterns.
195
+ */
196
+ export const testFileNaming = defineCheck({
197
+ id: '7c26c9ae-2944-46e1-a49b-817b81aba0e6',
198
+ slug: 'test-file-naming',
199
+ scope: { languages: ['typescript', 'tsx'], concerns: ['testing'] },
200
+ contentFilter: 'strip-strings',
201
+ confidence: 'medium',
202
+ description: 'Validates test file naming conventions follow *.test.ts or *.spec.ts patterns',
203
+ longDescription: `**Purpose:** Ensures all files inside \`__tests__/\` directories follow recognized test file naming conventions so test runners can discover them.
204
+
205
+ **Detects:**
206
+ - Files in \`__tests__/\` directories that don't match \`.test.[jt]sx?\`, \`.spec.[jt]sx?\`, \`.bench.[jt]sx?\`, or \`.contract.[jt]sx?\` patterns (\`wrong-naming\`)
207
+ - Ignores known non-test files: setup files (\`setup.ts\`, \`test-setup.ts\`), mock files (\`mock-*\`, \`*-mock.ts\`), helpers, fixtures, utils, service mocks, and index re-exports
208
+ - Recursively scans \`__tests__/\` directories under \`packages/\`, \`services/\`, \`apps/\`, and \`tools/\`
209
+ - Skips \`node_modules\`, \`dist\`, \`build\`, \`coverage\`, \`.turbo\`, and \`.d.ts\` files
210
+
211
+ **Why it matters:** Incorrectly named test files are invisible to test runners, silently excluding them from the test suite and reducing effective coverage.
212
+
213
+ **Scope:** General best practice. Cross-file analysis via \`analyzeAll\` scanning \`__tests__/\` directories across the workspace.`,
214
+ tags: ['testing', 'consistency'],
215
+ fileTypes: ['ts', 'tsx'],
216
+ analyzeAll,
217
+ });
218
+ //# sourceMappingURL=test-file-naming.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-file-naming.js","sourceRoot":"","sources":["../../../src/checks/testing/test-file-naming.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,0HAA0H;AAE1H,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAA0C,MAAM,sBAAsB,CAAC;AAE3F;;GAEG;AACH,MAAM,mBAAmB,GAAG;IAC1B,kBAAkB;IAClB,kBAAkB;IAClB,mBAAmB,EAAE,kBAAkB;IACvC,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC;AAEF;;GAEG;AACH,MAAM,gBAAgB,GAAG;IACvB,IAAI,EAAE,sEAAsE;IAC5E,kBAAkB,EAAE,mBAAmB;IACvC,uBAAuB,EAAE,mBAAmB;IAC5C,uBAAuB,EAAE,wEAAwE;IACjG,yBAAyB,EAAE,qBAAqB;IAChD,mBAAmB,EAAE,0BAA0B;IAC/C,WAAW,EAAE,aAAa;IAC1B,oBAAoB,EAAE,gDAA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ACH,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC;IACxC,EAAE,EAAE,sCAAsC;IAC1C,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE;IAClE,aAAa,EAAE,eAAe;IAE9B,UAAU,EAAE,QAAQ;IACpB,WAAW,EAAE,+EAA+E;IAC5F,eAAe,EAAE;;;;;;;;;;mIAUgH;IACjI,IAAI,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;IAChC,SAAS,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;IAExB,UAAU;CACX,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @fileoverview Ensures every source file in services has a corresponding test file
3
+ *
4
+ * This check validates that source files have matching test files.
5
+ * Supports @test-pending marker for files awaiting test implementation.
6
+ */
7
+ /**
8
+ * Check: testing/test-file-pairing
9
+ *
10
+ * Ensures every source file in services has a corresponding test file.
11
+ */
12
+ export declare const testFilePairing: import("@opensip-cli/fitness").Check;
13
+ //# sourceMappingURL=test-file-pairing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-file-pairing.d.ts","sourceRoot":"","sources":["../../../src/checks/testing/test-file-pairing.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA8PH;;;;GAIG;AACH,eAAO,MAAM,eAAe,sCAuB1B,CAAC"}
@@ -0,0 +1,274 @@
1
+ /**
2
+ * @fileoverview Ensures every source file in services has a corresponding test file
3
+ *
4
+ * This check validates that source files have matching test files.
5
+ * Supports @test-pending marker for files awaiting test implementation.
6
+ */
7
+ // @fitness-ignore-file fitness-check-standards -- Uses fs for directory listing/stat/existsSync operations, not file content reading
8
+ import * as fs from 'node:fs';
9
+ import * as path from 'node:path';
10
+ import { logger } from '@opensip-cli/core';
11
+ import { defineCheck } from '@opensip-cli/fitness';
12
+ /**
13
+ * Directories to skip during scanning
14
+ */
15
+ const SKIP_DIRECTORIES = new Set([
16
+ 'node_modules',
17
+ '__tests__',
18
+ 'tests',
19
+ 'types',
20
+ 'interfaces',
21
+ 'config',
22
+ 'checks', // Fitness check definition files are declarative โ€” tested via fitness-check-coverage
23
+ ]);
24
+ /**
25
+ * Check if entry should be skipped
26
+ * @param {string} entry - The directory or file entry name to check
27
+ * @returns {boolean} True if the entry should be skipped, false otherwise
28
+ */
29
+ function shouldSkipEntry(entry) {
30
+ logger.debug({
31
+ evt: 'fitness.checks.test_file_pairing.should_skip_entry',
32
+ msg: 'Checking if entry should be skipped',
33
+ });
34
+ return entry.startsWith('.') || SKIP_DIRECTORIES.has(entry);
35
+ }
36
+ /**
37
+ * Config files that don't need tests
38
+ */
39
+ const CONFIG_FILE_PATTERNS = [
40
+ /^vitest\.(config|setup|workspace)\.ts$/,
41
+ /^jest\.(config|setup)\.ts$/,
42
+ /^eslint\.config\.ts$/,
43
+ /^prettier\.config\.ts$/,
44
+ /^tailwind\.config\.ts$/,
45
+ /^tsconfig\..+\.ts$/,
46
+ /\.config\.ts$/,
47
+ /\.setup\.ts$/,
48
+ ];
49
+ /**
50
+ * Check if file is a source file that needs tests
51
+ * @param {string} filename - The filename to check
52
+ * @param {string} [relativePath] - Optional relative path for additional context
53
+ * @returns {boolean} True if the file is a source file that needs tests, false otherwise
54
+ */
55
+ /* v8 ignore start -- isSourceFile has many filename-pattern skip branches; covered indirectly */
56
+ function isSourceFile(filename, relativePath) {
57
+ logger.debug({
58
+ evt: 'fitness.checks.test_file_pairing.is_source_file',
59
+ msg: 'Checking if file is a source file that needs tests',
60
+ });
61
+ // Must be TS
62
+ if (!filename.endsWith('.ts') && !filename.endsWith('.tsx'))
63
+ return false;
64
+ // Skip declarations
65
+ if (filename.endsWith('.d.ts'))
66
+ return false;
67
+ // Skip existing test files
68
+ if (filename.includes('.test.') || filename.includes('.spec.'))
69
+ return false;
70
+ // Skip index files (often just exports)
71
+ if (filename === 'index.ts')
72
+ return false;
73
+ // Skip config files (vitest.config.ts, vitest.setup.ts, etc.)
74
+ if (CONFIG_FILE_PATTERNS.some((pattern) => pattern.test(filename)))
75
+ return false;
76
+ // Skip interface files (pure type definitions)
77
+ if (filename.includes('.interface.ts') || filename.includes('.interface.tsx'))
78
+ return false;
79
+ // Skip type definition files and data-only files
80
+ const typeOnlyPatterns = ['-types.ts', '-interfaces.ts', 'errors.ts', 'enums.ts', 'logger.ts'];
81
+ if (typeOnlyPatterns.some((pattern) => filename.endsWith(pattern)))
82
+ return false;
83
+ // Skip exact 'types.ts' (barrel type exports)
84
+ if (filename === 'types.ts' || filename === 'types.tsx')
85
+ return false;
86
+ // Skip pure data/schema/constants files
87
+ const dataOnlyPatterns = ['schema.ts', 'constants.ts', 'profiles.ts', 'error-messages.ts'];
88
+ if (dataOnlyPatterns.includes(filename))
89
+ return false;
90
+ // Skip files in types/ or interfaces/ directories
91
+ if (relativePath && (relativePath.includes('/types/') || relativePath.includes('/interfaces/')))
92
+ return false;
93
+ // Skip fitness check definition directories (declarative defineCheck files)
94
+ if (relativePath &&
95
+ relativePath.includes('/fitness/src/checks/') &&
96
+ !relativePath.includes('__tests__'))
97
+ return false;
98
+ return true;
99
+ }
100
+ /* v8 ignore stop */
101
+ /**
102
+ * Check if a file has a test pair
103
+ * @param {string} dir - The directory containing the file
104
+ * @param {string} filename - The filename to check for test pairing
105
+ * @returns {boolean} True if a test pair exists, false otherwise
106
+ */
107
+ function hasTestPair(dir, filename) {
108
+ logger.debug({
109
+ evt: 'fitness.checks.test_file_pairing.has_test_pair',
110
+ msg: 'Checking if file has a test pair',
111
+ });
112
+ // @fitness-ignore-next-line null-safety -- path.parse() always returns a valid ParsedPath object with a name property
113
+ const name = path.parse(filename).name;
114
+ const parentDir = path.dirname(dir);
115
+ const possibilities = [
116
+ // Adjacent test files
117
+ path.join(dir, `${name}.test.ts`),
118
+ path.join(dir, `${name}.spec.ts`),
119
+ path.join(dir, `${name}.test.tsx`),
120
+ path.join(dir, `${name}.spec.tsx`),
121
+ // __tests__ directory (flat)
122
+ path.join(dir, '__tests__', `${name}.test.ts`),
123
+ path.join(dir, '__tests__', `${name}.spec.ts`),
124
+ path.join(dir, '__tests__', `${name}.test.tsx`),
125
+ path.join(dir, '__tests__', `${name}.spec.tsx`),
126
+ // __tests__/unit directory
127
+ path.join(dir, '__tests__', 'unit', `${name}.test.ts`),
128
+ path.join(dir, '__tests__', 'unit', `${name}.spec.ts`),
129
+ path.join(dir, '__tests__', 'unit', `${name}.unit.test.ts`),
130
+ path.join(dir, '__tests__', 'unit', `${name}.unit.spec.ts`),
131
+ path.join(dir, '__tests__', 'unit', `${name}.test.tsx`),
132
+ path.join(dir, '__tests__', 'unit', `${name}.spec.tsx`),
133
+ path.join(dir, '__tests__', 'unit', `${name}.unit.test.tsx`),
134
+ path.join(dir, '__tests__', 'unit', `${name}.unit.spec.tsx`),
135
+ // Parent directory __tests__ (for files in core/ subdirectory)
136
+ path.join(parentDir, '__tests__', `${name}.test.ts`),
137
+ path.join(parentDir, '__tests__', `${name}.spec.ts`),
138
+ path.join(parentDir, '__tests__', 'unit', `${name}.test.ts`),
139
+ path.join(parentDir, '__tests__', 'unit', `${name}.spec.ts`),
140
+ path.join(parentDir, '__tests__', 'unit', `${name}.unit.test.ts`),
141
+ path.join(parentDir, '__tests__', 'unit', `${name}.unit.spec.ts`),
142
+ ];
143
+ return possibilities.some((possiblePath) => fs.existsSync(possiblePath));
144
+ }
145
+ /**
146
+ * Check if a file has a @test-pending marker
147
+ * @returns {Promise<boolean>} True if the @test-pending marker is found, false otherwise
148
+ */
149
+ async function hasTestPendingMarker(filePath, files) {
150
+ logger.debug({
151
+ evt: 'fitness.checks.test_file_pairing.has_test_pending_marker',
152
+ msg: 'Checking if file has a test-pending marker',
153
+ });
154
+ try {
155
+ const content = await files.read(filePath);
156
+ return content.slice(0, 500).includes('@test-pending');
157
+ }
158
+ catch {
159
+ // @swallow-ok graceful degradation - return sentinel on failure
160
+ return false;
161
+ }
162
+ }
163
+ /**
164
+ * Recursively scan directory for source files
165
+ */
166
+ async function scanDirectory(dir, cwd, files) {
167
+ logger.debug({
168
+ evt: 'fitness.checks.test_file_pairing.scan_directory',
169
+ msg: 'Scanning directory for source files without test pairs',
170
+ });
171
+ const violations = [];
172
+ // @lazy-ok -- validations inside loop depend on loop iteration data, not pre-await guards
173
+ try {
174
+ const entries = fs.readdirSync(dir);
175
+ // Filter out entries that should be skipped
176
+ const relevantEntries = entries.filter((entry) => !shouldSkipEntry(entry));
177
+ for (const entry of relevantEntries) {
178
+ const fullPath = path.join(dir, entry);
179
+ const relativePath = path.relative(cwd, fullPath);
180
+ const stats = fs.statSync(fullPath);
181
+ if (stats.isDirectory()) {
182
+ const subViolations = await scanDirectory(fullPath, cwd, files);
183
+ violations.push(...subViolations);
184
+ }
185
+ else if (stats.isFile()) {
186
+ if (!isSourceFile(entry, relativePath))
187
+ continue;
188
+ if (await hasTestPendingMarker(fullPath, files))
189
+ continue;
190
+ if (hasTestPair(dir, entry))
191
+ continue;
192
+ // @fitness-ignore-next-line null-safety -- path.parse() always returns a valid ParsedPath object with a name property
193
+ const name = path.parse(entry).name;
194
+ const testDir = path.join(dir, '__tests__', 'unit');
195
+ const expectedTestFile = path.join(testDir, `${name}.unit.test.ts`);
196
+ const alternativeTestFile = path.join(testDir, `${name}.test.ts`);
197
+ violations.push({
198
+ line: 1,
199
+ message: `Missing test file for ${entry}. Expected ${name}.test.ts or ${name}.spec.ts`,
200
+ severity: 'error',
201
+ type: 'missing-test',
202
+ suggestion: `Create a test file: touch ${expectedTestFile} (or ${alternativeTestFile})`,
203
+ match: entry,
204
+ filePath: fullPath,
205
+ });
206
+ }
207
+ }
208
+ }
209
+ catch {
210
+ // @swallow-ok Skip inaccessible directories
211
+ }
212
+ return violations;
213
+ }
214
+ /**
215
+ * Analyze all files for test pairing
216
+ */
217
+ // @fitness-ignore-next-line concurrency-safety -- async keyword required by analyzeAll interface contract; synchronous analysis implementation
218
+ async function analyzeAll(files) {
219
+ logger.debug({
220
+ evt: 'fitness.checks.test_file_pairing.analyze_all',
221
+ msg: 'Analyzing all files for test pairing',
222
+ });
223
+ // Get the cwd from the first file path (all paths are absolute)
224
+ const firstPath = files.paths[0];
225
+ if (!firstPath) {
226
+ return [];
227
+ }
228
+ // Find the repo root by looking for packages directory
229
+ let cwd = path.dirname(firstPath);
230
+ while (cwd !== '/' && !fs.existsSync(path.join(cwd, 'packages'))) {
231
+ cwd = path.dirname(cwd);
232
+ }
233
+ const scanDirs = [path.join(cwd, 'packages'), path.join(cwd, 'apps'), path.join(cwd, 'services')];
234
+ const allViolations = [];
235
+ for (const dir of scanDirs) {
236
+ if (!fs.existsSync(dir))
237
+ continue;
238
+ // @fitness-ignore-next-line performance-anti-patterns -- sequential directory scanning required: each scan depends on shared file system state
239
+ const dirViolations = await scanDirectory(dir, cwd, files);
240
+ for (const violation of dirViolations) {
241
+ allViolations.push(violation);
242
+ }
243
+ }
244
+ return allViolations;
245
+ }
246
+ /**
247
+ * Check: testing/test-file-pairing
248
+ *
249
+ * Ensures every source file in services has a corresponding test file.
250
+ */
251
+ export const testFilePairing = defineCheck({
252
+ id: '6f807024-f5c3-4364-a1f3-ccd39d439df2',
253
+ slug: 'test-file-pairing',
254
+ scope: { languages: ['typescript'], concerns: ['backend', 'server'] },
255
+ contentFilter: 'strip-strings',
256
+ confidence: 'high',
257
+ description: 'Ensures every source file has a corresponding test file',
258
+ longDescription: `**Purpose:** Ensures every TypeScript source file in \`packages/\`, \`apps/\`, and \`services/\` has a corresponding test file, enforcing test coverage completeness.
259
+
260
+ **Detects:**
261
+ - Source \`.ts\`/\`.tsx\` files missing a paired test file (\`missing-test\`)
262
+ - Searches for test pairs in multiple locations: adjacent files, \`__tests__/\`, \`__tests__/unit/\`, and parent \`__tests__/\` directories
263
+ - Accepts \`.test.ts\`, \`.spec.ts\`, \`.unit.test.ts\`, and \`.unit.spec.ts\` suffixes
264
+ - Respects \`@test-pending\` marker in the first 500 characters of a file to suppress the violation
265
+ - Excludes index files, \`.d.ts\`, config files, interface/type-only files, enums, errors, and logger files
266
+
267
+ **Why it matters:** Unpaired source files represent gaps in test coverage that can lead to undetected regressions.
268
+
269
+ **Scope:** Codebase-specific convention. Cross-file analysis via \`analyzeAll\` recursively scanning \`packages/\`, \`apps/\`, and \`services/\`.`,
270
+ tags: ['testing', 'coverage'],
271
+ fileTypes: ['ts'],
272
+ analyzeAll,
273
+ });
274
+ //# sourceMappingURL=test-file-pairing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-file-pairing.js","sourceRoot":"","sources":["../../../src/checks/testing/test-file-pairing.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,qIAAqI;AACrI,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAA0C,MAAM,sBAAsB,CAAC;AAE3F;;GAEG;AACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC/B,cAAc;IACd,WAAW;IACX,OAAO;IACP,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,QAAQ,EAAE,qFAAqF;CAChG,CAAC,CAAC;AAEH;;;;GAIG;AACH,SAAS,eAAe,CAAC,KAAa;IACpC,MAAM,CAAC,KAAK,CAAC;QACX,GAAG,EAAE,oDAAoD;QACzD,GAAG,EAAE,qCAAqC;KAC3C,CAAC,CAAC;IACH,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,MAAM,oBAAoB,GAAG;IAC3B,wCAAwC;IACxC,4BAA4B;IAC5B,sBAAsB;IACtB,wBAAwB;IACxB,wBAAwB;IACxB,oBAAoB;IACpB,eAAe;IACf,cAAc;CACf,CAAC;AAEF;;;;;GA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AAqB,EAAE,CAAC;IAC3C,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC3B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS;QAClC,+IAA+I;QAC/I,MAAM,aAAa,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QAC3D,KAAK,MAAM,SAAS,IAAI,aAAa,EAAE,CAAC;YACtC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;IACzC,EAAE,EAAE,sCAAsC;IAC1C,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE;IACrE,aAAa,EAAE,eAAe;IAC9B,UAAU,EAAE,MAAM;IAClB,WAAW,EAAE,yDAAyD;IACtE,eAAe,EAAE;;;;;;;;;;;kJAW+H;IAChJ,IAAI,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;IAC7B,SAAS,EAAE,CAAC,IAAI,CAAC;IAEjB,UAAU;CACX,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @fileoverview Display entries for cross-language architecture and documentation checks
3
+ */
4
+ import type { CheckDisplayEntry } from './types.js';
5
+ /** Architecture check display entries (UNIVERSAL only) */
6
+ export declare const ARCHITECTURE_DISPLAY: Readonly<Record<string, CheckDisplayEntry>>;
7
+ /** Documentation check display entries (UNIVERSAL only) */
8
+ export declare const DOCUMENTATION_DISPLAY: Readonly<Record<string, CheckDisplayEntry>>;
9
+ //# sourceMappingURL=architecture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"architecture.d.ts","sourceRoot":"","sources":["../../src/display/architecture.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,0DAA0D;AAC1D,eAAO,MAAM,oBAAoB,6CAkB/B,CAAC;AAEH,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,6CAGhC,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @fileoverview Display entries for cross-language architecture and documentation checks
3
+ */
4
+ /** Architecture check display entries (UNIVERSAL only) */
5
+ export const ARCHITECTURE_DISPLAY = Object.freeze({
6
+ 'docker-best-practices': ['๐Ÿณ', 'Docker Best Practices'],
7
+ 'docker-ignore-validation': ['๐Ÿณ', 'Docker Ignore Validation'],
8
+ 'docker-version-sync': ['๐Ÿณ', 'Docker Version Sync'],
9
+ 'empty-package-detection': ['๐Ÿ“ฆ', 'Empty Package Detection'],
10
+ 'env-var-validation': ['๐Ÿ”ง', 'Env Var Validation'],
11
+ 'file-length-limit': ['๐Ÿ“', 'File Length Limit'],
12
+ 'heavy-import-detection': ['๐Ÿ“ฆ', 'Heavy Import Detection'],
13
+ 'interface-implementation-consistency': ['๐Ÿ“‹', 'Interface Implementation Consistency'],
14
+ 'no-custom-event-emitter': ['๐Ÿ“จ', 'No Custom Event Emitter'],
15
+ 'no-duplicate-packages': ['๐Ÿ“ฆ', 'No Duplicate Packages'],
16
+ 'no-kebab-option-indexing': ['๐Ÿซ', 'No Kebab Option Indexing'],
17
+ 'node-version-consistency': ['๐Ÿ“ฆ', 'Node Version Consistency'],
18
+ 'project-readme-existence': ['๐Ÿ“', 'Project README Existence'],
19
+ 'stale-build-artifacts': ['๐Ÿš๏ธ', 'Stale Build Artifacts'],
20
+ 'tool-has-manifest': ['๐Ÿชช', 'Tool Has Manifest'],
21
+ 'vitest-config-extends-base': ['๐Ÿงช', 'Vitest Config Extends Base'],
22
+ 'vitest-config-required-with-tests': ['๐Ÿงช', 'Vitest Config Required With Tests'],
23
+ });
24
+ /** Documentation check display entries (UNIVERSAL only) */
25
+ export const DOCUMENTATION_DISPLAY = Object.freeze({
26
+ 'directive-audit': ['๐Ÿ“', 'Directive Audit'],
27
+ 'public-api-jsdoc': ['๐Ÿ“', 'Public API JSDoc Coverage'],
28
+ });
29
+ //# sourceMappingURL=architecture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"architecture.js","sourceRoot":"","sources":["../../src/display/architecture.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,0DAA0D;AAC1D,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAoC;IACnF,uBAAuB,EAAE,CAAC,IAAI,EAAE,uBAAuB,CAAC;IACxD,0BAA0B,EAAE,CAAC,IAAI,EAAE,0BAA0B,CAAC;IAC9D,qBAAqB,EAAE,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACpD,yBAAyB,EAAE,CAAC,IAAI,EAAE,yBAAyB,CAAC;IAC5D,oBAAoB,EAAE,CAAC,IAAI,EAAE,oBAAoB,CAAC;IAClD,mBAAmB,EAAE,CAAC,IAAI,EAAE,mBAAmB,CAAC;IAChD,wBAAwB,EAAE,CAAC,IAAI,EAAE,wBAAwB,CAAC;IAC1D,sCAAsC,EAAE,CAAC,IAAI,EAAE,sCAAsC,CAAC;IACtF,yBAAyB,EAAE,CAAC,IAAI,EAAE,yBAAyB,CAAC;IAC5D,uBAAuB,EAAE,CAAC,IAAI,EAAE,uBAAuB,CAAC;IACxD,0BAA0B,EAAE,CAAC,IAAI,EAAE,0BAA0B,CAAC;IAC9D,0BAA0B,EAAE,CAAC,IAAI,EAAE,0BAA0B,CAAC;IAC9D,0BAA0B,EAAE,CAAC,IAAI,EAAE,0BAA0B,CAAC;IAC9D,uBAAuB,EAAE,CAAC,KAAK,EAAE,uBAAuB,CAAC;IACzD,mBAAmB,EAAE,CAAC,IAAI,EAAE,mBAAmB,CAAC;IAChD,4BAA4B,EAAE,CAAC,IAAI,EAAE,4BAA4B,CAAC;IAClE,mCAAmC,EAAE,CAAC,IAAI,EAAE,mCAAmC,CAAC;CACjF,CAAC,CAAC;AAEH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAoC;IACpF,iBAAiB,EAAE,CAAC,IAAI,EAAE,iBAAiB,CAAC;IAC5C,kBAAkB,EAAE,CAAC,IAAI,EAAE,2BAA2B,CAAC;CACxD,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @fileoverview Display configuration for cross-language fitness checks
3
+ *
4
+ * Maps check slugs to display entries (icon + display name) for CLI and dashboard output.
5
+ * Falls back to kebab-to-title-case conversion for unknown slugs.
6
+ *
7
+ * The lookup logic itself lives in @opensip-cli/fitness/check-utils; this
8
+ * file owns only the per-pack CHECK_DISPLAY map and binds the shared helpers
9
+ * to it.
10
+ */
11
+ import type { CheckDisplayEntry } from './types.js';
12
+ /** Combined check display configuration */
13
+ export declare const CHECK_DISPLAY: Readonly<Record<string, CheckDisplayEntry>>;
14
+ /**
15
+ * Slug-only display lookups bound to this pack's CHECK_DISPLAY map. The lookup
16
+ * logic lives in @opensip-cli/fitness; this file owns only the data.
17
+ */
18
+ export declare const getCheckIcon: (checkSlug: string) => string, getCheckDisplayName: (checkSlug: string) => string;
19
+ export { type CheckDisplayEntry } from './types.js';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/display/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,2CAA2C;AAC3C,eAAO,MAAM,aAAa,6CAOxB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAQ,YAAY,iCAAE,mBAAmB,+BAAsC,CAAC;AAEvF,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @fileoverview Display configuration for cross-language fitness checks
3
+ *
4
+ * Maps check slugs to display entries (icon + display name) for CLI and dashboard output.
5
+ * Falls back to kebab-to-title-case conversion for unknown slugs.
6
+ *
7
+ * The lookup logic itself lives in @opensip-cli/fitness/check-utils; this
8
+ * file owns only the per-pack CHECK_DISPLAY map and binds the shared helpers
9
+ * to it.
10
+ */
11
+ import { makeDisplayHelpers } from '@opensip-cli/fitness';
12
+ import { ARCHITECTURE_DISPLAY, DOCUMENTATION_DISPLAY } from './architecture.js';
13
+ import { QUALITY_DISPLAY } from './quality.js';
14
+ import { RESILIENCE_DISPLAY } from './resilience.js';
15
+ import { SECURITY_DISPLAY, TESTING_DISPLAY } from './security-testing.js';
16
+ /** Combined check display configuration */
17
+ export const CHECK_DISPLAY = Object.freeze({
18
+ ...ARCHITECTURE_DISPLAY,
19
+ ...DOCUMENTATION_DISPLAY,
20
+ ...QUALITY_DISPLAY,
21
+ ...RESILIENCE_DISPLAY,
22
+ ...SECURITY_DISPLAY,
23
+ ...TESTING_DISPLAY,
24
+ });
25
+ /**
26
+ * Slug-only display lookups bound to this pack's CHECK_DISPLAY map. The lookup
27
+ * logic lives in @opensip-cli/fitness; this file owns only the data.
28
+ */
29
+ export const { getCheckIcon, getCheckDisplayName } = makeDisplayHelpers(CHECK_DISPLAY);
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/display/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI1E,2CAA2C;AAC3C,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAoC;IAC5E,GAAG,oBAAoB;IACvB,GAAG,qBAAqB;IACxB,GAAG,eAAe;IAClB,GAAG,kBAAkB;IACrB,GAAG,gBAAgB;IACnB,GAAG,eAAe;CACnB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,mBAAmB,EAAE,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC"}