@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 @@
1
+ {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../../../../src/checks/documentation/_directives/eslint.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAkB,MAAM,YAAY,CAAC;AAoLhE,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,aAAa,EAAE,CA0CjB"}
@@ -0,0 +1,168 @@
1
+ /**
2
+ * @fileoverview ESLint directive parser
3
+ * (`eslint-disable`, `eslint-disable-next-line`, `eslint-disable-line`).
4
+ *
5
+ * Extracted from `directive-audit.ts` in Phase C4.
6
+ */
7
+ const ESLINT_DISABLE_NEXT_LINE = 'eslint-disable-next-line';
8
+ const ESLINT_DISABLE_LINE = 'eslint-disable-line';
9
+ function determineESLintScope(text) {
10
+ if (text.includes(ESLINT_DISABLE_NEXT_LINE)) {
11
+ return 'next-line';
12
+ }
13
+ if (text.includes(ESLINT_DISABLE_LINE)) {
14
+ return 'same-line';
15
+ }
16
+ return 'file';
17
+ }
18
+ function parseRulesAndReason(rulesAndReasonRaw) {
19
+ const rulesAndReason = rulesAndReasonRaw?.trim() ?? '';
20
+ const parts = rulesAndReason.split('--');
21
+ const rulesPart = parts[0]?.trim() ?? '';
22
+ const reasonPart = parts[1]?.trim() ?? '';
23
+ const rules = rulesPart
24
+ .split(',')
25
+ .map((r) => r.trim())
26
+ .filter((r) => r && r !== '*');
27
+ return { rules, reason: reasonPart };
28
+ }
29
+ function createESLintDirective(options) {
30
+ const { rule, scope, lineNumber, file, filePath, reason, rawLine } = options;
31
+ return {
32
+ file,
33
+ filePath,
34
+ line: lineNumber,
35
+ source: 'eslint',
36
+ scope,
37
+ rule,
38
+ reason,
39
+ raw: rawLine.trim(),
40
+ };
41
+ }
42
+ function addESLintDirectives(options) {
43
+ const { rulesAndReasonRaw, scope, rawLine, lineNumber, file, filePath, directives } = options;
44
+ if (!Array.isArray(directives)) {
45
+ return;
46
+ }
47
+ const { rules, reason } = parseRulesAndReason(rulesAndReasonRaw);
48
+ if (rules.length === 0) {
49
+ directives.push(createESLintDirective({ rule: '*', scope, lineNumber, file, filePath, reason, rawLine }));
50
+ return;
51
+ }
52
+ for (const rule of rules) {
53
+ directives.push(createESLintDirective({
54
+ rule: `eslint/${rule}`,
55
+ scope,
56
+ lineNumber,
57
+ file,
58
+ filePath,
59
+ reason,
60
+ rawLine,
61
+ }));
62
+ }
63
+ }
64
+ function processESLintBlockComments(options) {
65
+ const { line, lineNumber, file, filePath, directives } = options;
66
+ if (!Array.isArray(directives)) {
67
+ return;
68
+ }
69
+ // Find block comments: /* eslint-disable[-next-line|-line] rules */
70
+ let searchStart = 0;
71
+ while (searchStart < line.length) {
72
+ const blockStart = line.indexOf('/*', searchStart);
73
+ if (blockStart === -1) {
74
+ return;
75
+ }
76
+ const blockEnd = line.indexOf('*/', blockStart + 2);
77
+ if (blockEnd === -1) {
78
+ return;
79
+ }
80
+ const blockContent = line.slice(blockStart + 2, blockEnd);
81
+ // Bounded quantifiers prevent ReDoS.
82
+ const eslintMatch = /\s{0,5}eslint-disable(?:-next-line|-line)?\s{1,5}([^*]{1,500})/.exec(blockContent);
83
+ if (eslintMatch) {
84
+ const scope = determineESLintScope(blockContent);
85
+ addESLintDirectives({
86
+ rulesAndReasonRaw: eslintMatch[1],
87
+ scope,
88
+ rawLine: line,
89
+ lineNumber,
90
+ file,
91
+ filePath,
92
+ directives,
93
+ });
94
+ }
95
+ searchStart = blockEnd + 2;
96
+ }
97
+ }
98
+ function processESLintLineComments(options) {
99
+ const { line, lineNumber, file, filePath, directives } = options;
100
+ if (!Array.isArray(directives)) {
101
+ return;
102
+ }
103
+ // Find line comments: // eslint-disable[-next-line|-line] rules
104
+ const commentStart = line.indexOf('//');
105
+ if (commentStart === -1) {
106
+ return;
107
+ }
108
+ const afterComment = line.slice(commentStart + 2);
109
+ // Bounded quantifiers prevent ReDoS.
110
+ const eslintMatch = /\s{0,5}eslint-disable(?:-next-line|-line)\s{1,5}(.{1,500})$/.exec(afterComment);
111
+ if (eslintMatch) {
112
+ const scope = determineESLintScope(afterComment);
113
+ addESLintDirectives({
114
+ rulesAndReasonRaw: eslintMatch[1],
115
+ scope,
116
+ rawLine: line,
117
+ lineNumber,
118
+ file,
119
+ filePath,
120
+ directives,
121
+ });
122
+ }
123
+ }
124
+ function isFileLevelDisable(line) {
125
+ const pattern = '/* eslint-disable */';
126
+ return line.includes(pattern) || line.includes('/*eslint-disable*/');
127
+ }
128
+ export function parseESLintDirectives(content, filePath, file) {
129
+ const directives = [];
130
+ const lines = content.split('\n');
131
+ for (const [i, line] of lines.entries()) {
132
+ if (line === undefined) {
133
+ continue;
134
+ }
135
+ const lineNumber = i + 1;
136
+ // File-level eslint-disable at start of file (first 50 lines)
137
+ if (i < 50 && isFileLevelDisable(line)) {
138
+ directives.push({
139
+ file,
140
+ filePath,
141
+ line: lineNumber,
142
+ source: 'eslint',
143
+ scope: 'file',
144
+ rule: '*',
145
+ reason: '',
146
+ raw: line.trim(),
147
+ });
148
+ }
149
+ else {
150
+ processESLintBlockComments({
151
+ line,
152
+ lineNumber,
153
+ file,
154
+ filePath,
155
+ directives,
156
+ });
157
+ processESLintLineComments({
158
+ line,
159
+ lineNumber,
160
+ file,
161
+ filePath,
162
+ directives,
163
+ });
164
+ }
165
+ }
166
+ return directives;
167
+ }
168
+ //# sourceMappingURL=eslint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eslint.js","sourceRoot":"","sources":["../../../../src/checks/documentation/_directives/eslint.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAElD,SAAS,oBAAoB,CAAC,IAAY;IACxC,IAAI,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,EAAE,CAAC;QAC5C,OAAO,WAA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AI;gBACJ,UAAU;gBACV,IAAI;gBACJ,QAAQ;gBACR,UAAU;aACX,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @fileoverview Fitness directive parser
3
+ * (`@fitness-ignore-file`, `@fitness-ignore-next-line`).
4
+ *
5
+ * Extracted from `directive-audit.ts` in Phase C4.
6
+ */
7
+ import type { DirectiveInfo } from './types.js';
8
+ export declare function parseFitnessDirectives(content: string, filePath: string, file: string): DirectiveInfo[];
9
+ //# sourceMappingURL=fitness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fitness.d.ts","sourceRoot":"","sources":["../../../../src/checks/documentation/_directives/fitness.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAyDhD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,aAAa,EAAE,CAgBjB"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * @fileoverview Fitness directive parser
3
+ * (`@fitness-ignore-file`, `@fitness-ignore-next-line`).
4
+ *
5
+ * Extracted from `directive-audit.ts` in Phase C4.
6
+ */
7
+ function extractFitnessDirective(line, lineIndex, filePath, file) {
8
+ const fileMarker = '@fitness-ignore-file';
9
+ const nextLineMarker = '@fitness-ignore-next-line';
10
+ let scopeType;
11
+ let markerEnd;
12
+ const fileIdx = line.indexOf(fileMarker);
13
+ const nextLineIdx = line.indexOf(nextLineMarker);
14
+ if (fileIdx !== -1) {
15
+ scopeType = 'file';
16
+ markerEnd = fileIdx + fileMarker.length;
17
+ }
18
+ else if (nextLineIdx === -1) {
19
+ return null;
20
+ }
21
+ else {
22
+ scopeType = 'next-line';
23
+ markerEnd = nextLineIdx + nextLineMarker.length;
24
+ }
25
+ // Extract check ID and reason
26
+ const afterMarker = line.slice(markerEnd).trim();
27
+ const spaceIdx = afterMarker.indexOf(' ');
28
+ if (spaceIdx === -1) {
29
+ return null;
30
+ }
31
+ const checkId = afterMarker.slice(0, spaceIdx);
32
+ const rest = afterMarker.slice(spaceIdx).trim();
33
+ // Look for -- separator
34
+ const separatorIdx = rest.indexOf('--');
35
+ if (separatorIdx === -1) {
36
+ return null;
37
+ }
38
+ const reason = rest.slice(separatorIdx + 2).trim();
39
+ return {
40
+ file,
41
+ filePath,
42
+ line: lineIndex + 1,
43
+ source: 'fitness',
44
+ scope: scopeType,
45
+ rule: `fitness/${checkId}`,
46
+ reason,
47
+ raw: line.trim(),
48
+ };
49
+ }
50
+ export function parseFitnessDirectives(content, filePath, file) {
51
+ const directives = [];
52
+ const lines = content.split('\n');
53
+ for (const [i, line] of lines.entries()) {
54
+ if (line === undefined) {
55
+ continue;
56
+ }
57
+ const directive = extractFitnessDirective(line, i, filePath, file);
58
+ if (directive) {
59
+ directives.push(directive);
60
+ }
61
+ }
62
+ return directives;
63
+ }
64
+ //# sourceMappingURL=fitness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fitness.js","sourceRoot":"","sources":["../../../../src/checks/documentation/_directives/fitness.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,SAAS,uBAAuB,CAC9B,IAAY,EACZ,SAAiB,EACjB,QAAgB,EAChB,IAAY;IAEZ,MAAM,UAAU,GAAG,sBAAsB,CAAC;IAC1C,MAAM,cAAc,GAAG,2BAA2B,CAAC;IAEnD,IAAI,SAA+B,CAAC;IACpC,IAAI,SAAiB,CAAC;IAEtB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACzC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAEjD,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC;QACnB,SAAS,GAAG,MAAM,CAAC;QACnB,SAAS,GAAG,OAAO,GAAG,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,CAAC;IACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAElC,KAAK,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;QACxC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,SAAS;QACX,CAAC;QAED,MAAM,SAAS,GAAG,uBAAuB,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;QACnE,IAAI,SAAS,EAAE,CAAC;YACd,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @fileoverview Graph directive parser
3
+ * (`@graph-ignore-file`, `@graph-ignore-next-line`).
4
+ *
5
+ * Modeled on `./fitness.ts`. Graph rule ids are already namespaced
6
+ * (`graph:<…>`), so the parsed id is used directly as `rule`.
7
+ */
8
+ import type { DirectiveInfo } from './types.js';
9
+ export declare function parseGraphDirectives(content: string, filePath: string, file: string): DirectiveInfo[];
10
+ //# sourceMappingURL=graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../../src/checks/documentation/_directives/graph.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAyDhD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,aAAa,EAAE,CAgBjB"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * @fileoverview Graph directive parser
3
+ * (`@graph-ignore-file`, `@graph-ignore-next-line`).
4
+ *
5
+ * Modeled on `./fitness.ts`. Graph rule ids are already namespaced
6
+ * (`graph:<…>`), so the parsed id is used directly as `rule`.
7
+ */
8
+ function extractGraphDirective(line, lineIndex, filePath, file) {
9
+ const fileMarker = '@graph-ignore-file';
10
+ const nextLineMarker = '@graph-ignore-next-line';
11
+ let scopeType;
12
+ let markerEnd;
13
+ const fileIdx = line.indexOf(fileMarker);
14
+ const nextLineIdx = line.indexOf(nextLineMarker);
15
+ if (fileIdx !== -1) {
16
+ scopeType = 'file';
17
+ markerEnd = fileIdx + fileMarker.length;
18
+ }
19
+ else if (nextLineIdx === -1) {
20
+ return null;
21
+ }
22
+ else {
23
+ scopeType = 'next-line';
24
+ markerEnd = nextLineIdx + nextLineMarker.length;
25
+ }
26
+ // Extract rule id and reason
27
+ const afterMarker = line.slice(markerEnd).trim();
28
+ const spaceIdx = afterMarker.indexOf(' ');
29
+ if (spaceIdx === -1) {
30
+ return null;
31
+ }
32
+ const ruleId = afterMarker.slice(0, spaceIdx);
33
+ const rest = afterMarker.slice(spaceIdx).trim();
34
+ // Look for -- separator
35
+ const separatorIdx = rest.indexOf('--');
36
+ if (separatorIdx === -1) {
37
+ return null;
38
+ }
39
+ const reason = rest.slice(separatorIdx + 2).trim();
40
+ return {
41
+ file,
42
+ filePath,
43
+ line: lineIndex + 1,
44
+ source: 'graph',
45
+ scope: scopeType,
46
+ rule: ruleId,
47
+ reason,
48
+ raw: line.trim(),
49
+ };
50
+ }
51
+ export function parseGraphDirectives(content, filePath, file) {
52
+ const directives = [];
53
+ const lines = content.split('\n');
54
+ for (const [i, line] of lines.entries()) {
55
+ if (line === undefined) {
56
+ continue;
57
+ }
58
+ const directive = extractGraphDirective(line, i, filePath, file);
59
+ if (directive) {
60
+ directives.push(directive);
61
+ }
62
+ }
63
+ return directives;
64
+ }
65
+ //# sourceMappingURL=graph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../../src/checks/documentation/_directives/graph.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,SAAS,qBAAqB,CAC5B,IAAY,EACZ,SAAiB,EACjB,Q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AC,KAAK,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAEnD,OAAO;QACL,IAAI;QACJ,QAAQ;QACR,IAAI,EAAE,SAAS,GAAG,CAAC;QACnB,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,MAAM;QACZ,MAAM;QACN,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE;KACjB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,OAAe,EACf,QAAgB,EAChB,IAAY;IAEZ,MAAM,UAAU,GAAoB,EAAE,CAAC;IACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAElC,KAAK,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;QACxC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,SAAS;QACX,CAAC;QAED,MAAM,SAAS,GAAG,qBAAqB,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;QACjE,IAAI,SAAS,EAAE,CAAC;YACd,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=graph.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.test.d.ts","sourceRoot":"","sources":["../../../../src/checks/documentation/_directives/graph.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Coverage for `parseGraphDirectives` — the graph grammar of the
3
+ * directive-audit parser family (`@graph-ignore-file`,
4
+ * `@graph-ignore-next-line`). Graph rule ids are already `graph:`-namespaced,
5
+ * so the parsed id is used verbatim as `rule` (unlike fitness's `fitness/<id>`
6
+ * prefixing).
7
+ */
8
+ import { describe, expect, it } from 'vitest';
9
+ import { parseGraphDirectives } from './graph.js';
10
+ const FILE = 'src/foo.ts';
11
+ const SHORT = 'foo.ts';
12
+ describe('parseGraphDirectives', () => {
13
+ it('parses a next-line directive into a graph-sourced DirectiveInfo', () => {
14
+ const content = [
15
+ '// @graph-ignore-next-line graph:cycle -- intentional recursion',
16
+ 'function visit() {}',
17
+ ].join('\n');
18
+ const directives = parseGraphDirectives(content, FILE, SHORT);
19
+ expect(directives).toHaveLength(1);
20
+ const d = directives[0];
21
+ expect(d?.source).toBe('graph');
22
+ expect(d?.scope).toBe('next-line');
23
+ expect(d?.rule).toBe('graph:cycle');
24
+ expect(d?.reason).toBe('intentional recursion');
25
+ expect(d?.file).toBe(SHORT);
26
+ expect(d?.filePath).toBe(FILE);
27
+ expect(d?.line).toBe(1);
28
+ });
29
+ it('parses a file-level directive with scope "file"', () => {
30
+ const content = [
31
+ '// @graph-ignore-file graph:wide-function -- generated code',
32
+ 'export const x = 1',
33
+ ].join('\n');
34
+ const directives = parseGraphDirectives(content, FILE, SHORT);
35
+ expect(directives).toHaveLength(1);
36
+ expect(directives[0]?.scope).toBe('file');
37
+ expect(directives[0]?.rule).toBe('graph:wide-function');
38
+ expect(directives[0]?.reason).toBe('generated code');
39
+ });
40
+ it('preserves the full reason text after the -- separator', () => {
41
+ const content = '// @graph-ignore-next-line graph:large-function -- big switch is clearer inline';
42
+ const directives = parseGraphDirectives(content, FILE, SHORT);
43
+ expect(directives[0]?.reason).toBe('big switch is clearer inline');
44
+ });
45
+ it('skips a directive with no -- reason separator (audit requires a reason)', () => {
46
+ const content = '// @graph-ignore-next-line graph:cycle';
47
+ expect(parseGraphDirectives(content, FILE, SHORT)).toHaveLength(0);
48
+ });
49
+ it('returns no directives for content with no graph markers', () => {
50
+ const content = ['function visit() {}', '// @fitness-ignore-next-line some-check -- nope'].join('\n');
51
+ expect(parseGraphDirectives(content, FILE, SHORT)).toHaveLength(0);
52
+ });
53
+ });
54
+ //# sourceMappingURL=graph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O,GAAG,CAAC,qBAAqB,EAAE,iDAAiD,CAAC,CAAC,IAAI,CAC7F,IAAI,CACL,CAAC;QACF,MAAM,CAAC,oBAAoB,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @fileoverview Semgrep directive parser (`nosemgrep`).
3
+ *
4
+ * Extracted from `directive-audit.ts` in Phase C4.
5
+ */
6
+ import type { DirectiveInfo } from './types.js';
7
+ export declare function parseSemgrepDirectives(content: string, filePath: string, file: string): DirectiveInfo[];
8
+ //# sourceMappingURL=semgrep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semgrep.d.ts","sourceRoot":"","sources":["../../../../src/checks/documentation/_directives/semgrep.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAgEhD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,aAAa,EAAE,CAgBjB"}
@@ -0,0 +1,72 @@
1
+ // @fitness-ignore-file semgrep-justifications -- this file's job is to parse nosemgrep directives; example nosemgrep strings appear in JSDoc by necessity
2
+ /**
3
+ * @fileoverview Semgrep directive parser (`nosemgrep`).
4
+ *
5
+ * Extracted from `directive-audit.ts` in Phase C4.
6
+ */
7
+ /**
8
+ * Extract semgrep rule ID and reason from a nosemgrep directive line.
9
+ *
10
+ * Formats:
11
+ * - `// nosemgrep: rule.id -- reason`
12
+ * - `// nosemgrep: rule.id`
13
+ * - `// nosemgrep`
14
+ */
15
+ function extractSemgrepDirective(line, lineIndex, filePath, file) {
16
+ const nosemgrepMarker = 'nosemgrep';
17
+ // Find the nosemgrep marker in a comment
18
+ const commentIdx = line.indexOf('//');
19
+ if (commentIdx === -1) {
20
+ return null;
21
+ }
22
+ const afterComment = line.slice(commentIdx + 2).trim();
23
+ if (!afterComment.startsWith(nosemgrepMarker)) {
24
+ return null;
25
+ }
26
+ const afterMarker = afterComment.slice(nosemgrepMarker.length);
27
+ // Extract rule ID and reason
28
+ let ruleId = '*'; // Default to all rules
29
+ let reason = '';
30
+ // Check for : separator (rule ID follows)
31
+ if (afterMarker.startsWith(':')) {
32
+ const afterColon = afterMarker.slice(1).trim();
33
+ // Check for -- separator (reason follows)
34
+ const reasonSeparator = afterColon.indexOf('--');
35
+ if (reasonSeparator === -1) {
36
+ ruleId = afterColon.trim() || '*';
37
+ }
38
+ else {
39
+ ruleId = afterColon.slice(0, reasonSeparator).trim() || '*';
40
+ reason = afterColon.slice(reasonSeparator + 2).trim();
41
+ }
42
+ }
43
+ else if (afterMarker.trim().startsWith('--')) {
44
+ // Just a reason, no rule ID
45
+ reason = afterMarker.trim().slice(2).trim();
46
+ }
47
+ return {
48
+ file,
49
+ filePath,
50
+ line: lineIndex + 1,
51
+ source: 'semgrep',
52
+ scope: 'next-line',
53
+ rule: `semgrep/${ruleId}`,
54
+ reason,
55
+ raw: line.trim(),
56
+ };
57
+ }
58
+ export function parseSemgrepDirectives(content, filePath, file) {
59
+ const directives = [];
60
+ const lines = content.split('\n');
61
+ for (const [i, line] of lines.entries()) {
62
+ if (line === undefined) {
63
+ continue;
64
+ }
65
+ const directive = extractSemgrepDirective(line, i, filePath, file);
66
+ if (directive) {
67
+ directives.push(directive);
68
+ }
69
+ }
70
+ return directives;
71
+ }
72
+ //# sourceMappingURL=semgrep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semgrep.js","sourceRoot":"","sources":["../../../../src/checks/documentation/_directives/semgrep.ts"],"names":[],"mappings":"AAAA,0JAA0J;AAC1J;;;;GAIG;AAIH;;;;;;;GAOG;AACH,SAAS,uBAAuB,CAC9B,IAAY,EACZ,SAAiB,EACjB,QAAgB,EAChB,IAAY;IAEZ,MAAM,e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AAC;QAC/C,4BAA4B;QAC5B,MAAM,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9C,CAAC;IAED,OAAO;QACL,IAAI;QACJ,QAAQ;QACR,IAAI,EAAE,SAAS,GAAG,CAAC;QACnB,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,WAAW,MAAM,EAAE;QACzB,MAAM;QACN,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE;KACjB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,OAAe,EACf,QAAgB,EAChB,IAAY;IAEZ,MAAM,UAAU,GAAoB,EAAE,CAAC;IACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAElC,KAAK,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;QACxC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,SAAS;QACX,CAAC;QAED,MAAM,SAAS,GAAG,uBAAuB,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;QACnE,IAAI,SAAS,EAAE,CAAC;YACd,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @fileoverview Shared directive parser types.
3
+ *
4
+ * The directive-audit check delegates per-grammar parsing to the
5
+ * sibling modules in this folder. They share the `DirectiveInfo`
6
+ * shape so the audit can sort and emit them uniformly.
7
+ */
8
+ type DirectiveSource = 'typescript' | 'eslint' | 'fitness' | 'semgrep' | 'graph';
9
+ export type DirectiveScope = 'file' | 'next-line' | 'same-line';
10
+ export interface DirectiveInfo {
11
+ file: string;
12
+ filePath: string;
13
+ line: number;
14
+ source: DirectiveSource;
15
+ scope: DirectiveScope;
16
+ rule: string;
17
+ reason: string;
18
+ raw: string;
19
+ }
20
+ export {};
21
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/checks/documentation/_directives/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,KAAK,eAAe,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AACjF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,CAAC;AAEhE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,cAAc,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @fileoverview Shared directive parser types.
3
+ *
4
+ * The directive-audit check delegates per-grammar parsing to the
5
+ * sibling modules in this folder. They share the `DirectiveInfo`
6
+ * shape so the audit can sort and emit them uniformly.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/checks/documentation/_directives/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @fileoverview TypeScript directive parser (`@ts-expect-error`, etc.).
3
+ *
4
+ * Extracted from `directive-audit.ts` in Phase C4 — the parsers used
5
+ * to live inline in the check, but the four grammars are best read
6
+ * (and tested) as siblings.
7
+ */
8
+ import type { DirectiveInfo } from './types.js';
9
+ export declare function parseTypeScriptDirectives(content: string, filePath: string, file: string): DirectiveInfo[];
10
+ //# sourceMappingURL=typescript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../../src/checks/documentation/_directives/typescript.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAiChD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,aAAa,EAAE,CAuBjB"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @fileoverview TypeScript directive parser (`@ts-expect-error`, etc.).
3
+ *
4
+ * Extracted from `directive-audit.ts` in Phase C4 — the parsers used
5
+ * to live inline in the check, but the four grammars are best read
6
+ * (and tested) as siblings.
7
+ */
8
+ const TS_DIRECTIVE_KEYWORD = '@ts-expect-error';
9
+ const TS_EXPECT_ERROR_KEYWORD = '@ts-expect-error';
10
+ function extractTsDirectiveAndReason(line) {
11
+ let directiveStart = line.indexOf(TS_DIRECTIVE_KEYWORD);
12
+ let directive = TS_DIRECTIVE_KEYWORD;
13
+ if (directiveStart === -1) {
14
+ directiveStart = line.indexOf(TS_EXPECT_ERROR_KEYWORD);
15
+ directive = TS_EXPECT_ERROR_KEYWORD;
16
+ }
17
+ if (directiveStart === -1) {
18
+ return null;
19
+ }
20
+ // Must be in a `//` comment.
21
+ const beforeDirective = line.slice(0, directiveStart);
22
+ if (!beforeDirective.includes('//')) {
23
+ return null;
24
+ }
25
+ // Extract reason after directive (after : or - or em-dash).
26
+ // Bounded quantifiers prevent ReDoS.
27
+ const afterDirective = line.slice(directiveStart + directive.length);
28
+ const separatorMatch = /^\s{0,5}[:-—]\s{0,5}(.{0,500})/.exec(afterDirective);
29
+ const reason = separatorMatch?.[1]?.trim() ?? '';
30
+ return { directive, reason };
31
+ }
32
+ export function parseTypeScriptDirectives(content, filePath, file) {
33
+ const directives = [];
34
+ const lines = content.split('\n');
35
+ for (const [i, line] of lines.entries()) {
36
+ if (line === undefined)
37
+ continue;
38
+ const result = extractTsDirectiveAndReason(line);
39
+ if (result) {
40
+ directives.push({
41
+ file,
42
+ filePath,
43
+ line: i + 1,
44
+ source: 'typescript',
45
+ scope: 'next-line',
46
+ rule: result.directive,
47
+ reason: result.reason,
48
+ raw: line.trim(),
49
+ });
50
+ }
51
+ }
52
+ return directives;
53
+ }
54
+ //# sourceMappingURL=typescript.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../../src/checks/documentation/_directives/typescript.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;AAChD,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAEnD,SAAS,2BAA2B,CAAC,IAAY;IAC/C,IAAI,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACxD,IAAI,SAAS,GAAG,oBAAoB,CAAC;IAErC,IAAI,cAAc,KAAK,CAAC,CAAC,EAAE,CAAC;QAC1B,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;QACvD,SAAS,GAAG,uBAAuB,CAAC;IACtC,CAAC;IAED,IAAI,cAAc,KAAK,CAAC,CAAC,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,6BAA6B;IAC7B,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;IACtD,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,4DAA4D;IAC5D,qCAAqC;IACrC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;IACrE,MAAM,cAAc,GAAG,gCAAgC,CAAC,IAAI,CAAC,cAAc,CAAC,CAA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