@memberjunction/react-test-harness 5.37.0 → 5.38.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 (342) hide show
  1. package/README.md +30 -0
  2. package/dist/cli/index.js +5 -1
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/index.d.ts +1 -5
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +10 -5
  7. package/dist/index.js.map +1 -1
  8. package/dist/lib/browser-context.d.ts +43 -0
  9. package/dist/lib/browser-context.d.ts.map +1 -1
  10. package/dist/lib/browser-context.js +87 -12
  11. package/dist/lib/browser-context.js.map +1 -1
  12. package/dist/lib/component-runner.d.ts +11 -22
  13. package/dist/lib/component-runner.d.ts.map +1 -1
  14. package/dist/lib/component-runner.js +1 -1
  15. package/dist/lib/component-runner.js.map +1 -1
  16. package/dist/lib/linter-test-tool.js +1 -1
  17. package/dist/lib/linter-test-tool.js.map +1 -1
  18. package/dist/lib/test-harness.d.ts +10 -0
  19. package/dist/lib/test-harness.d.ts.map +1 -1
  20. package/dist/lib/test-harness.js +10 -0
  21. package/dist/lib/test-harness.js.map +1 -1
  22. package/package.json +14 -13
  23. package/dist/lib/component-linter.d.ts +0 -77
  24. package/dist/lib/component-linter.d.ts.map +0 -1
  25. package/dist/lib/component-linter.js +0 -1205
  26. package/dist/lib/component-linter.js.map +0 -1
  27. package/dist/lib/control-flow-analyzer.d.ts +0 -184
  28. package/dist/lib/control-flow-analyzer.d.ts.map +0 -1
  29. package/dist/lib/control-flow-analyzer.js +0 -798
  30. package/dist/lib/control-flow-analyzer.js.map +0 -1
  31. package/dist/lib/library-lint-cache.d.ts +0 -50
  32. package/dist/lib/library-lint-cache.d.ts.map +0 -1
  33. package/dist/lib/library-lint-cache.js +0 -173
  34. package/dist/lib/library-lint-cache.js.map +0 -1
  35. package/dist/lib/lint-rule.d.ts +0 -70
  36. package/dist/lib/lint-rule.d.ts.map +0 -1
  37. package/dist/lib/lint-rule.js +0 -41
  38. package/dist/lib/lint-rule.js.map +0 -1
  39. package/dist/lib/lint-utils.d.ts +0 -131
  40. package/dist/lib/lint-utils.d.ts.map +0 -1
  41. package/dist/lib/lint-utils.js +0 -358
  42. package/dist/lib/lint-utils.js.map +0 -1
  43. package/dist/lib/prop-value-extractor.d.ts +0 -147
  44. package/dist/lib/prop-value-extractor.d.ts.map +0 -1
  45. package/dist/lib/prop-value-extractor.js +0 -472
  46. package/dist/lib/prop-value-extractor.js.map +0 -1
  47. package/dist/lib/runtime-rules/ai-tools-availability-check.d.ts +0 -9
  48. package/dist/lib/runtime-rules/ai-tools-availability-check.d.ts.map +0 -1
  49. package/dist/lib/runtime-rules/ai-tools-availability-check.js +0 -223
  50. package/dist/lib/runtime-rules/ai-tools-availability-check.js.map +0 -1
  51. package/dist/lib/runtime-rules/callback-event-validation.d.ts +0 -22
  52. package/dist/lib/runtime-rules/callback-event-validation.d.ts.map +0 -1
  53. package/dist/lib/runtime-rules/callback-event-validation.js +0 -561
  54. package/dist/lib/runtime-rules/callback-event-validation.js.map +0 -1
  55. package/dist/lib/runtime-rules/chart-field-validation.d.ts +0 -10
  56. package/dist/lib/runtime-rules/chart-field-validation.d.ts.map +0 -1
  57. package/dist/lib/runtime-rules/chart-field-validation.js +0 -270
  58. package/dist/lib/runtime-rules/chart-field-validation.js.map +0 -1
  59. package/dist/lib/runtime-rules/child-component-prop-validation.d.ts +0 -10
  60. package/dist/lib/runtime-rules/child-component-prop-validation.d.ts.map +0 -1
  61. package/dist/lib/runtime-rules/child-component-prop-validation.js +0 -443
  62. package/dist/lib/runtime-rules/child-component-prop-validation.js.map +0 -1
  63. package/dist/lib/runtime-rules/component-name-mismatch.d.ts +0 -19
  64. package/dist/lib/runtime-rules/component-name-mismatch.d.ts.map +0 -1
  65. package/dist/lib/runtime-rules/component-name-mismatch.js +0 -82
  66. package/dist/lib/runtime-rules/component-name-mismatch.js.map +0 -1
  67. package/dist/lib/runtime-rules/component-not-in-dependencies.d.ts +0 -20
  68. package/dist/lib/runtime-rules/component-not-in-dependencies.d.ts.map +0 -1
  69. package/dist/lib/runtime-rules/component-not-in-dependencies.js +0 -92
  70. package/dist/lib/runtime-rules/component-not-in-dependencies.js.map +0 -1
  71. package/dist/lib/runtime-rules/component-props-validation.d.ts +0 -25
  72. package/dist/lib/runtime-rules/component-props-validation.d.ts.map +0 -1
  73. package/dist/lib/runtime-rules/component-props-validation.js +0 -228
  74. package/dist/lib/runtime-rules/component-props-validation.js.map +0 -1
  75. package/dist/lib/runtime-rules/component-usage-without-destructuring.d.ts +0 -20
  76. package/dist/lib/runtime-rules/component-usage-without-destructuring.d.ts.map +0 -1
  77. package/dist/lib/runtime-rules/component-usage-without-destructuring.js +0 -124
  78. package/dist/lib/runtime-rules/component-usage-without-destructuring.js.map +0 -1
  79. package/dist/lib/runtime-rules/data-result-validation.d.ts +0 -9
  80. package/dist/lib/runtime-rules/data-result-validation.d.ts.map +0 -1
  81. package/dist/lib/runtime-rules/data-result-validation.js +0 -763
  82. package/dist/lib/runtime-rules/data-result-validation.js.map +0 -1
  83. package/dist/lib/runtime-rules/datagrid-field-validation.d.ts +0 -10
  84. package/dist/lib/runtime-rules/datagrid-field-validation.d.ts.map +0 -1
  85. package/dist/lib/runtime-rules/datagrid-field-validation.js +0 -249
  86. package/dist/lib/runtime-rules/datagrid-field-validation.js.map +0 -1
  87. package/dist/lib/runtime-rules/dependency-shadowing.d.ts +0 -20
  88. package/dist/lib/runtime-rules/dependency-shadowing.d.ts.map +0 -1
  89. package/dist/lib/runtime-rules/dependency-shadowing.js +0 -147
  90. package/dist/lib/runtime-rules/dependency-shadowing.js.map +0 -1
  91. package/dist/lib/runtime-rules/entity-field-access-validation.d.ts +0 -12
  92. package/dist/lib/runtime-rules/entity-field-access-validation.d.ts.map +0 -1
  93. package/dist/lib/runtime-rules/entity-field-access-validation.js +0 -304
  94. package/dist/lib/runtime-rules/entity-field-access-validation.js.map +0 -1
  95. package/dist/lib/runtime-rules/event-parameter-validation.d.ts +0 -22
  96. package/dist/lib/runtime-rules/event-parameter-validation.d.ts.map +0 -1
  97. package/dist/lib/runtime-rules/event-parameter-validation.js +0 -406
  98. package/dist/lib/runtime-rules/event-parameter-validation.js.map +0 -1
  99. package/dist/lib/runtime-rules/index.d.ts +0 -61
  100. package/dist/lib/runtime-rules/index.d.ts.map +0 -1
  101. package/dist/lib/runtime-rules/index.js +0 -62
  102. package/dist/lib/runtime-rules/index.js.map +0 -1
  103. package/dist/lib/runtime-rules/library-variable-names.d.ts +0 -24
  104. package/dist/lib/runtime-rules/library-variable-names.d.ts.map +0 -1
  105. package/dist/lib/runtime-rules/library-variable-names.js +0 -88
  106. package/dist/lib/runtime-rules/library-variable-names.js.map +0 -1
  107. package/dist/lib/runtime-rules/no-child-implementation.d.ts +0 -18
  108. package/dist/lib/runtime-rules/no-child-implementation.d.ts.map +0 -1
  109. package/dist/lib/runtime-rules/no-child-implementation.js +0 -57
  110. package/dist/lib/runtime-rules/no-child-implementation.js.map +0 -1
  111. package/dist/lib/runtime-rules/no-data-prop.d.ts +0 -22
  112. package/dist/lib/runtime-rules/no-data-prop.d.ts.map +0 -1
  113. package/dist/lib/runtime-rules/no-data-prop.js +0 -111
  114. package/dist/lib/runtime-rules/no-data-prop.js.map +0 -1
  115. package/dist/lib/runtime-rules/no-export-statements.d.ts +0 -18
  116. package/dist/lib/runtime-rules/no-export-statements.d.ts.map +0 -1
  117. package/dist/lib/runtime-rules/no-export-statements.js +0 -143
  118. package/dist/lib/runtime-rules/no-export-statements.js.map +0 -1
  119. package/dist/lib/runtime-rules/no-iife-wrapper.d.ts +0 -18
  120. package/dist/lib/runtime-rules/no-iife-wrapper.d.ts.map +0 -1
  121. package/dist/lib/runtime-rules/no-iife-wrapper.js +0 -217
  122. package/dist/lib/runtime-rules/no-iife-wrapper.js.map +0 -1
  123. package/dist/lib/runtime-rules/no-import-statements.d.ts +0 -18
  124. package/dist/lib/runtime-rules/no-import-statements.d.ts.map +0 -1
  125. package/dist/lib/runtime-rules/no-import-statements.js +0 -65
  126. package/dist/lib/runtime-rules/no-import-statements.js.map +0 -1
  127. package/dist/lib/runtime-rules/no-react-destructuring.d.ts +0 -18
  128. package/dist/lib/runtime-rules/no-react-destructuring.d.ts.map +0 -1
  129. package/dist/lib/runtime-rules/no-react-destructuring.js +0 -60
  130. package/dist/lib/runtime-rules/no-react-destructuring.js.map +0 -1
  131. package/dist/lib/runtime-rules/no-require-statements.d.ts +0 -18
  132. package/dist/lib/runtime-rules/no-require-statements.d.ts.map +0 -1
  133. package/dist/lib/runtime-rules/no-require-statements.js +0 -109
  134. package/dist/lib/runtime-rules/no-require-statements.js.map +0 -1
  135. package/dist/lib/runtime-rules/no-return-component.d.ts +0 -18
  136. package/dist/lib/runtime-rules/no-return-component.d.ts.map +0 -1
  137. package/dist/lib/runtime-rules/no-return-component.js +0 -106
  138. package/dist/lib/runtime-rules/no-return-component.js.map +0 -1
  139. package/dist/lib/runtime-rules/no-unwrap-utility-libs.d.ts +0 -20
  140. package/dist/lib/runtime-rules/no-unwrap-utility-libs.d.ts.map +0 -1
  141. package/dist/lib/runtime-rules/no-unwrap-utility-libs.js +0 -75
  142. package/dist/lib/runtime-rules/no-unwrap-utility-libs.js.map +0 -1
  143. package/dist/lib/runtime-rules/no-use-reducer.d.ts +0 -19
  144. package/dist/lib/runtime-rules/no-use-reducer.d.ts.map +0 -1
  145. package/dist/lib/runtime-rules/no-use-reducer.js +0 -78
  146. package/dist/lib/runtime-rules/no-use-reducer.js.map +0 -1
  147. package/dist/lib/runtime-rules/no-window-access.d.ts +0 -23
  148. package/dist/lib/runtime-rules/no-window-access.d.ts.map +0 -1
  149. package/dist/lib/runtime-rules/no-window-access.js +0 -136
  150. package/dist/lib/runtime-rules/no-window-access.js.map +0 -1
  151. package/dist/lib/runtime-rules/noisy-settings-updates.d.ts +0 -18
  152. package/dist/lib/runtime-rules/noisy-settings-updates.d.ts.map +0 -1
  153. package/dist/lib/runtime-rules/noisy-settings-updates.js +0 -110
  154. package/dist/lib/runtime-rules/noisy-settings-updates.js.map +0 -1
  155. package/dist/lib/runtime-rules/overflow-hidden-on-layout-container.d.ts +0 -30
  156. package/dist/lib/runtime-rules/overflow-hidden-on-layout-container.d.ts.map +0 -1
  157. package/dist/lib/runtime-rules/overflow-hidden-on-layout-container.js +0 -220
  158. package/dist/lib/runtime-rules/overflow-hidden-on-layout-container.js.map +0 -1
  159. package/dist/lib/runtime-rules/pass-standard-props.d.ts +0 -19
  160. package/dist/lib/runtime-rules/pass-standard-props.d.ts.map +0 -1
  161. package/dist/lib/runtime-rules/pass-standard-props.js +0 -82
  162. package/dist/lib/runtime-rules/pass-standard-props.js.map +0 -1
  163. package/dist/lib/runtime-rules/prefer-async-await.d.ts +0 -17
  164. package/dist/lib/runtime-rules/prefer-async-await.d.ts.map +0 -1
  165. package/dist/lib/runtime-rules/prefer-async-await.js +0 -52
  166. package/dist/lib/runtime-rules/prefer-async-await.js.map +0 -1
  167. package/dist/lib/runtime-rules/prefer-jsx-syntax.d.ts +0 -17
  168. package/dist/lib/runtime-rules/prefer-jsx-syntax.d.ts.map +0 -1
  169. package/dist/lib/runtime-rules/prefer-jsx-syntax.js +0 -51
  170. package/dist/lib/runtime-rules/prefer-jsx-syntax.js.map +0 -1
  171. package/dist/lib/runtime-rules/prop-state-sync.d.ts +0 -19
  172. package/dist/lib/runtime-rules/prop-state-sync.d.ts.map +0 -1
  173. package/dist/lib/runtime-rules/prop-state-sync.js +0 -76
  174. package/dist/lib/runtime-rules/prop-state-sync.js.map +0 -1
  175. package/dist/lib/runtime-rules/property-name-consistency.d.ts +0 -20
  176. package/dist/lib/runtime-rules/property-name-consistency.d.ts.map +0 -1
  177. package/dist/lib/runtime-rules/property-name-consistency.js +0 -172
  178. package/dist/lib/runtime-rules/property-name-consistency.js.map +0 -1
  179. package/dist/lib/runtime-rules/query-result-field-access-validation.d.ts +0 -10
  180. package/dist/lib/runtime-rules/query-result-field-access-validation.d.ts.map +0 -1
  181. package/dist/lib/runtime-rules/query-result-field-access-validation.js +0 -304
  182. package/dist/lib/runtime-rules/query-result-field-access-validation.js.map +0 -1
  183. package/dist/lib/runtime-rules/react-component-naming.d.ts +0 -19
  184. package/dist/lib/runtime-rules/react-component-naming.d.ts.map +0 -1
  185. package/dist/lib/runtime-rules/react-component-naming.js +0 -72
  186. package/dist/lib/runtime-rules/react-component-naming.js.map +0 -1
  187. package/dist/lib/runtime-rules/react-hooks-rules.d.ts +0 -27
  188. package/dist/lib/runtime-rules/react-hooks-rules.d.ts.map +0 -1
  189. package/dist/lib/runtime-rules/react-hooks-rules.js +0 -223
  190. package/dist/lib/runtime-rules/react-hooks-rules.js.map +0 -1
  191. package/dist/lib/runtime-rules/required-queries-not-called.d.ts +0 -19
  192. package/dist/lib/runtime-rules/required-queries-not-called.d.ts.map +0 -1
  193. package/dist/lib/runtime-rules/required-queries-not-called.js +0 -146
  194. package/dist/lib/runtime-rules/required-queries-not-called.js.map +0 -1
  195. package/dist/lib/runtime-rules/runquery-call-validation.d.ts +0 -11
  196. package/dist/lib/runtime-rules/runquery-call-validation.d.ts.map +0 -1
  197. package/dist/lib/runtime-rules/runquery-call-validation.js +0 -886
  198. package/dist/lib/runtime-rules/runquery-call-validation.js.map +0 -1
  199. package/dist/lib/runtime-rules/runview-call-validation.d.ts +0 -10
  200. package/dist/lib/runtime-rules/runview-call-validation.d.ts.map +0 -1
  201. package/dist/lib/runtime-rules/runview-call-validation.js +0 -336
  202. package/dist/lib/runtime-rules/runview-call-validation.js.map +0 -1
  203. package/dist/lib/runtime-rules/saved-user-settings-pattern.d.ts +0 -19
  204. package/dist/lib/runtime-rules/saved-user-settings-pattern.d.ts.map +0 -1
  205. package/dist/lib/runtime-rules/saved-user-settings-pattern.js +0 -90
  206. package/dist/lib/runtime-rules/saved-user-settings-pattern.js.map +0 -1
  207. package/dist/lib/runtime-rules/search-availability-check.d.ts +0 -9
  208. package/dist/lib/runtime-rules/search-availability-check.d.ts.map +0 -1
  209. package/dist/lib/runtime-rules/search-availability-check.js +0 -220
  210. package/dist/lib/runtime-rules/search-availability-check.js.map +0 -1
  211. package/dist/lib/runtime-rules/search-call-validation.d.ts +0 -9
  212. package/dist/lib/runtime-rules/search-call-validation.d.ts.map +0 -1
  213. package/dist/lib/runtime-rules/search-call-validation.js +0 -336
  214. package/dist/lib/runtime-rules/search-call-validation.js.map +0 -1
  215. package/dist/lib/runtime-rules/server-reload-on-client-operation.d.ts +0 -18
  216. package/dist/lib/runtime-rules/server-reload-on-client-operation.d.ts.map +0 -1
  217. package/dist/lib/runtime-rules/server-reload-on-client-operation.js +0 -107
  218. package/dist/lib/runtime-rules/server-reload-on-client-operation.js.map +0 -1
  219. package/dist/lib/runtime-rules/single-function-only.d.ts +0 -18
  220. package/dist/lib/runtime-rules/single-function-only.d.ts.map +0 -1
  221. package/dist/lib/runtime-rules/single-function-only.js +0 -103
  222. package/dist/lib/runtime-rules/single-function-only.js.map +0 -1
  223. package/dist/lib/runtime-rules/string-replace-all-occurrences.d.ts +0 -19
  224. package/dist/lib/runtime-rules/string-replace-all-occurrences.d.ts.map +0 -1
  225. package/dist/lib/runtime-rules/string-replace-all-occurrences.js +0 -109
  226. package/dist/lib/runtime-rules/string-replace-all-occurrences.js.map +0 -1
  227. package/dist/lib/runtime-rules/string-template-validation.d.ts +0 -22
  228. package/dist/lib/runtime-rules/string-template-validation.d.ts.map +0 -1
  229. package/dist/lib/runtime-rules/string-template-validation.js +0 -163
  230. package/dist/lib/runtime-rules/string-template-validation.js.map +0 -1
  231. package/dist/lib/runtime-rules/styles-validation.d.ts +0 -10
  232. package/dist/lib/runtime-rules/styles-validation.d.ts.map +0 -1
  233. package/dist/lib/runtime-rules/styles-validation.js +0 -153
  234. package/dist/lib/runtime-rules/styles-validation.js.map +0 -1
  235. package/dist/lib/runtime-rules/type-inference-errors.d.ts +0 -23
  236. package/dist/lib/runtime-rules/type-inference-errors.d.ts.map +0 -1
  237. package/dist/lib/runtime-rules/type-inference-errors.js +0 -53
  238. package/dist/lib/runtime-rules/type-inference-errors.js.map +0 -1
  239. package/dist/lib/runtime-rules/type-mismatch-operation.d.ts +0 -23
  240. package/dist/lib/runtime-rules/type-mismatch-operation.d.ts.map +0 -1
  241. package/dist/lib/runtime-rules/type-mismatch-operation.js +0 -141
  242. package/dist/lib/runtime-rules/type-mismatch-operation.js.map +0 -1
  243. package/dist/lib/runtime-rules/undefined-component-usage.d.ts +0 -20
  244. package/dist/lib/runtime-rules/undefined-component-usage.d.ts.map +0 -1
  245. package/dist/lib/runtime-rules/undefined-component-usage.js +0 -138
  246. package/dist/lib/runtime-rules/undefined-component-usage.js.map +0 -1
  247. package/dist/lib/runtime-rules/undefined-jsx-component.d.ts +0 -25
  248. package/dist/lib/runtime-rules/undefined-jsx-component.d.ts.map +0 -1
  249. package/dist/lib/runtime-rules/undefined-jsx-component.js +0 -269
  250. package/dist/lib/runtime-rules/undefined-jsx-component.js.map +0 -1
  251. package/dist/lib/runtime-rules/unsafe-array-operations.d.ts +0 -25
  252. package/dist/lib/runtime-rules/unsafe-array-operations.d.ts.map +0 -1
  253. package/dist/lib/runtime-rules/unsafe-array-operations.js +0 -347
  254. package/dist/lib/runtime-rules/unsafe-array-operations.js.map +0 -1
  255. package/dist/lib/runtime-rules/unsafe-formatting-methods.d.ts +0 -24
  256. package/dist/lib/runtime-rules/unsafe-formatting-methods.d.ts.map +0 -1
  257. package/dist/lib/runtime-rules/unsafe-formatting-methods.js +0 -277
  258. package/dist/lib/runtime-rules/unsafe-formatting-methods.js.map +0 -1
  259. package/dist/lib/runtime-rules/unused-component-dependencies.d.ts +0 -19
  260. package/dist/lib/runtime-rules/unused-component-dependencies.d.ts.map +0 -1
  261. package/dist/lib/runtime-rules/unused-component-dependencies.js +0 -90
  262. package/dist/lib/runtime-rules/unused-component-dependencies.js.map +0 -1
  263. package/dist/lib/runtime-rules/unused-libraries.d.ts +0 -19
  264. package/dist/lib/runtime-rules/unused-libraries.d.ts.map +0 -1
  265. package/dist/lib/runtime-rules/unused-libraries.js +0 -127
  266. package/dist/lib/runtime-rules/unused-libraries.js.map +0 -1
  267. package/dist/lib/runtime-rules/use-function-declaration.d.ts +0 -18
  268. package/dist/lib/runtime-rules/use-function-declaration.d.ts.map +0 -1
  269. package/dist/lib/runtime-rules/use-function-declaration.js +0 -127
  270. package/dist/lib/runtime-rules/use-function-declaration.js.map +0 -1
  271. package/dist/lib/runtime-rules/use-unwrap-components.d.ts +0 -19
  272. package/dist/lib/runtime-rules/use-unwrap-components.d.ts.map +0 -1
  273. package/dist/lib/runtime-rules/use-unwrap-components.js +0 -84
  274. package/dist/lib/runtime-rules/use-unwrap-components.js.map +0 -1
  275. package/dist/lib/runtime-rules/useeffect-unstable-dependencies.d.ts +0 -23
  276. package/dist/lib/runtime-rules/useeffect-unstable-dependencies.d.ts.map +0 -1
  277. package/dist/lib/runtime-rules/useeffect-unstable-dependencies.js +0 -215
  278. package/dist/lib/runtime-rules/useeffect-unstable-dependencies.js.map +0 -1
  279. package/dist/lib/runtime-rules/utilities-api-validation.d.ts +0 -24
  280. package/dist/lib/runtime-rules/utilities-api-validation.d.ts.map +0 -1
  281. package/dist/lib/runtime-rules/utilities-api-validation.js +0 -121
  282. package/dist/lib/runtime-rules/utilities-api-validation.js.map +0 -1
  283. package/dist/lib/runtime-rules/utilities-no-direct-instantiation.d.ts +0 -20
  284. package/dist/lib/runtime-rules/utilities-no-direct-instantiation.d.ts.map +0 -1
  285. package/dist/lib/runtime-rules/utilities-no-direct-instantiation.js +0 -58
  286. package/dist/lib/runtime-rules/utilities-no-direct-instantiation.js.map +0 -1
  287. package/dist/lib/runtime-rules/validate-component-references.d.ts +0 -19
  288. package/dist/lib/runtime-rules/validate-component-references.d.ts.map +0 -1
  289. package/dist/lib/runtime-rules/validate-component-references.js +0 -255
  290. package/dist/lib/runtime-rules/validate-component-references.js.map +0 -1
  291. package/dist/lib/schema-validation/component-prop-rule.d.ts +0 -125
  292. package/dist/lib/schema-validation/component-prop-rule.d.ts.map +0 -1
  293. package/dist/lib/schema-validation/component-prop-rule.js +0 -624
  294. package/dist/lib/schema-validation/component-prop-rule.js.map +0 -1
  295. package/dist/lib/schema-validation/index.d.ts +0 -26
  296. package/dist/lib/schema-validation/index.d.ts.map +0 -1
  297. package/dist/lib/schema-validation/index.js +0 -26
  298. package/dist/lib/schema-validation/index.js.map +0 -1
  299. package/dist/lib/schema-validation/semantic-validators/index.d.ts +0 -23
  300. package/dist/lib/schema-validation/semantic-validators/index.d.ts.map +0 -1
  301. package/dist/lib/schema-validation/semantic-validators/index.js +0 -23
  302. package/dist/lib/schema-validation/semantic-validators/index.js.map +0 -1
  303. package/dist/lib/schema-validation/semantic-validators/required-when-validator.d.ts +0 -43
  304. package/dist/lib/schema-validation/semantic-validators/required-when-validator.d.ts.map +0 -1
  305. package/dist/lib/schema-validation/semantic-validators/required-when-validator.js +0 -94
  306. package/dist/lib/schema-validation/semantic-validators/required-when-validator.js.map +0 -1
  307. package/dist/lib/schema-validation/semantic-validators/semantic-validator-registry.d.ts +0 -122
  308. package/dist/lib/schema-validation/semantic-validators/semantic-validator-registry.d.ts.map +0 -1
  309. package/dist/lib/schema-validation/semantic-validators/semantic-validator-registry.js +0 -166
  310. package/dist/lib/schema-validation/semantic-validators/semantic-validator-registry.js.map +0 -1
  311. package/dist/lib/schema-validation/semantic-validators/semantic-validator.d.ts +0 -260
  312. package/dist/lib/schema-validation/semantic-validators/semantic-validator.d.ts.map +0 -1
  313. package/dist/lib/schema-validation/semantic-validators/semantic-validator.js +0 -301
  314. package/dist/lib/schema-validation/semantic-validators/semantic-validator.js.map +0 -1
  315. package/dist/lib/schema-validation/semantic-validators/sql-where-clause-validator.d.ts +0 -115
  316. package/dist/lib/schema-validation/semantic-validators/sql-where-clause-validator.d.ts.map +0 -1
  317. package/dist/lib/schema-validation/semantic-validators/sql-where-clause-validator.js +0 -381
  318. package/dist/lib/schema-validation/semantic-validators/sql-where-clause-validator.js.map +0 -1
  319. package/dist/lib/schema-validation/semantic-validators/subset-of-entity-fields-validator.d.ts +0 -60
  320. package/dist/lib/schema-validation/semantic-validators/subset-of-entity-fields-validator.d.ts.map +0 -1
  321. package/dist/lib/schema-validation/semantic-validators/subset-of-entity-fields-validator.js +0 -195
  322. package/dist/lib/schema-validation/semantic-validators/subset-of-entity-fields-validator.js.map +0 -1
  323. package/dist/lib/schema-validation/semantic-validators/validation-context.d.ts +0 -335
  324. package/dist/lib/schema-validation/semantic-validators/validation-context.d.ts.map +0 -1
  325. package/dist/lib/schema-validation/semantic-validators/validation-context.js +0 -13
  326. package/dist/lib/schema-validation/semantic-validators/validation-context.js.map +0 -1
  327. package/dist/lib/styles-type-analyzer.d.ts +0 -64
  328. package/dist/lib/styles-type-analyzer.d.ts.map +0 -1
  329. package/dist/lib/styles-type-analyzer.js +0 -242
  330. package/dist/lib/styles-type-analyzer.js.map +0 -1
  331. package/dist/lib/type-context.d.ts +0 -184
  332. package/dist/lib/type-context.d.ts.map +0 -1
  333. package/dist/lib/type-context.js +0 -415
  334. package/dist/lib/type-context.js.map +0 -1
  335. package/dist/lib/type-inference-engine.d.ts +0 -181
  336. package/dist/lib/type-inference-engine.d.ts.map +0 -1
  337. package/dist/lib/type-inference-engine.js +0 -1151
  338. package/dist/lib/type-inference-engine.js.map +0 -1
  339. package/dist/lib/type-rules/type-compatibility-rule.d.ts +0 -79
  340. package/dist/lib/type-rules/type-compatibility-rule.d.ts.map +0 -1
  341. package/dist/lib/type-rules/type-compatibility-rule.js +0 -211
  342. package/dist/lib/type-rules/type-compatibility-rule.js.map +0 -1
