@opensip-cli/checks-typescript 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 (404) 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 +12 -0
  5. package/dist/__tests__/all-checks-execute.test.d.ts.map +1 -0
  6. package/dist/__tests__/all-checks-execute.test.js +846 -0
  7. package/dist/__tests__/all-checks-execute.test.js.map +1 -0
  8. package/dist/__tests__/behavior-fixtures-2.test.d.ts +9 -0
  9. package/dist/__tests__/behavior-fixtures-2.test.d.ts.map +1 -0
  10. package/dist/__tests__/behavior-fixtures-2.test.js +625 -0
  11. package/dist/__tests__/behavior-fixtures-2.test.js.map +1 -0
  12. package/dist/__tests__/behavior-fixtures-3.test.d.ts +7 -0
  13. package/dist/__tests__/behavior-fixtures-3.test.d.ts.map +1 -0
  14. package/dist/__tests__/behavior-fixtures-3.test.js +658 -0
  15. package/dist/__tests__/behavior-fixtures-3.test.js.map +1 -0
  16. package/dist/__tests__/behavior-fixtures-4.test.d.ts +8 -0
  17. package/dist/__tests__/behavior-fixtures-4.test.d.ts.map +1 -0
  18. package/dist/__tests__/behavior-fixtures-4.test.js +590 -0
  19. package/dist/__tests__/behavior-fixtures-4.test.js.map +1 -0
  20. package/dist/__tests__/behavior-fixtures-5.test.d.ts +7 -0
  21. package/dist/__tests__/behavior-fixtures-5.test.d.ts.map +1 -0
  22. package/dist/__tests__/behavior-fixtures-5.test.js +548 -0
  23. package/dist/__tests__/behavior-fixtures-5.test.js.map +1 -0
  24. package/dist/__tests__/behavior-fixtures-6.test.d.ts +18 -0
  25. package/dist/__tests__/behavior-fixtures-6.test.d.ts.map +1 -0
  26. package/dist/__tests__/behavior-fixtures-6.test.js +1700 -0
  27. package/dist/__tests__/behavior-fixtures-6.test.js.map +1 -0
  28. package/dist/__tests__/behavior-fixtures.test.d.ts +10 -0
  29. package/dist/__tests__/behavior-fixtures.test.d.ts.map +1 -0
  30. package/dist/__tests__/behavior-fixtures.test.js +812 -0
  31. package/dist/__tests__/behavior-fixtures.test.js.map +1 -0
  32. package/dist/__tests__/branch-fixtures-2.test.d.ts +6 -0
  33. package/dist/__tests__/branch-fixtures-2.test.d.ts.map +1 -0
  34. package/dist/__tests__/branch-fixtures-2.test.js +1369 -0
  35. package/dist/__tests__/branch-fixtures-2.test.js.map +1 -0
  36. package/dist/__tests__/branch-fixtures-3.test.d.ts +7 -0
  37. package/dist/__tests__/branch-fixtures-3.test.d.ts.map +1 -0
  38. package/dist/__tests__/branch-fixtures-3.test.js +877 -0
  39. package/dist/__tests__/branch-fixtures-3.test.js.map +1 -0
  40. package/dist/__tests__/branch-fixtures.test.d.ts +6 -0
  41. package/dist/__tests__/branch-fixtures.test.d.ts.map +1 -0
  42. package/dist/__tests__/branch-fixtures.test.js +1072 -0
  43. package/dist/__tests__/branch-fixtures.test.js.map +1 -0
  44. package/dist/__tests__/checks.test.d.ts +2 -0
  45. package/dist/__tests__/checks.test.d.ts.map +1 -0
  46. package/dist/__tests__/checks.test.js +39 -0
  47. package/dist/__tests__/checks.test.js.map +1 -0
  48. package/dist/__tests__/fixture-coverage.allowlist.d.ts +19 -0
  49. package/dist/__tests__/fixture-coverage.allowlist.d.ts.map +1 -0
  50. package/dist/__tests__/fixture-coverage.allowlist.js +27 -0
  51. package/dist/__tests__/fixture-coverage.allowlist.js.map +1 -0
  52. package/dist/__tests__/fixture-coverage.test.d.ts +13 -0
  53. package/dist/__tests__/fixture-coverage.test.d.ts.map +1 -0
  54. package/dist/__tests__/fixture-coverage.test.js +57 -0
  55. package/dist/__tests__/fixture-coverage.test.js.map +1 -0
  56. package/dist/__tests__/no-bootstrap-tool-import.test.d.ts +2 -0
  57. package/dist/__tests__/no-bootstrap-tool-import.test.d.ts.map +1 -0
  58. package/dist/__tests__/no-bootstrap-tool-import.test.js +75 -0
  59. package/dist/__tests__/no-bootstrap-tool-import.test.js.map +1 -0
  60. package/dist/__tests__/phantom-dependency-detection.test.d.ts +12 -0
  61. package/dist/__tests__/phantom-dependency-detection.test.d.ts.map +1 -0
  62. package/dist/__tests__/phantom-dependency-detection.test.js +112 -0
  63. package/dist/__tests__/phantom-dependency-detection.test.js.map +1 -0
  64. package/dist/__tests__/typescript-frontend.test.d.ts +8 -0
  65. package/dist/__tests__/typescript-frontend.test.d.ts.map +1 -0
  66. package/dist/__tests__/typescript-frontend.test.js +57 -0
  67. package/dist/__tests__/typescript-frontend.test.js.map +1 -0
  68. package/dist/checks/architecture/circular-import-detection.d.ts +14 -0
  69. package/dist/checks/architecture/circular-import-detection.d.ts.map +1 -0
  70. package/dist/checks/architecture/circular-import-detection.js +55 -0
  71. package/dist/checks/architecture/circular-import-detection.js.map +1 -0
  72. package/dist/checks/architecture/contracts-schema-consistency.d.ts +11 -0
  73. package/dist/checks/architecture/contracts-schema-consistency.d.ts.map +1 -0
  74. package/dist/checks/architecture/contracts-schema-consistency.js +75 -0
  75. package/dist/checks/architecture/contracts-schema-consistency.js.map +1 -0
  76. package/dist/checks/architecture/drizzle-orm-migration-guardrails.d.ts +12 -0
  77. package/dist/checks/architecture/drizzle-orm-migration-guardrails.d.ts.map +1 -0
  78. package/dist/checks/architecture/drizzle-orm-migration-guardrails.js +92 -0
  79. package/dist/checks/architecture/drizzle-orm-migration-guardrails.js.map +1 -0
  80. package/dist/checks/architecture/index.d.ts +10 -0
  81. package/dist/checks/architecture/index.d.ts.map +1 -0
  82. package/dist/checks/architecture/index.js +10 -0
  83. package/dist/checks/architecture/index.js.map +1 -0
  84. package/dist/checks/architecture/missing-type-exports.d.ts +13 -0
  85. package/dist/checks/architecture/missing-type-exports.d.ts.map +1 -0
  86. package/dist/checks/architecture/missing-type-exports.js +245 -0
  87. package/dist/checks/architecture/missing-type-exports.js.map +1 -0
  88. package/dist/checks/architecture/module-coupling-fan-out.d.ts +20 -0
  89. package/dist/checks/architecture/module-coupling-fan-out.d.ts.map +1 -0
  90. package/dist/checks/architecture/module-coupling-fan-out.js +120 -0
  91. package/dist/checks/architecture/module-coupling-fan-out.js.map +1 -0
  92. package/dist/checks/architecture/no-bootstrap-tool-import.d.ts +38 -0
  93. package/dist/checks/architecture/no-bootstrap-tool-import.d.ts.map +1 -0
  94. package/dist/checks/architecture/no-bootstrap-tool-import.js +95 -0
  95. package/dist/checks/architecture/no-bootstrap-tool-import.js.map +1 -0
  96. package/dist/checks/architecture/package-json-exports-field.d.ts +10 -0
  97. package/dist/checks/architecture/package-json-exports-field.d.ts.map +1 -0
  98. package/dist/checks/architecture/package-json-exports-field.js +56 -0
  99. package/dist/checks/architecture/package-json-exports-field.js.map +1 -0
  100. package/dist/checks/architecture/phantom-dependency-detection.d.ts +22 -0
  101. package/dist/checks/architecture/phantom-dependency-detection.d.ts.map +1 -0
  102. package/dist/checks/architecture/phantom-dependency-detection.js +330 -0
  103. package/dist/checks/architecture/phantom-dependency-detection.js.map +1 -0
  104. package/dist/checks/architecture/tsconfig-extends-validation.d.ts +10 -0
  105. package/dist/checks/architecture/tsconfig-extends-validation.d.ts.map +1 -0
  106. package/dist/checks/architecture/tsconfig-extends-validation.js +78 -0
  107. package/dist/checks/architecture/tsconfig-extends-validation.js.map +1 -0
  108. package/dist/checks/index.d.ts +6 -0
  109. package/dist/checks/index.d.ts.map +1 -0
  110. package/dist/checks/index.js +6 -0
  111. package/dist/checks/index.js.map +1 -0
  112. package/dist/checks/quality/api/api-contract-validation.d.ts +15 -0
  113. package/dist/checks/quality/api/api-contract-validation.d.ts.map +1 -0
  114. package/dist/checks/quality/api/api-contract-validation.js +316 -0
  115. package/dist/checks/quality/api/api-contract-validation.js.map +1 -0
  116. package/dist/checks/quality/api/api-response-validation.d.ts +14 -0
  117. package/dist/checks/quality/api/api-response-validation.d.ts.map +1 -0
  118. package/dist/checks/quality/api/api-response-validation.js +209 -0
  119. package/dist/checks/quality/api/api-response-validation.js.map +1 -0
  120. package/dist/checks/quality/api/fastify-route-validation.d.ts +14 -0
  121. package/dist/checks/quality/api/fastify-route-validation.d.ts.map +1 -0
  122. package/dist/checks/quality/api/fastify-route-validation.js +298 -0
  123. package/dist/checks/quality/api/fastify-route-validation.js.map +1 -0
  124. package/dist/checks/quality/api/fastify-schema-coverage.d.ts +11 -0
  125. package/dist/checks/quality/api/fastify-schema-coverage.d.ts.map +1 -0
  126. package/dist/checks/quality/api/fastify-schema-coverage.js +261 -0
  127. package/dist/checks/quality/api/fastify-schema-coverage.js.map +1 -0
  128. package/dist/checks/quality/api/index.d.ts +5 -0
  129. package/dist/checks/quality/api/index.d.ts.map +1 -0
  130. package/dist/checks/quality/api/index.js +5 -0
  131. package/dist/checks/quality/api/index.js.map +1 -0
  132. package/dist/checks/quality/code-structure/duplicate-utility-functions.d.ts +32 -0
  133. package/dist/checks/quality/code-structure/duplicate-utility-functions.d.ts.map +1 -0
  134. package/dist/checks/quality/code-structure/duplicate-utility-functions.js +451 -0
  135. package/dist/checks/quality/code-structure/duplicate-utility-functions.js.map +1 -0
  136. package/dist/checks/quality/code-structure/index.d.ts +3 -0
  137. package/dist/checks/quality/code-structure/index.d.ts.map +1 -0
  138. package/dist/checks/quality/code-structure/index.js +3 -0
  139. package/dist/checks/quality/code-structure/index.js.map +1 -0
  140. package/dist/checks/quality/code-structure/no-any-types.d.ts +13 -0
  141. package/dist/checks/quality/code-structure/no-any-types.d.ts.map +1 -0
  142. package/dist/checks/quality/code-structure/no-any-types.js +116 -0
  143. package/dist/checks/quality/code-structure/no-any-types.js.map +1 -0
  144. package/dist/checks/quality/data-integrity/__tests__/null-safety-fp.test.d.ts +15 -0
  145. package/dist/checks/quality/data-integrity/__tests__/null-safety-fp.test.d.ts.map +1 -0
  146. package/dist/checks/quality/data-integrity/__tests__/null-safety-fp.test.js +51 -0
  147. package/dist/checks/quality/data-integrity/__tests__/null-safety-fp.test.js.map +1 -0
  148. package/dist/checks/quality/data-integrity/array-validation.d.ts +16 -0
  149. package/dist/checks/quality/data-integrity/array-validation.d.ts.map +1 -0
  150. package/dist/checks/quality/data-integrity/array-validation.js +508 -0
  151. package/dist/checks/quality/data-integrity/array-validation.js.map +1 -0
  152. package/dist/checks/quality/data-integrity/database-index-coverage.d.ts +14 -0
  153. package/dist/checks/quality/data-integrity/database-index-coverage.d.ts.map +1 -0
  154. package/dist/checks/quality/data-integrity/database-index-coverage.js +235 -0
  155. package/dist/checks/quality/data-integrity/database-index-coverage.js.map +1 -0
  156. package/dist/checks/quality/data-integrity/database-schema-validation.d.ts +16 -0
  157. package/dist/checks/quality/data-integrity/database-schema-validation.d.ts.map +1 -0
  158. package/dist/checks/quality/data-integrity/database-schema-validation.js +328 -0
  159. package/dist/checks/quality/data-integrity/database-schema-validation.js.map +1 -0
  160. package/dist/checks/quality/data-integrity/in-memory-repository-detection.d.ts +14 -0
  161. package/dist/checks/quality/data-integrity/in-memory-repository-detection.d.ts.map +1 -0
  162. package/dist/checks/quality/data-integrity/in-memory-repository-detection.js +157 -0
  163. package/dist/checks/quality/data-integrity/in-memory-repository-detection.js.map +1 -0
  164. package/dist/checks/quality/data-integrity/index.d.ts +8 -0
  165. package/dist/checks/quality/data-integrity/index.d.ts.map +1 -0
  166. package/dist/checks/quality/data-integrity/index.js +8 -0
  167. package/dist/checks/quality/data-integrity/index.js.map +1 -0
  168. package/dist/checks/quality/data-integrity/missing-input-validation.d.ts +12 -0
  169. package/dist/checks/quality/data-integrity/missing-input-validation.d.ts.map +1 -0
  170. package/dist/checks/quality/data-integrity/missing-input-validation.js +180 -0
  171. package/dist/checks/quality/data-integrity/missing-input-validation.js.map +1 -0
  172. package/dist/checks/quality/data-integrity/null-safety.d.ts +33 -0
  173. package/dist/checks/quality/data-integrity/null-safety.d.ts.map +1 -0
  174. package/dist/checks/quality/data-integrity/null-safety.js +766 -0
  175. package/dist/checks/quality/data-integrity/null-safety.js.map +1 -0
  176. package/dist/checks/quality/data-integrity/numeric-validation.d.ts +12 -0
  177. package/dist/checks/quality/data-integrity/numeric-validation.d.ts.map +1 -0
  178. package/dist/checks/quality/data-integrity/numeric-validation.js +409 -0
  179. package/dist/checks/quality/data-integrity/numeric-validation.js.map +1 -0
  180. package/dist/checks/quality/frontend/a11y-form-labels.d.ts +14 -0
  181. package/dist/checks/quality/frontend/a11y-form-labels.d.ts.map +1 -0
  182. package/dist/checks/quality/frontend/a11y-form-labels.js +93 -0
  183. package/dist/checks/quality/frontend/a11y-form-labels.js.map +1 -0
  184. package/dist/checks/quality/frontend/a11y-semantic-html.d.ts +14 -0
  185. package/dist/checks/quality/frontend/a11y-semantic-html.d.ts.map +1 -0
  186. package/dist/checks/quality/frontend/a11y-semantic-html.js +88 -0
  187. package/dist/checks/quality/frontend/a11y-semantic-html.js.map +1 -0
  188. package/dist/checks/quality/frontend/index.d.ts +4 -0
  189. package/dist/checks/quality/frontend/index.d.ts.map +1 -0
  190. package/dist/checks/quality/frontend/index.js +4 -0
  191. package/dist/checks/quality/frontend/index.js.map +1 -0
  192. package/dist/checks/quality/frontend/test-only-frontend-modules.d.ts +13 -0
  193. package/dist/checks/quality/frontend/test-only-frontend-modules.d.ts.map +1 -0
  194. package/dist/checks/quality/frontend/test-only-frontend-modules.js +159 -0
  195. package/dist/checks/quality/frontend/test-only-frontend-modules.js.map +1 -0
  196. package/dist/checks/quality/incomplete-regex-escaping.d.ts +13 -0
  197. package/dist/checks/quality/incomplete-regex-escaping.d.ts.map +1 -0
  198. package/dist/checks/quality/incomplete-regex-escaping.js +207 -0
  199. package/dist/checks/quality/incomplete-regex-escaping.js.map +1 -0
  200. package/dist/checks/quality/index.d.ts +11 -0
  201. package/dist/checks/quality/index.d.ts.map +1 -0
  202. package/dist/checks/quality/index.js +11 -0
  203. package/dist/checks/quality/index.js.map +1 -0
  204. package/dist/checks/quality/linting/index.d.ts +2 -0
  205. package/dist/checks/quality/linting/index.d.ts.map +1 -0
  206. package/dist/checks/quality/linting/index.js +2 -0
  207. package/dist/checks/quality/linting/index.js.map +1 -0
  208. package/dist/checks/quality/linting/typescript-frontend.d.ts +25 -0
  209. package/dist/checks/quality/linting/typescript-frontend.d.ts.map +1 -0
  210. package/dist/checks/quality/linting/typescript-frontend.js +159 -0
  211. package/dist/checks/quality/linting/typescript-frontend.js.map +1 -0
  212. package/dist/checks/quality/observability/index.d.ts +5 -0
  213. package/dist/checks/quality/observability/index.d.ts.map +1 -0
  214. package/dist/checks/quality/observability/index.js +5 -0
  215. package/dist/checks/quality/observability/index.js.map +1 -0
  216. package/dist/checks/quality/observability/logger-event-name-format.d.ts +12 -0
  217. package/dist/checks/quality/observability/logger-event-name-format.d.ts.map +1 -0
  218. package/dist/checks/quality/observability/logger-event-name-format.js +124 -0
  219. package/dist/checks/quality/observability/logger-event-name-format.js.map +1 -0
  220. package/dist/checks/quality/observability/no-hardcoded-correlation-id.d.ts +5 -0
  221. package/dist/checks/quality/observability/no-hardcoded-correlation-id.d.ts.map +1 -0
  222. package/dist/checks/quality/observability/no-hardcoded-correlation-id.js +77 -0
  223. package/dist/checks/quality/observability/no-hardcoded-correlation-id.js.map +1 -0
  224. package/dist/checks/quality/observability/observability-coverage/__tests__/analyzer.test.d.ts +11 -0
  225. package/dist/checks/quality/observability/observability-coverage/__tests__/analyzer.test.d.ts.map +1 -0
  226. package/dist/checks/quality/observability/observability-coverage/__tests__/analyzer.test.js +107 -0
  227. package/dist/checks/quality/observability/observability-coverage/__tests__/analyzer.test.js.map +1 -0
  228. package/dist/checks/quality/observability/observability-coverage/__tests__/logger-detector.test.d.ts +12 -0
  229. package/dist/checks/quality/observability/observability-coverage/__tests__/logger-detector.test.d.ts.map +1 -0
  230. package/dist/checks/quality/observability/observability-coverage/__tests__/logger-detector.test.js +94 -0
  231. package/dist/checks/quality/observability/observability-coverage/__tests__/logger-detector.test.js.map +1 -0
  232. package/dist/checks/quality/observability/observability-coverage/analyzer.d.ts +13 -0
  233. package/dist/checks/quality/observability/observability-coverage/analyzer.d.ts.map +1 -0
  234. package/dist/checks/quality/observability/observability-coverage/analyzer.js +117 -0
  235. package/dist/checks/quality/observability/observability-coverage/analyzer.js.map +1 -0
  236. package/dist/checks/quality/observability/observability-coverage/index.d.ts +4 -0
  237. package/dist/checks/quality/observability/observability-coverage/index.d.ts.map +1 -0
  238. package/dist/checks/quality/observability/observability-coverage/index.js +4 -0
  239. package/dist/checks/quality/observability/observability-coverage/index.js.map +1 -0
  240. package/dist/checks/quality/observability/observability-coverage/logger-detector.d.ts +29 -0
  241. package/dist/checks/quality/observability/observability-coverage/logger-detector.d.ts.map +1 -0
  242. package/dist/checks/quality/observability/observability-coverage/logger-detector.js +111 -0
  243. package/dist/checks/quality/observability/observability-coverage/logger-detector.js.map +1 -0
  244. package/dist/checks/quality/observability/observability-coverage/types.d.ts +64 -0
  245. package/dist/checks/quality/observability/observability-coverage/types.d.ts.map +1 -0
  246. package/dist/checks/quality/observability/observability-coverage/types.js +6 -0
  247. package/dist/checks/quality/observability/observability-coverage/types.js.map +1 -0
  248. package/dist/checks/quality/observability/pii-exposure-in-logs.d.ts +22 -0
  249. package/dist/checks/quality/observability/pii-exposure-in-logs.d.ts.map +1 -0
  250. package/dist/checks/quality/observability/pii-exposure-in-logs.js +212 -0
  251. package/dist/checks/quality/observability/pii-exposure-in-logs.js.map +1 -0
  252. package/dist/checks/quality/observability/pii-exposure-in-logs.test.d.ts +11 -0
  253. package/dist/checks/quality/observability/pii-exposure-in-logs.test.d.ts.map +1 -0
  254. package/dist/checks/quality/observability/pii-exposure-in-logs.test.js +46 -0
  255. package/dist/checks/quality/observability/pii-exposure-in-logs.test.js.map +1 -0
  256. package/dist/checks/quality/patterns/__tests__/toctou-fp.test.d.ts +14 -0
  257. package/dist/checks/quality/patterns/__tests__/toctou-fp.test.d.ts.map +1 -0
  258. package/dist/checks/quality/patterns/__tests__/toctou-fp.test.js +61 -0
  259. package/dist/checks/quality/patterns/__tests__/toctou-fp.test.js.map +1 -0
  260. package/dist/checks/quality/patterns/async-waterfall-detection.d.ts +26 -0
  261. package/dist/checks/quality/patterns/async-waterfall-detection.d.ts.map +1 -0
  262. package/dist/checks/quality/patterns/async-waterfall-detection.js +410 -0
  263. package/dist/checks/quality/patterns/async-waterfall-detection.js.map +1 -0
  264. package/dist/checks/quality/patterns/dispose-pattern-completeness.d.ts +13 -0
  265. package/dist/checks/quality/patterns/dispose-pattern-completeness.d.ts.map +1 -0
  266. package/dist/checks/quality/patterns/dispose-pattern-completeness.js +220 -0
  267. package/dist/checks/quality/patterns/dispose-pattern-completeness.js.map +1 -0
  268. package/dist/checks/quality/patterns/error-handling-quality.d.ts +17 -0
  269. package/dist/checks/quality/patterns/error-handling-quality.d.ts.map +1 -0
  270. package/dist/checks/quality/patterns/error-handling-quality.js +335 -0
  271. package/dist/checks/quality/patterns/error-handling-quality.js.map +1 -0
  272. package/dist/checks/quality/patterns/index.d.ts +10 -0
  273. package/dist/checks/quality/patterns/index.d.ts.map +1 -0
  274. package/dist/checks/quality/patterns/index.js +10 -0
  275. package/dist/checks/quality/patterns/index.js.map +1 -0
  276. package/dist/checks/quality/patterns/lifecycle-cleanup-enforcement.d.ts +16 -0
  277. package/dist/checks/quality/patterns/lifecycle-cleanup-enforcement.d.ts.map +1 -0
  278. package/dist/checks/quality/patterns/lifecycle-cleanup-enforcement.js +205 -0
  279. package/dist/checks/quality/patterns/lifecycle-cleanup-enforcement.js.map +1 -0
  280. package/dist/checks/quality/patterns/result-pattern-consistency.d.ts +16 -0
  281. package/dist/checks/quality/patterns/result-pattern-consistency.d.ts.map +1 -0
  282. package/dist/checks/quality/patterns/result-pattern-consistency.js +328 -0
  283. package/dist/checks/quality/patterns/result-pattern-consistency.js.map +1 -0
  284. package/dist/checks/quality/patterns/silent-early-returns.d.ts +23 -0
  285. package/dist/checks/quality/patterns/silent-early-returns.d.ts.map +1 -0
  286. package/dist/checks/quality/patterns/silent-early-returns.js +266 -0
  287. package/dist/checks/quality/patterns/silent-early-returns.js.map +1 -0
  288. package/dist/checks/quality/patterns/stream-buffer-size-limits.d.ts +13 -0
  289. package/dist/checks/quality/patterns/stream-buffer-size-limits.d.ts.map +1 -0
  290. package/dist/checks/quality/patterns/stream-buffer-size-limits.js +163 -0
  291. package/dist/checks/quality/patterns/stream-buffer-size-limits.js.map +1 -0
  292. package/dist/checks/quality/patterns/throws-documentation.d.ts +23 -0
  293. package/dist/checks/quality/patterns/throws-documentation.d.ts.map +1 -0
  294. package/dist/checks/quality/patterns/throws-documentation.js +519 -0
  295. package/dist/checks/quality/patterns/throws-documentation.js.map +1 -0
  296. package/dist/checks/quality/patterns/toctou-race-condition.d.ts +48 -0
  297. package/dist/checks/quality/patterns/toctou-race-condition.d.ts.map +1 -0
  298. package/dist/checks/quality/patterns/toctou-race-condition.js +639 -0
  299. package/dist/checks/quality/patterns/toctou-race-condition.js.map +1 -0
  300. package/dist/checks/quality/stubbed-implementation-detection.d.ts +24 -0
  301. package/dist/checks/quality/stubbed-implementation-detection.d.ts.map +1 -0
  302. package/dist/checks/quality/stubbed-implementation-detection.js +355 -0
  303. package/dist/checks/quality/stubbed-implementation-detection.js.map +1 -0
  304. package/dist/checks/quality/unused-config-options.d.ts +12 -0
  305. package/dist/checks/quality/unused-config-options.d.ts.map +1 -0
  306. package/dist/checks/quality/unused-config-options.js +245 -0
  307. package/dist/checks/quality/unused-config-options.js.map +1 -0
  308. package/dist/checks/resilience/__tests__/callback-invocation-safe.test.d.ts +2 -0
  309. package/dist/checks/resilience/__tests__/callback-invocation-safe.test.d.ts.map +1 -0
  310. package/dist/checks/resilience/__tests__/callback-invocation-safe.test.js +79 -0
  311. package/dist/checks/resilience/__tests__/callback-invocation-safe.test.js.map +1 -0
  312. package/dist/checks/resilience/__tests__/context-leakage-fp.test.d.ts +12 -0
  313. package/dist/checks/resilience/__tests__/context-leakage-fp.test.d.ts.map +1 -0
  314. package/dist/checks/resilience/__tests__/context-leakage-fp.test.js +34 -0
  315. package/dist/checks/resilience/__tests__/context-leakage-fp.test.js.map +1 -0
  316. package/dist/checks/resilience/__tests__/context-mutation.test.d.ts +11 -0
  317. package/dist/checks/resilience/__tests__/context-mutation.test.d.ts.map +1 -0
  318. package/dist/checks/resilience/__tests__/context-mutation.test.js +54 -0
  319. package/dist/checks/resilience/__tests__/context-mutation.test.js.map +1 -0
  320. package/dist/checks/resilience/callback-invocation-safe.d.ts +34 -0
  321. package/dist/checks/resilience/callback-invocation-safe.d.ts.map +1 -0
  322. package/dist/checks/resilience/callback-invocation-safe.js +247 -0
  323. package/dist/checks/resilience/callback-invocation-safe.js.map +1 -0
  324. package/dist/checks/resilience/context-leakage.d.ts +25 -0
  325. package/dist/checks/resilience/context-leakage.d.ts.map +1 -0
  326. package/dist/checks/resilience/context-leakage.js +435 -0
  327. package/dist/checks/resilience/context-leakage.js.map +1 -0
  328. package/dist/checks/resilience/context-mutation.d.ts +21 -0
  329. package/dist/checks/resilience/context-mutation.d.ts.map +1 -0
  330. package/dist/checks/resilience/context-mutation.js +368 -0
  331. package/dist/checks/resilience/context-mutation.js.map +1 -0
  332. package/dist/checks/resilience/detached-promises.d.ts +40 -0
  333. package/dist/checks/resilience/detached-promises.d.ts.map +1 -0
  334. package/dist/checks/resilience/detached-promises.js +646 -0
  335. package/dist/checks/resilience/detached-promises.js.map +1 -0
  336. package/dist/checks/resilience/index.d.ts +7 -0
  337. package/dist/checks/resilience/index.d.ts.map +1 -0
  338. package/dist/checks/resilience/index.js +7 -0
  339. package/dist/checks/resilience/index.js.map +1 -0
  340. package/dist/checks/resilience/no-raw-fetch.d.ts +11 -0
  341. package/dist/checks/resilience/no-raw-fetch.d.ts.map +1 -0
  342. package/dist/checks/resilience/no-raw-fetch.js +110 -0
  343. package/dist/checks/resilience/no-raw-fetch.js.map +1 -0
  344. package/dist/checks/resilience/no-unbounded-concurrency.d.ts +11 -0
  345. package/dist/checks/resilience/no-unbounded-concurrency.d.ts.map +1 -0
  346. package/dist/checks/resilience/no-unbounded-concurrency.js +117 -0
  347. package/dist/checks/resilience/no-unbounded-concurrency.js.map +1 -0
  348. package/dist/checks/security/__tests__/sql-injection.test.d.ts +17 -0
  349. package/dist/checks/security/__tests__/sql-injection.test.d.ts.map +1 -0
  350. package/dist/checks/security/__tests__/sql-injection.test.js +97 -0
  351. package/dist/checks/security/__tests__/sql-injection.test.js.map +1 -0
  352. package/dist/checks/security/index.d.ts +4 -0
  353. package/dist/checks/security/index.d.ts.map +1 -0
  354. package/dist/checks/security/index.js +4 -0
  355. package/dist/checks/security/index.js.map +1 -0
  356. package/dist/checks/security/input-sanitization.d.ts +20 -0
  357. package/dist/checks/security/input-sanitization.d.ts.map +1 -0
  358. package/dist/checks/security/input-sanitization.js +255 -0
  359. package/dist/checks/security/input-sanitization.js.map +1 -0
  360. package/dist/checks/security/sql-injection.d.ts +24 -0
  361. package/dist/checks/security/sql-injection.d.ts.map +1 -0
  362. package/dist/checks/security/sql-injection.js +330 -0
  363. package/dist/checks/security/sql-injection.js.map +1 -0
  364. package/dist/checks/security/unsafe-secret-comparison.d.ts +17 -0
  365. package/dist/checks/security/unsafe-secret-comparison.d.ts.map +1 -0
  366. package/dist/checks/security/unsafe-secret-comparison.js +227 -0
  367. package/dist/checks/security/unsafe-secret-comparison.js.map +1 -0
  368. package/dist/checks/testing/index.d.ts +2 -0
  369. package/dist/checks/testing/index.d.ts.map +1 -0
  370. package/dist/checks/testing/index.js +2 -0
  371. package/dist/checks/testing/index.js.map +1 -0
  372. package/dist/checks/testing/mock-implementations-in-production.d.ts +12 -0
  373. package/dist/checks/testing/mock-implementations-in-production.d.ts.map +1 -0
  374. package/dist/checks/testing/mock-implementations-in-production.js +211 -0
  375. package/dist/checks/testing/mock-implementations-in-production.js.map +1 -0
  376. package/dist/display/architecture.d.ts +9 -0
  377. package/dist/display/architecture.d.ts.map +1 -0
  378. package/dist/display/architecture.js +18 -0
  379. package/dist/display/architecture.js.map +1 -0
  380. package/dist/display/index.d.ts +20 -0
  381. package/dist/display/index.d.ts.map +1 -0
  382. package/dist/display/index.js +30 -0
  383. package/dist/display/index.js.map +1 -0
  384. package/dist/display/quality.d.ts +7 -0
  385. package/dist/display/quality.d.ts.map +1 -0
  386. package/dist/display/quality.js +39 -0
  387. package/dist/display/quality.js.map +1 -0
  388. package/dist/display/resilience.d.ts +7 -0
  389. package/dist/display/resilience.d.ts.map +1 -0
  390. package/dist/display/resilience.js +13 -0
  391. package/dist/display/resilience.js.map +1 -0
  392. package/dist/display/security-testing.d.ts +9 -0
  393. package/dist/display/security-testing.d.ts.map +1 -0
  394. package/dist/display/security-testing.js +14 -0
  395. package/dist/display/security-testing.js.map +1 -0
  396. package/dist/display/types.d.ts +6 -0
  397. package/dist/display/types.d.ts.map +1 -0
  398. package/dist/display/types.js +6 -0
  399. package/dist/display/types.js.map +1 -0
  400. package/dist/index.d.ts +19 -0
  401. package/dist/index.d.ts.map +1 -0
  402. package/dist/index.js +21 -0
  403. package/dist/index.js.map +1 -0
  404. package/package.json +55 -0