@@ -1,127 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { RegisterClass } from '@memberjunction/global';
8
- import * as t from '@babel/types';
9
- import { BaseLintRule } from '../lint-rule.js';
10
- import { traverse, createViolation, truncateCode } from '../lint-utils.js';
11
- /**
12
- * Rule: use-function-declaration
13
- *
14
- * Ensures that components use function declaration syntax instead of
15
- * arrow functions or function expressions.
16
- *
17
- * Severity: critical
18
- * Applies to: all components
19
- */
20
- let UseFunctionDeclarationRule = class UseFunctionDeclarationRule extends BaseLintRule {
21
- get Name() { return 'use-function-declaration'; }
22
- get AppliesTo() { return 'all'; }
23
- Test(ast, componentName) {
24
- const violations = [];
25
- traverse(ast, {
26
- VariableDeclarator(path) {
27
- // Only check TOP-LEVEL declarations (not nested inside functions)
28
- // This prevents flagging arrow functions inside the component
29
- const isTopLevel = path.getFunctionParent() === null || path.scope.path.type === 'Program';
30
- if (!isTopLevel) {
31
- return; // Skip non-top-level declarations
32
- }
33
- // Check if this is the main component being defined as arrow function
34
- if (t.isIdentifier(path.node.id) && path.node.id.name === componentName) {
35
- const init = path.node.init;
36
- // Check if it's an arrow function
37
- if (t.isArrowFunctionExpression(init)) {
38
- violations.push(createViolation('use-function-declaration', 'critical', path.node, `Component "${componentName}" must be defined using function declaration syntax, not arrow function.`, truncateCode(path.toString(), 150), {
39
- text: 'Use function declaration syntax for TOP-LEVEL component definitions. Arrow functions are fine inside components.',
40
- example: `// ❌ WRONG - Top-level arrow function component:
41
- const MyComponent = ({ utilities, styles, components }) => {
42
- const [state, setState] = useState('');
43
-
44
- return <div>{state}</div>;
45
- };
46
-
47
- // ✅ CORRECT - Function declaration for top-level:
48
- function MyComponent({ utilities, styles, components }) {
49
- const [state, setState] = useState('');
50
-
51
- // Arrow functions are FINE inside the component:
52
- const handleClick = () => {
53
- setState('clicked');
54
- };
55
-
56
- const ChildComponent = () => <div>This is OK inside the component</div>;
57
-
58
- return <div onClick={handleClick}>{state}</div>;
59
- }
60
-
61
- // Child components also use function declaration:
62
- function ChildComponent() {
63
- return <div>Child</div>;
64
- }
65
-
66
- // Why function declarations?
67
- // 1. Clearer component identification
68
- // 2. Better debugging experience (named functions)
69
- // 3. Hoisting allows flexible code organization
70
- // 4. Consistent with React documentation patterns
71
- // 5. Easier to distinguish from regular variables`,
72
- }));
73
- }
74
- }
75
- // Also check for any other TOP-LEVEL component-like arrow functions (starts with capital letter)
76
- // But ONLY at the top level, not inside the component
77
- if (t.isIdentifier(path.node.id) && /^[A-Z]/.test(path.node.id.name)) {
78
- const init = path.node.init;
79
- if (t.isArrowFunctionExpression(init)) {
80
- // Only flag if it's at the top level (parallel to main component)
81
- violations.push(createViolation('use-function-declaration', 'high', path.node, `Top-level component "${path.node.id.name}" should use function declaration syntax.`, truncateCode(path.toString(), 150), {
82
- text: 'Use function declaration syntax for TOP-LEVEL component definitions. Arrow functions are fine inside components.',
83
- example: `// ❌ WRONG - Top-level arrow function component:
84
- const MyComponent = ({ utilities, styles, components }) => {
85
- const [state, setState] = useState('');
86
-
87
- return <div>{state}</div>;
88
- };
89
-
90
- // ✅ CORRECT - Function declaration for top-level:
91
- function MyComponent({ utilities, styles, components }) {
92
- const [state, setState] = useState('');
93
-
94
- // Arrow functions are FINE inside the component:
95
- const handleClick = () => {
96
- setState('clicked');
97
- };
98
-
99
- const ChildComponent = () => <div>This is OK inside the component</div>;
100
-
101
- return <div onClick={handleClick}>{state}</div>;
102
- }
103
-
104
- // Child components also use function declaration:
105
- function ChildComponent() {
106
- return <div>Child</div>;
107
- }
108
-
109
- // Why function declarations?
110
- // 1. Clearer component identification
111
- // 2. Better debugging experience (named functions)
112
- // 3. Hoisting allows flexible code organization
113
- // 4. Consistent with React documentation patterns
114
- // 5. Easier to distinguish from regular variables`,
115
- }));
116
- }
117
- }
118
- },
119
- });
120
- return violations;
121
- }
122
- };
123
- UseFunctionDeclarationRule = __decorate([
124
- RegisterClass(BaseLintRule, 'use-function-declaration')
125
- ], UseFunctionDeclarationRule);
126
- export { UseFunctionDeclarationRule };
127
- //# sourceMappingURL=use-function-declaration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-function-declaration.js","sourceRoot":"","sources":["../../../src/lib/runtime-rules/use-function-declaration.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAY,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElF;;;;;;;;GAQG;AAEI,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,YAAY;IAC1D,IAAI,IAAI,KAAK,OAAO,0BAA0B,CAAC,CAAC,CAAC;IACjD,IAAI,SAAS,KAA+B,OAAO,KAAK,CAAC,CAAC,CAAC;IAE3D,IAAI,CAAC,GAAW,EAAE,aAAqB;QACrC,MAAM,UAAU,GAAgB,EAAE,CAAC;QAEnC,QAAQ,CAAC,GAAG,EAAE;YACZ,kBAAkB,CAAC,IAAoC;gBACrD,kEAAkE;gBAClE,8DAA8D;gBAC9D,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC;gBAE3F,IAAI,CAAC,UAAU,EAAE,CAAC;oBAChB,OAAO,CAAC,kCAAkC;gBAC5C,CAAC;gBAED,sEAAsE;gBACtE,IAAI,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;oBACxE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;oBAE5B,kCAAkC;oBAClC,IAAI,CAAC,CAAC,y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- import * as t from '@babel/types';
2
- import { BaseLintRule } from '../lint-rule.js';
3
- import { Violation } from '../component-linter.js';
4
- import { ComponentSpec } from '@memberjunction/interactive-component-types';
5
- /**
6
- * Rule: use-unwrap-components
7
- *
8
- * Ensures that components use unwrapComponents() utility to access library components
9
- * instead of direct destructuring. This ensures safe access to library APIs.
10
- *
11
- * Severity: critical
12
- * Applies to: all components
13
- */
14
- export declare class UseUnwrapComponentsRule extends BaseLintRule {
15
- get Name(): string;
16
- get AppliesTo(): 'all' | 'child' | 'root';
17
- Test(ast: t.File, _componentName: string, componentSpec?: ComponentSpec): Violation[];
18
- }
19
- //# sourceMappingURL=use-unwrap-components.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-unwrap-components.d.ts","sourceRoot":"","sources":["../../../src/lib/runtime-rules/use-unwrap-components.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAE5E;;;;;;;;GAQG;AACH,qBACa,uBAAwB,SAAQ,YAAY;IACvD,IAAI,IAAI,WAAsC;IAC9C,IAAI,SAAS,IAAI,KAAK,GAAG,OAAO,GAAG,MAAM,CAAkB;IAE3D,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,aAAa,GAAG,SAAS,EAAE;CA8DtF"}
@@ -1,84 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { traverse } from '../lint-utils.js';
8
- import { RegisterClass } from '@memberjunction/global';
9
- import * as t from '@babel/types';
10
- import { BaseLintRule } from '../lint-rule.js';
11
- /**
12
- * Rule: use-unwrap-components
13
- *
14
- * Ensures that components use unwrapComponents() utility to access library components
15
- * instead of direct destructuring. This ensures safe access to library APIs.
16
- *
17
- * Severity: critical
18
- * Applies to: all components
19
- */
20
- let UseUnwrapComponentsRule = class UseUnwrapComponentsRule extends BaseLintRule {
21
- get Name() { return 'use-unwrap-components'; }
22
- get AppliesTo() { return 'all'; }
23
- Test(ast, _componentName, componentSpec) {
24
- const violations = [];
25
- // Build a set of library global variables
26
- const libraryGlobals = new Set();
27
- if (componentSpec?.libraries) {
28
- for (const lib of componentSpec.libraries) {
29
- if (lib.globalVariable) {
30
- libraryGlobals.add(lib.globalVariable);
31
- }
32
- }
33
- }
34
- traverse(ast, {
35
- VariableDeclarator(path) {
36
- // Check for direct destructuring from library globals
37
- if (t.isObjectPattern(path.node.id) && t.isIdentifier(path.node.init)) {
38
- const sourceVar = path.node.init.name;
39
- // Check if this is destructuring from a library global
40
- if (libraryGlobals.has(sourceVar)) {
41
- // Extract the destructured component names
42
- const componentNames = [];
43
- for (const prop of path.node.id.properties) {
44
- if (t.isObjectProperty(prop)) {
45
- if (t.isIdentifier(prop.key)) {
46
- componentNames.push(prop.key.name);
47
- }
48
- }
49
- }
50
- violations.push({
51
- rule: 'use-unwrap-components',
52
- severity: 'critical',
53
- line: path.node.loc?.start.line || 0,
54
- column: path.node.loc?.start.column || 0,
55
- message: `Direct destructuring from library "${sourceVar}" is not allowed. You MUST use unwrapComponents to access library components. Replace "const { ${componentNames.join(', ')} } = ${sourceVar};" with "const { ${componentNames.join(', ')} } = unwrapComponents(${sourceVar}, [${componentNames.map((n) => `'${n}'`).join(', ')}]);"`,
56
- });
57
- }
58
- }
59
- // Also check for MemberExpression destructuring like const { Button } = antd.Button
60
- if (t.isObjectPattern(path.node.id) && t.isMemberExpression(path.node.init)) {
61
- const memberExpr = path.node.init;
62
- if (t.isIdentifier(memberExpr.object)) {
63
- const objName = memberExpr.object.name;
64
- if (libraryGlobals.has(objName)) {
65
- violations.push({
66
- rule: 'use-unwrap-components',
67
- severity: 'critical',
68
- line: path.node.loc?.start.line || 0,
69
- column: path.node.loc?.start.column || 0,
70
- message: `Direct destructuring from library member expression is not allowed. Use unwrapComponents to safely access library components. Example: Instead of "const { Something } = ${objName}.Something;", use "const { Something } = unwrapComponents(${objName}, ['Something']);"`,
71
- });
72
- }
73
- }
74
- }
75
- },
76
- });
77
- return violations;
78
- }
79
- };
80
- UseUnwrapComponentsRule = __decorate([
81
- RegisterClass(BaseLintRule, 'use-unwrap-components')
82
- ], UseUnwrapComponentsRule);
83
- export { UseUnwrapComponentsRule };
84
- //# sourceMappingURL=use-unwrap-components.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-unwrap-components.js","sourceRoot":"","sources":["../../../src/lib/runtime-rules/use-unwrap-components.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAY,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAI5C;;;;;;;;GAQG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,YAAY;IACvD,IAAI,IAAI,KAAK,OAAO,uBAAuB,CAAC,CAAC,CAAC;IAC9C,IAAI,SAAS,KAA+B,OAAO,KAAK,CAAC,CAAC,CAAC;IAE3D,IAAI,CAAC,GAAW,EAAE,cAAsB,EAAE,aAA6B;QACrE,MAAM,UAAU,GAAgB,EAAE,CAAC;QAEnC,0CAA0C;QAC1C,MAAM,cA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AClB,CAAC;CACJ,CAAA;AAlEY,uBAAuB;IADnC,aAAa,CAAC,YAAY,EAAE,uBAAuB,CAAC;GACxC,uBAAuB,CAkEnC"}
@@ -1,23 +0,0 @@
1
- import * as t from '@babel/types';
2
- import { BaseLintRule } from '../lint-rule.js';
3
- import { Violation } from '../component-linter.js';
4
- /**
5
- * Rule: useeffect-unstable-dependencies
6
- *
7
- * Detects unstable dependencies in useEffect hooks that can cause infinite render loops.
8
- * Two types of issues:
9
- *
10
- * 1. Object/function props (utilities, components, callbacks, styles, savedUserSettings)
11
- * - Severity: high - May cause infinite loops if parent doesn't provide stable references
12
- *
13
- * 2. Parameters with object literal defaults (queryParameters = {})
14
- * - Severity: critical - ALWAYS causes infinite loops (new object every render)
15
- *
16
- * Applies to: all components
17
- */
18
- export declare class UseeffectUnstableDependenciesRule extends BaseLintRule {
19
- get Name(): string;
20
- get AppliesTo(): 'all' | 'child' | 'root';
21
- Test(ast: t.File, componentName: string): Violation[];
22
- }
23
- //# sourceMappingURL=useeffect-unstable-dependencies.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useeffect-unstable-dependencies.d.ts","sourceRoot":"","sources":["../../../src/lib/runtime-rules/useeffect-unstable-dependencies.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD;;;;;;;;;;;;;GAaG;AACH,qBACa,iCAAkC,SAAQ,YAAY;IACjE,IAAI,IAAI,WAAgD;IACxD,IAAI,SAAS,IAAI,KAAK,GAAG,OAAO,GAAG,MAAM,CAAkB;IAE3D,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,SAAS,EAAE;CAuMtD"}
@@ -1,215 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { traverse } from '../lint-utils.js';
8
- import { RegisterClass } from '@memberjunction/global';
9
- import * as t from '@babel/types';
10
- import { BaseLintRule } from '../lint-rule.js';
11
- /**
12
- * Rule: useeffect-unstable-dependencies
13
- *
14
- * Detects unstable dependencies in useEffect hooks that can cause infinite render loops.
15
- * Two types of issues:
16
- *
17
- * 1. Object/function props (utilities, components, callbacks, styles, savedUserSettings)
18
- * - Severity: high - May cause infinite loops if parent doesn't provide stable references
19
- *
20
- * 2. Parameters with object literal defaults (queryParameters = {})
21
- * - Severity: critical - ALWAYS causes infinite loops (new object every render)
22
- *
23
- * Applies to: all components
24
- */
25
- let UseeffectUnstableDependenciesRule = class UseeffectUnstableDependenciesRule extends BaseLintRule {
26
- get Name() { return 'useeffect-unstable-dependencies'; }
27
- get AppliesTo() { return 'all'; }
28
- Test(ast, componentName) {
29
- const violations = [];
30
- // Known prop names that are always objects/functions and unstable
31
- const unstablePropNames = new Set([
32
- 'utilities',
33
- 'components',
34
- 'callbacks',
35
- 'styles',
36
- 'savedUserSettings', // Can be unstable if not memoized by parent
37
- ]);
38
- // Helper to find the component function and extract parameters with object defaults
39
- const findComponentParams = (useEffectPath) => {
40
- const paramsWithObjectDefaults = new Map();
41
- let current = useEffectPath.parentPath;
42
- while (current) {
43
- // Look for FunctionDeclaration or ArrowFunctionExpression/FunctionExpression
44
- if (t.isFunctionDeclaration(current.node) ||
45
- t.isArrowFunctionExpression(current.node) ||
46
- t.isFunctionExpression(current.node)) {
47
- const func = current.node;
48
- // Check if this looks like a component (starts with uppercase)
49
- let isComponent = false;
50
- if (t.isFunctionDeclaration(func) && func.id && /^[A-Z]/.test(func.id.name)) {
51
- isComponent = true;
52
- }
53
- // For arrow functions, check the variable declarator name
54
- if ((t.isArrowFunctionExpression(func) || t.isFunctionExpression(func)) && current.parentPath) {
55
- const parent = current.parentPath.node;
56
- if (t.isVariableDeclarator(parent) && t.isIdentifier(parent.id) && /^[A-Z]/.test(parent.id.name)) {
57
- isComponent = true;
58
- }
59
- }
60
- if (isComponent) {
61
- // Extract parameters with object literal defaults
62
- for (const param of func.params) {
63
- // Case 1: ObjectPattern (destructured props): { foo = {}, bar = [] }
64
- if (t.isObjectPattern(param)) {
65
- for (const prop of param.properties) {
66
- if (t.isObjectProperty(prop)) {
67
- const value = prop.value;
68
- // Check if this destructured property has a default: queryParameters = {}
69
- if (t.isAssignmentPattern(value) && t.isIdentifier(value.left)) {
70
- const defaultVal = value.right;
71
- if (t.isObjectExpression(defaultVal) || t.isArrayExpression(defaultVal)) {
72
- paramsWithObjectDefaults.set(value.left.name, defaultVal);
73
- }
74
- }
75
- }
76
- }
77
- }
78
- // Case 2: AssignmentPattern (param with default): queryParameters = {}
79
- else if (t.isAssignmentPattern(param)) {
80
- const left = param.left;
81
- const right = param.right;
82
- // Simple param with object default: queryParameters = {}
83
- if (t.isIdentifier(left) && (t.isObjectExpression(right) || t.isArrayExpression(right))) {
84
- paramsWithObjectDefaults.set(left.name, right);
85
- }
86
- // ObjectPattern with object default: { foo, bar } = {}
87
- else if (t.isObjectPattern(left) && (t.isObjectExpression(right) || t.isArrayExpression(right))) {
88
- // The whole destructured object gets a default - mark all properties
89
- for (const prop of left.properties) {
90
- if (t.isObjectProperty(prop) && t.isIdentifier(prop.key)) {
91
- paramsWithObjectDefaults.set(prop.key.name, right);
92
- }
93
- }
94
- }
95
- }
96
- }
97
- break; // Found the component, stop traversing up
98
- }
99
- }
100
- current = current.parentPath;
101
- }
102
- return paramsWithObjectDefaults;
103
- };
104
- traverse(ast, {
105
- CallExpression(path) {
106
- // Check for useEffect calls
107
- if (t.isIdentifier(path.node.callee) && path.node.callee.name === 'useEffect') {
108
- // Get the dependency array (second argument)
109
- const depsArg = path.node.arguments[1];
110
- if (!depsArg || !t.isArrayExpression(depsArg)) {
111
- return; // No deps array or empty deps []
112
- }
113
- // Find component parameters with object defaults
114
- const paramsWithObjectDefaults = findComponentParams(path);
115
- // Check each dependency
116
- for (const dep of depsArg.elements) {
117
- if (!dep)
118
- continue;
119
- let unstableDep = null;
120
- let severity = 'high';
121
- let message = '';
122
- let suggestionText = '';
123
- // Case 1: Member expression (utilities.rq.RunQuery, callbacks?.onSelect)
124
- if (t.isMemberExpression(dep) || t.isOptionalMemberExpression(dep)) {
125
- const memberExpr = dep;
126
- // Get the root object (e.g., 'utilities' from 'utilities.rq.RunQuery')
127
- let rootObj = memberExpr.object;
128
- while ((t.isMemberExpression(rootObj) || t.isOptionalMemberExpression(rootObj)) && 'object' in rootObj) {
129
- rootObj = rootObj.object;
130
- }
131
- if (t.isIdentifier(rootObj) && unstablePropNames.has(rootObj.name)) {
132
- unstableDep = `${rootObj.name}.${t.isIdentifier(memberExpr.property) ? memberExpr.property.name : '...'}`;
133
- severity = 'high';
134
- message = `useEffect has unstable dependency '${unstableDep}' that may cause infinite render loops. Object/function references from props typically change on every render. This works if the parent provides stable references (via useMemo), but is fragile and should be avoided.`;
135
- suggestionText = `Remove '${unstableDep}' from dependency array. These utilities/services are typically stable and don't need to be tracked.`;
136
- }
137
- }
138
- // Case 2: Direct identifier (utilities, components, etc.)
139
- else if (t.isIdentifier(dep)) {
140
- // Check if it's a known unstable prop name
141
- if (unstablePropNames.has(dep.name)) {
142
- unstableDep = dep.name;
143
- severity = 'high';
144
- message = `useEffect has unstable dependency '${unstableDep}' that may cause infinite render loops. Object/function references from props typically change on every render. This works if the parent provides stable references (via useMemo), but is fragile and should be avoided.`;
145
- suggestionText = `Remove '${unstableDep}' from dependency array. These utilities/services are typically stable and don't need to be tracked.`;
146
- }
147
- // Check if it's a param with object literal default
148
- else if (paramsWithObjectDefaults.has(dep.name)) {
149
- unstableDep = dep.name;
150
- severity = 'critical';
151
- const defaultValue = paramsWithObjectDefaults.get(dep.name);
152
- const defaultStr = t.isObjectExpression(defaultValue) ? '{}' : '[]';
153
- message = `useEffect has CRITICAL unstable dependency '${unstableDep}' with object literal default (${dep.name} = ${defaultStr}). This creates a NEW object on EVERY render, causing infinite loops. This is ALWAYS broken.`;
154
- suggestionText = `Remove '${unstableDep}' from dependency array. Props with object literal defaults (${dep.name} = ${defaultStr}) create new references every render.`;
155
- }
156
- }
157
- // Report violation if we found an unstable dependency
158
- if (unstableDep) {
159
- let fixedDeps = depsArg.elements
160
- .filter((e) => e !== dep)
161
- .map((e) => {
162
- if (!e)
163
- return '';
164
- if (t.isIdentifier(e))
165
- return e.name;
166
- if (t.isMemberExpression(e) || t.isOptionalMemberExpression(e)) {
167
- // Try to extract the full path
168
- const parts = [];
169
- let current = e;
170
- while (t.isMemberExpression(current) || t.isOptionalMemberExpression(current)) {
171
- if ('property' in current && t.isIdentifier(current.property)) {
172
- parts.unshift(current.property.name);
173
- }
174
- if ('object' in current) {
175
- current = current.object;
176
- }
177
- else {
178
- break;
179
- }
180
- }
181
- if (t.isIdentifier(current)) {
182
- parts.unshift(current.name);
183
- }
184
- return parts.join('.');
185
- }
186
- return '...';
187
- })
188
- .filter(Boolean);
189
- violations.push({
190
- rule: 'useeffect-unstable-dependencies',
191
- severity: severity,
192
- line: dep.loc?.start.line || path.node.loc?.start.line || 0,
193
- column: dep.loc?.start.column || path.node.loc?.start.column || 0,
194
- message: message,
195
- code: `}, [${fixedDeps.join(', ')}${fixedDeps.length > 0 ? ', ' : ''}${unstableDep}]); // ${severity === 'critical' ? '🚨' : '⚠️'} Remove '${unstableDep}'`,
196
- suggestion: {
197
- text: suggestionText,
198
- example: fixedDeps.length > 0
199
- ? `}, [${fixedDeps.join(', ')}]); // ✅ Removed unstable '${unstableDep}'`
200
- : `}, []); // ✅ Run once on mount - dependencies are stable`
201
- }
202
- });
203
- }
204
- }
205
- }
206
- },
207
- });
208
- return violations;
209
- }
210
- };
211
- UseeffectUnstableDependenciesRule = __decorate([
212
- RegisterClass(BaseLintRule, 'useeffect-unstable-dependencies')
213
- ], UseeffectUnstableDependenciesRule);
214
- export { UseeffectUnstableDependenciesRule };
215
- //# sourceMappingURL=useeffect-unstable-dependencies.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useeffect-unstable-dependencies.js","sourceRoot":"","sources":["../../../src/lib/runtime-rules/useeffect-unstable-dependencies.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAY,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C;;;;;;;;;;;;;GAaG;AAEI,IAAM,iCAAiC,GAAvC,MAAM,iCAAkC,SAAQ,YAAY;IACjE,IAAI,IAAI,KAAK,OAAO,iCAAiC,CAAC,CAAC,CAAC;IACxD,IAAI,SAAS,KAA+B,OAAO,KAAK,CAAC,CAAC,CAAC;IAE3D,IAAI,CAAC,GAAW,EAAE,aAAqB;QACrC,MAAM,UAAU,GAAgB,EAAE,CAAC;QAEnC,kEAAkE;QAClE,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;YAChC,WAAW;YACX,YAAY;YACZ,WAAW;YACX,QAAQ;YACR,mBAAmB,EAAE,4CAA4C;SAClE,CAAC,CAAC;QAEH,oFAAoF;QACpF,MAAM,mBAAmB,GAAG,CAAC,aAAyC,EAAuD,EAAE;YAC7H,MAAM,wBAAwB,GAAG,IAAI,GAAG,EAAkD,CAAC;YAE3F,IAAI,OAAO,GAAoB,aAAa,CAAC,UAAU,CAAC;YACxD,OAAO,OAAO,EAAE,CAAC;gBACf,6EAA6E;gBAC7E,IACE,CAAC,CAAC,qBAAqB,CA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I,EAAE,cAAc;oCACpB,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC;wCAC3B,CAAC,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,+BAA+B,WAAW,GAAG;wCAC1E,CAAC,CAAC,2DAA2D;iCAChE;6BACF,CAAC,CAAC;wBACL,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAA;AA3MY,iCAAiC;IAD7C,aAAa,CAAC,YAAY,EAAE,iCAAiC,CAAC;GAClD,iCAAiC,CA2M7C"}
@@ -1,24 +0,0 @@
1
- import * as t from '@babel/types';
2
- import { BaseLintRule } from '../lint-rule.js';
3
- import { Violation } from '../component-linter.js';
4
- /**
5
- * Rule: utilities-api-validation
6
- *
7
- * Validates that components only access valid properties and methods
8
- * on the utilities object (rv, rq, md, ai) and their sub-objects.
9
- *
10
- * Valid API surface:
11
- * - utilities.rv: RunView(), RunViews()
12
- * - utilities.rq: RunQuery()
13
- * - utilities.md: GetEntityObject(), Entities
14
- * - utilities.ai: ExecutePrompt(), EmbedText(), VectorService
15
- *
16
- * Severity: critical
17
- * Applies to: all components
18
- */
19
- export declare class UtilitiesApiValidationRule extends BaseLintRule {
20
- get Name(): string;
21
- get AppliesTo(): 'all' | 'child' | 'root';
22
- Test(ast: t.File): Violation[];
23
- }
24
- //# sourceMappingURL=utilities-api-validation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utilities-api-validation.d.ts","sourceRoot":"","sources":["../../../src/lib/runtime-rules/utilities-api-validation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD;;;;;;;;;;;;;;GAcG;AACH,qBACa,0BAA2B,SAAQ,YAAY;IAC1D,IAAI,IAAI,WAAyC;IACjD,IAAI,SAAS,IAAI,KAAK,GAAG,OAAO,GAAG,MAAM,CAAkB;IAE3D,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,GAAG,SAAS,EAAE;CAsG/B"}