@@ -0,0 +1,330 @@
1
+ // @fitness-ignore-file toctou-race-condition -- TOCTOU acceptable in this non-concurrent context
2
+ // @fitness-ignore-file fitness-check-standards -- Check requires direct fs access for package.json parsing outside of standard file scanning pipeline
3
+ // @fitness-ignore-file unbounded-memory -- reads workspace package.json files; bounded by standard package metadata size
4
+ // @fitness-ignore-file performance-anti-patterns -- sequential package.json reads keep peak memory bounded; small N per workspace
5
+ /**
6
+ * @fileoverview Detect phantom dependencies - packages used in code but not declared in package.json (v3, AST-based)
7
+ * @invariants
8
+ * - Only checks external npm packages, not workspace packages or relative imports
9
+ * - Distinguishes between dependencies, devDependencies, and peerDependencies
10
+ * - Respects pnpm's strict node_modules isolation
11
+ * - Extracts imports from the TypeScript AST, so import-like text inside string
12
+ * literals (detection patterns, docs, fixtures) is never mistaken for a real import
13
+ */
14
+ import * as fs from 'node:fs';
15
+ import * as path from 'node:path';
16
+ import { defineCheck } from '@opensip-cli/fitness';
17
+ import { getSharedSourceFile, walkNodes } from '@opensip-cli/lang-typescript';
18
+ import * as ts from 'typescript';
19
+ /**
20
+ * Packages that are always available (Node.js built-ins)
21
+ */
22
+ const NODE_BUILTINS = new Set([
23
+ 'assert',
24
+ 'async_hooks',
25
+ 'buffer',
26
+ 'child_process',
27
+ 'cluster',
28
+ 'console',
29
+ 'constants',
30
+ 'crypto',
31
+ 'dgram',
32
+ 'dns',
33
+ 'domain',
34
+ 'events',
35
+ 'fs',
36
+ 'fs/promises',
37
+ 'http',
38
+ 'http2',
39
+ 'https',
40
+ 'inspector',
41
+ 'module',
42
+ 'net',
43
+ 'os',
44
+ 'path',
45
+ 'perf_hooks',
46
+ 'process',
47
+ 'punycode',
48
+ 'querystring',
49
+ 'readline',
50
+ 'repl',
51
+ 'stream',
52
+ 'stream/promises',
53
+ 'string_decoder',
54
+ 'sys',
55
+ 'timers',
56
+ 'timers/promises',
57
+ 'tls',
58
+ 'trace_events',
59
+ 'tty',
60
+ 'url',
61
+ 'util',
62
+ 'v8',
63
+ 'vm',
64
+ 'worker_threads',
65
+ 'zlib',
66
+ ]);
67
+ /**
68
+ * Patterns that indicate test-only imports (should check devDependencies)
69
+ */
70
+ const TEST_FILE_PATTERNS = [
71
+ /__tests__\//,
72
+ /\.test\.(ts|tsx|js|jsx)$/,
73
+ /\.spec\.(ts|tsx|js|jsx)$/,
74
+ /test\//,
75
+ /tests\//,
76
+ ];
77
+ /**
78
+ * Build/tooling config files (e.g. `vitest.config.ts`, `drizzle.config.ts`,
79
+ * `eslint.config.mjs`). Like test files, these run only at dev/build time and
80
+ * are never part of the published package, so importing a `devDependency` from
81
+ * them is legitimate — a genuinely undeclared import is still flagged.
82
+ */
83
+ const TOOLING_FILE_PATTERN = /(?:^|\/)[^/]+\.config\.(?:ts|tsx|js|jsx|mts|cts|mjs|cjs)$/;
84
+ /**
85
+ * Extract package name from an import specifier.
86
+ * Handles scoped packages (@org/pkg) and subpath imports (@org/pkg/subpath).
87
+ */
88
+ function extractPackageName(importSpecifier) {
89
+ // Skip relative imports
90
+ if (importSpecifier.startsWith('.') || importSpecifier.startsWith('/')) {
91
+ return null;
92
+ }
93
+ // Strip the node: prefix before built-in / package detection
94
+ const bare = importSpecifier.startsWith('node:') ? importSpecifier.slice(5) : importSpecifier;
95
+ // Skip Node.js built-ins (with or without the node: prefix, and subpaths like fs/promises)
96
+ if (NODE_BUILTINS.has(bare) || NODE_BUILTINS.has(bare.split('/')[0] ?? '')) {
97
+ return null;
98
+ }
99
+ // Handle scoped packages (@org/pkg or @org/pkg/subpath)
100
+ if (importSpecifier.startsWith('@')) {
101
+ const parts = importSpecifier.split('/');
102
+ if (parts.length >= 2) {
103
+ return `${parts[0]}/${parts[1]}`;
104
+ }
105
+ return null;
106
+ }
107
+ // Handle regular packages (pkg or pkg/subpath)
108
+ return importSpecifier.split('/')[0] ?? null;
109
+ }
110
+ /**
111
+ * Extract real module imports from a TypeScript/JavaScript source file using the
112
+ * AST. Covers static `import`/`export ... from`, `import x = require()`, dynamic
113
+ * `import()`, and `require()` call expressions. Because these are structural AST
114
+ * nodes, import-like text appearing inside string literals is never matched.
115
+ */
116
+ function extractImports(filePath, content) {
117
+ const sourceFile = getSharedSourceFile(filePath, content);
118
+ if (!sourceFile)
119
+ return [];
120
+ const imports = [];
121
+ const push = (node, specifier) => {
122
+ const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile));
123
+ imports.push({ specifier, line: line + 1 });
124
+ };
125
+ walkNodes(sourceFile, (node) => {
126
+ // import ... from 'x' / export ... from 'x'
127
+ if ((ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) &&
128
+ node.moduleSpecifier &&
129
+ ts.isStringLiteral(node.moduleSpecifier)) {
130
+ push(node, node.moduleSpecifier.text);
131
+ return;
132
+ }
133
+ // import x = require('x')
134
+ if (ts.isImportEqualsDeclaration(node) &&
135
+ ts.isExternalModuleReference(node.moduleReference) &&
136
+ ts.isStringLiteralLike(node.moduleReference.expression)) {
137
+ push(node, node.moduleReference.expression.text);
138
+ return;
139
+ }
140
+ // dynamic import('x') and require('x')
141
+ if (ts.isCallExpression(node)) {
142
+ const isDynamicImport = node.expression.kind === ts.SyntaxKind.ImportKeyword;
143
+ const isRequire = ts.isIdentifier(node.expression) && node.expression.text === 'require';
144
+ const arg = node.arguments[0];
145
+ if ((isDynamicImport || isRequire) && arg && ts.isStringLiteralLike(arg)) {
146
+ push(node, arg.text);
147
+ }
148
+ }
149
+ });
150
+ return imports;
151
+ }
152
+ /**
153
+ * Find the nearest package.json for a file.
154
+ */
155
+ function findNearestPackageJson(filePath) {
156
+ let dir = path.dirname(filePath);
157
+ // @fitness-ignore-next-line null-safety -- path.parse() always returns object with .root per Node.js API
158
+ const root = path.parse(dir).root;
159
+ while (dir !== root) {
160
+ const pkgPath = path.join(dir, 'package.json');
161
+ if (fs.existsSync(pkgPath)) {
162
+ return pkgPath;
163
+ }
164
+ dir = path.dirname(dir);
165
+ }
166
+ return null;
167
+ }
168
+ /**
169
+ * Read and parse package.json.
170
+ */
171
+ function readPackageJson(pkgPath) {
172
+ try {
173
+ const content = fs.readFileSync(pkgPath, 'utf8');
174
+ return JSON.parse(content);
175
+ }
176
+ catch {
177
+ // @swallow-ok graceful degradation - return sentinel on failure
178
+ return null;
179
+ }
180
+ }
181
+ /**
182
+ * Whether a file may legitimately import `devDependencies`: test files and
183
+ * build/tooling config files, which run only at dev/build time and never ship.
184
+ */
185
+ function allowsDevDependencies(filePath) {
186
+ return (TEST_FILE_PATTERNS.some((pattern) => pattern.test(filePath)) ||
187
+ TOOLING_FILE_PATTERN.test(filePath));
188
+ }
189
+ /**
190
+ * Check if a package is declared in any dependency section.
191
+ */
192
+ function isDeclaredDependency(pkg, packageName, allowDevDeps) {
193
+ if (pkg.dependencies?.[packageName]) {
194
+ return { declared: true, section: 'dependencies' };
195
+ }
196
+ if (pkg.peerDependencies?.[packageName]) {
197
+ return { declared: true, section: 'peerDependencies' };
198
+ }
199
+ if (pkg.optionalDependencies?.[packageName]) {
200
+ return { declared: true, section: 'optionalDependencies' };
201
+ }
202
+ // In dev-only files (tests, build/tooling configs), devDependencies are valid.
203
+ if (allowDevDeps && pkg.devDependencies?.[packageName]) {
204
+ return { declared: true, section: 'devDependencies' };
205
+ }
206
+ // In shipped source, importing a devDependency is a problem (won't ship in prod).
207
+ if (!allowDevDeps && pkg.devDependencies?.[packageName]) {
208
+ return { declared: false, section: 'devDependencies' };
209
+ }
210
+ return { declared: false };
211
+ }
212
+ /** Read + cache a package.json by its resolved path. */
213
+ function getCachedPackageJson(cache, pkgJsonPath) {
214
+ let pkgJson = cache.get(pkgJsonPath);
215
+ if (pkgJson === undefined) {
216
+ pkgJson = readPackageJson(pkgJsonPath);
217
+ cache.set(pkgJsonPath, pkgJson);
218
+ }
219
+ return pkgJson;
220
+ }
221
+ /** Build the violation for a single import, or null when it's fine. */
222
+ function violationForImport(imp, ctx) {
223
+ const { pkgJson, allDeps, allowDevDeps, filePath, pkgJsonPath } = ctx;
224
+ const packageName = extractPackageName(imp.specifier);
225
+ if (!packageName)
226
+ return null;
227
+ // Skip workspace packages (declared via the workspace: protocol)
228
+ if (allDeps[packageName]?.startsWith('workspace:'))
229
+ return null;
230
+ const { declared, section } = isDeclaredDependency(pkgJson, packageName, allowDevDeps);
231
+ if (declared)
232
+ return null;
233
+ const isDevDep = section === 'devDependencies';
234
+ const message = isDevDep
235
+ ? `Source file imports "${packageName}" which is only in devDependencies`
236
+ : `Phantom dependency: "${packageName}" is used but not declared in package.json`;
237
+ const suggestion = isDevDep
238
+ ? `Move "${packageName}" from devDependencies to dependencies in ${path.basename(pkgJsonPath)}`
239
+ : `Add "${packageName}" to dependencies in ${path.basename(pkgJsonPath)}`;
240
+ return {
241
+ filePath,
242
+ line: imp.line,
243
+ message,
244
+ severity: 'error',
245
+ suggestion,
246
+ match: packageName,
247
+ type: 'phantom-dependency',
248
+ };
249
+ }
250
+ /** Collect all phantom/devDep violations for one already-read source file. */
251
+ function collectFileViolations(filePath, content, cache) {
252
+ const imports = extractImports(filePath, content);
253
+ if (imports.length === 0)
254
+ return [];
255
+ const pkgJsonPath = findNearestPackageJson(filePath);
256
+ if (!pkgJsonPath)
257
+ return [];
258
+ const pkgJson = getCachedPackageJson(cache, pkgJsonPath);
259
+ if (!pkgJson)
260
+ return [];
261
+ const allDeps = {
262
+ ...pkgJson.dependencies,
263
+ ...pkgJson.devDependencies,
264
+ ...pkgJson.peerDependencies,
265
+ ...pkgJson.optionalDependencies,
266
+ };
267
+ const allowDevDeps = allowsDevDependencies(filePath);
268
+ const ctx = { pkgJson, allDeps, allowDevDeps, filePath, pkgJsonPath };
269
+ const out = [];
270
+ for (const imp of imports) {
271
+ const violation = violationForImport(imp, ctx);
272
+ if (violation)
273
+ out.push(violation);
274
+ }
275
+ return out;
276
+ }
277
+ /**
278
+ * Check: architecture/phantom-dependency-detection
279
+ *
280
+ * Detects packages that are imported in code but not declared in package.json.
281
+ * This is critical for pnpm which uses strict node_modules isolation.
282
+ *
283
+ * Phantom dependencies can cause:
284
+ * - Runtime failures in pnpm projects (strict node_modules)
285
+ * - Inconsistent behavior between development and production
286
+ * - Version conflicts when the hoisted dependency changes
287
+ */
288
+ export const phantomDependencyDetection = defineCheck({
289
+ id: '67284374-69b8-4711-9c66-33d2ad44ef79',
290
+ slug: 'phantom-dependency-detection',
291
+ scope: { languages: ['typescript'], concerns: ['backend', 'frontend', 'cli'] },
292
+ // AST-based: needs the real source (string stripping would blank module specifiers).
293
+ contentFilter: 'raw',
294
+ confidence: 'medium',
295
+ description: 'Detect phantom dependencies (used but not declared in package.json)',
296
+ longDescription: `**Purpose:** Detects packages imported in source code that are not declared in the nearest \`package.json\`, which is critical under pnpm's strict \`node_modules\` isolation.
297
+
298
+ **Detects:**
299
+ - ES imports (\`import ... from\`), re-exports (\`export ... from\`), \`import x = require()\`, dynamic imports (\`import()\`), and \`require()\` calls referencing external npm packages not listed in \`dependencies\`, \`peerDependencies\`, or \`optionalDependencies\`
300
+ - Shipped source files importing packages only declared in \`devDependencies\` (test files and build/tooling \`*.config.*\` files are exempt — they run only at dev/build time and never ship)
301
+ - Imports are extracted from the TypeScript AST, so import-like text inside string literals, comments, or documentation is never mistaken for a real import; skips Node.js built-ins and workspace packages (detected via \`workspace:*\` protocol)
302
+
303
+ **Why it matters:** Phantom dependencies cause runtime failures in pnpm projects, create inconsistent behavior between dev and production, and introduce fragile version coupling via hoisting.
304
+
305
+ **Scope:** General best practice. Cross-file analysis: extracts imports from each file and resolves them against the nearest \`package.json\`.`,
306
+ timeout: 120_000,
307
+ tags: ['architecture', 'dependencies', 'pnpm'],
308
+ fileTypes: ['ts', 'tsx', 'js', 'jsx'],
309
+ async analyzeAll(files) {
310
+ const violations = [];
311
+ // Cache for package.json contents, keyed by resolved package.json path
312
+ const pkgJsonCache = new Map();
313
+ // @lazy-ok -- validations inside loop depend on file content from await
314
+ for (const filePath of files.paths) {
315
+ try {
316
+ // @fitness-ignore-next-line performance-anti-patterns -- sequential file reading to control memory; FileAccessor is lazy
317
+ const content = await files.read(filePath);
318
+ if (!content)
319
+ continue;
320
+ violations.push(...collectFileViolations(filePath, content, pkgJsonCache));
321
+ }
322
+ catch {
323
+ // @swallow-ok Skip files that can't be read
324
+ continue;
325
+ }
326
+ }
327
+ return violations;
328
+ },
329
+ });
330
+ //# sourceMappingURL=phantom-dependency-detection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phantom-dependency-detection.js","sourceRoot":"","sources":["../../../src/checks/architecture/phantom-dependency-detection.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,sJAAsJ;AACtJ,yHAAyH;AACzH,kIAAkI;AAClI;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,WAAW,EAA0C,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC;;GAEG;AACH,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC;IAC5B,QAA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KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YACnC,IAAI,CAAC;gBACH,yHAAyH;gBACzH,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC3C,IAAI,CAAC,OAAO;oBAAE,SAAS;gBACvB,UAAU,CAAC,IAAI,CAAC,GAAG,qBAAqB,CAAC,QAAQ,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;YAC7E,CAAC;YAAC,MAAM,CAAC;gBACP,4CAA4C;gBAC5C,SAAS;YACX,CAAC;QACH,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @fileoverview TSConfig extends validation
3
+ * @module checks-builtin/checks/architecture/tsconfig-extends-validation
4
+ *
5
+ * Ensures all tsconfig.json files extend a shared base configuration
6
+ * and that the referenced base file exists. Prevents config drift
7
+ * across packages in a monorepo.
8
+ */
9
+ export declare const tsconfigExtendsValidation: import("@opensip-cli/fitness").Check;
10
+ //# sourceMappingURL=tsconfig-extends-validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsconfig-extends-validation.d.ts","sourceRoot":"","sources":["../../../src/checks/architecture/tsconfig-extends-validation.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAOH,eAAO,MAAM,yBAAyB,sCA2EpC,CAAC"}
@@ -0,0 +1,78 @@
1
+ // @fitness-ignore-file batch-operation-limits -- iterates bounded collection (workspace tsconfig files matched by glob; small N per repo)
2
+ // @fitness-ignore-file performance-anti-patterns -- sequential file reads keep memory bounded across tsconfig chains
3
+ /**
4
+ * @fileoverview TSConfig extends validation
5
+ * @module checks-builtin/checks/architecture/tsconfig-extends-validation
6
+ *
7
+ * Ensures all tsconfig.json files extend a shared base configuration
8
+ * and that the referenced base file exists. Prevents config drift
9
+ * across packages in a monorepo.
10
+ */
11
+ import { existsSync } from 'node:fs';
12
+ import { dirname, resolve } from 'node:path';
13
+ import { defineCheck } from '@opensip-cli/fitness';
14
+ export const tsconfigExtendsValidation = defineCheck({
15
+ id: '842e7d00-c8e8-4a57-873a-c03caec7e603',
16
+ slug: 'tsconfig-extends-validation',
17
+ scope: { languages: ['typescript'], concerns: ['backend', 'frontend', 'cli'] },
18
+ confidence: 'high',
19
+ description: 'Ensures all tsconfig.json files extend a shared base and the base file exists',
20
+ tags: ['architecture', 'typescript', 'monorepo'],
21
+ async analyzeAll(files) {
22
+ const violations = [];
23
+ const tsconfigPaths = files.paths.filter((p) => p.endsWith('tsconfig.json') && !p.includes('node_modules'));
24
+ for (const filePath of tsconfigPaths) {
25
+ const content = await files.read(filePath);
26
+ /* v8 ignore next -- defensive guard */
27
+ if (!content)
28
+ continue;
29
+ let parsed;
30
+ try {
31
+ parsed = JSON.parse(content);
32
+ }
33
+ catch {
34
+ violations.push({
35
+ filePath,
36
+ line: 1,
37
+ message: 'Invalid JSON in tsconfig.json',
38
+ severity: 'error',
39
+ type: 'TSCONFIG_INVALID_JSON',
40
+ });
41
+ continue;
42
+ }
43
+ // Root tsconfig doesn't need to extend
44
+ if (filePath === 'tsconfig.json' ||
45
+ (filePath.endsWith('/tsconfig.json') && filePath.split('/').length === 2)) {
46
+ continue;
47
+ }
48
+ const extendsValue = parsed.extends;
49
+ if (!extendsValue || typeof extendsValue !== 'string') {
50
+ violations.push({
51
+ filePath,
52
+ line: 1,
53
+ message: 'tsconfig.json does not extend a base configuration. Add "extends" to ensure consistent compiler options.',
54
+ severity: 'warning',
55
+ suggestion: 'Add "extends": "../../tsconfig.json" (or appropriate relative path to the root tsconfig).',
56
+ type: 'TSCONFIG_NO_EXTENDS',
57
+ });
58
+ continue;
59
+ }
60
+ // Verify the extended file exists
61
+ const dir = dirname(filePath);
62
+ const resolvedBase = resolve(process.cwd(), dir, extendsValue);
63
+ const baseWithJson = resolvedBase.endsWith('.json') ? resolvedBase : `${resolvedBase}.json`;
64
+ if (!existsSync(resolvedBase) && !existsSync(baseWithJson)) {
65
+ violations.push({
66
+ filePath,
67
+ line: 1,
68
+ message: `tsconfig.json extends "${extendsValue}" but the file does not exist at ${resolvedBase}`,
69
+ severity: 'error',
70
+ suggestion: 'Fix the "extends" path or create the missing base tsconfig.',
71
+ type: 'TSCONFIG_MISSING_BASE',
72
+ });
73
+ }
74
+ }
75
+ return violations;
76
+ },
77
+ });
78
+ //# sourceMappingURL=tsconfig-extends-validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsconfig-extends-validation.js","sourceRoot":"","sources":["../../../src/checks/architecture/tsconfig-extends-validation.ts"],"names":[],"mappings":"AAAA,0IAA0I;AAC1I,qHAAqH;AACrH;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,WAAW,EAA0C,MAAM,sBAAsB,CAAC;AAE3F,MAAM,CAAC,MAAM,yBAAyB,GAAG,WAAW,CAAC;IACnD,EAAE,EAAE,sCAAsC;IAC1C,IAAI,EAAE,6BAA6B;IACnC,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE;IAC9E,UAAU,EAAE,MAAM;IAClB,WAAW,EAAE,+EAA+E;IAC5F,IAAI,EAAE,CAAC,cAAc,EAAE,YAAY,EAAE,UAAU,CAAC;IAEhD,KAAK,CAAC,UAAU,CAAC,KAAmB;QAClC,MAAM,UAAU,GAAqB,EAAE,CAAC;QACxC,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CACtC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAClE,CAAC;QAEF,KAAK,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AAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,YAAY,OAAO,CAAC;YAE5F,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;gBAC3D,UAAU,CAAC,IAAI,CAAC;oBACd,QAAQ;oBACR,IAAI,EAAE,CAAC;oBACP,OAAO,EAAE,0BAA0B,YAAY,oCAAoC,YAAY,EAAE;oBACjG,QAAQ,EAAE,OAAO;oBACjB,UAAU,EAAE,6DAA6D;oBACzE,IAAI,EAAE,uBAAuB;iBAC9B,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './architecture/index.js';
2
+ export * from './quality/index.js';
3
+ export * from './resilience/index.js';
4
+ export * from './security/index.js';
5
+ export * from './testing/index.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/checks/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './architecture/index.js';
2
+ export * from './quality/index.js';
3
+ export * from './resilience/index.js';
4
+ export * from './security/index.js';
5
+ export * from './testing/index.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/checks/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @fileoverview API Contract Validation Check
3
+ *
4
+ * Ensures API handlers have proper validation, typed responses, and error handling.
5
+ * Validates that request/response contracts are enforced through types and schemas.
6
+ */
7
+ /**
8
+ * Check: quality/api-contract-validation
9
+ *
10
+ * Validates that API handlers have proper validation, typed responses,
11
+ * and error handling for type safety and reliability.
12
+ *
13
+ */
14
+ export declare const apiContractValidation: import("@opensip-cli/fitness").Check;
15
+ //# sourceMappingURL=api-contract-validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-contract-validation.d.ts","sourceRoot":"","sources":["../../../../src/checks/quality/api/api-contract-validation.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAsTH;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,sCAoChC,CAAC"}