@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,217 +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 * as t from '@babel/types';
8
- import { RegisterClass } from '@memberjunction/global';
9
- import { BaseLintRule } from '../lint-rule.js';
10
- import { createViolation } from '../lint-utils.js';
11
- /**
12
- * Rule: no-iife-wrapper
13
- *
14
- * Ensures that component code is not wrapped in an IIFE (Immediately Invoked Function Expression).
15
- * Components should be defined as plain functions.
16
- *
17
- * Severity: critical
18
- * Applies to: all components
19
- */
20
- let NoIifeWrapperRule = class NoIifeWrapperRule extends BaseLintRule {
21
- get Name() { return 'no-iife-wrapper'; }
22
- get AppliesTo() { return 'all'; }
23
- Test(ast) {
24
- const violations = [];
25
- // Check if the entire code is wrapped in an IIFE
26
- if (ast.program && ast.program.body) {
27
- for (const statement of ast.program.body) {
28
- // Check for IIFE pattern: (function() { ... })() or (function() { ... }())
29
- if (t.isExpressionStatement(statement)) {
30
- const expr = statement.expression;
31
- // Pattern 1: (function() { ... })()
32
- if (t.isCallExpression(expr)) {
33
- const callee = expr.callee;
34
- // Check if calling a function expression wrapped in parentheses
35
- if (t.isParenthesizedExpression && t.isParenthesizedExpression(callee)) {
36
- const inner = callee.expression;
37
- if (t.isFunctionExpression(inner) || t.isArrowFunctionExpression(inner)) {
38
- violations.push(createViolation('no-iife-wrapper', 'critical', statement, `Component code must not be wrapped in an IIFE (Immediately Invoked Function Expression). Define the component function directly.`, statement.toString().substring(0, 50) + '...', {
39
- text: 'Remove the IIFE wrapper. Component code should be plain functions, not wrapped in immediately invoked functions.',
40
- example: `// ❌ WRONG - IIFE wrapper patterns:
41
- (function() {
42
- function MyComponent({ utilities, styles, components }) {
43
- return <div>Hello</div>;
44
- }
45
- return MyComponent;
46
- })();
47
-
48
- // Also wrong:
49
- (function() {
50
- const MyComponent = ({ utilities }) => {
51
- return <div>Hello</div>;
52
- };
53
- })();
54
-
55
- // Also wrong - arrow function IIFE:
56
- (() => {
57
- function MyComponent({ utilities }) {
58
- return <div>Hello</div>;
59
- }
60
- })();
61
-
62
- // ✅ CORRECT - Direct function declaration:
63
- function MyComponent({ utilities, styles, components }) {
64
- return <div>Hello</div>;
65
- }
66
-
67
- // Why no IIFE?
68
- // 1. Components run in their own scope already
69
- // 2. The runtime handles isolation
70
- // 3. IIFEs prevent proper component discovery
71
- // 4. Makes debugging harder
72
- // 5. Unnecessary complexity`,
73
- }));
74
- }
75
- }
76
- // Also check without ParenthesizedExpression (some parsers handle it differently)
77
- if (t.isFunctionExpression(callee) || t.isArrowFunctionExpression(callee)) {
78
- violations.push(createViolation('no-iife-wrapper', 'critical', statement, `Component code must not be wrapped in an IIFE. Define the component function directly.`, statement.toString().substring(0, 50) + '...', {
79
- text: 'Remove the IIFE wrapper. Component code should be plain functions, not wrapped in immediately invoked functions.',
80
- example: `// ❌ WRONG - IIFE wrapper patterns:
81
- (function() {
82
- function MyComponent({ utilities, styles, components }) {
83
- return <div>Hello</div>;
84
- }
85
- return MyComponent;
86
- })();
87
-
88
- // Also wrong:
89
- (function() {
90
- const MyComponent = ({ utilities }) => {
91
- return <div>Hello</div>;
92
- };
93
- })();
94
-
95
- // Also wrong - arrow function IIFE:
96
- (() => {
97
- function MyComponent({ utilities }) {
98
- return <div>Hello</div>;
99
- }
100
- })();
101
-
102
- // ✅ CORRECT - Direct function declaration:
103
- function MyComponent({ utilities, styles, components }) {
104
- return <div>Hello</div>;
105
- }
106
-
107
- // Why no IIFE?
108
- // 1. Components run in their own scope already
109
- // 2. The runtime handles isolation
110
- // 3. IIFEs prevent proper component discovery
111
- // 4. Makes debugging harder
112
- // 5. Unnecessary complexity`,
113
- }));
114
- }
115
- }
116
- // Pattern 2: (function() { ... }())
117
- if (t.isParenthesizedExpression && t.isParenthesizedExpression(expr)) {
118
- const inner = expr.expression;
119
- if (t.isCallExpression(inner)) {
120
- const callee = inner.callee;
121
- if (t.isFunctionExpression(callee) || t.isArrowFunctionExpression(callee)) {
122
- violations.push(createViolation('no-iife-wrapper', 'critical', statement, `Component code must not be wrapped in an IIFE. Define the component function directly.`, statement.toString().substring(0, 50) + '...', {
123
- text: 'Remove the IIFE wrapper. Component code should be plain functions, not wrapped in immediately invoked functions.',
124
- example: `// ❌ WRONG - IIFE wrapper patterns:
125
- (function() {
126
- function MyComponent({ utilities, styles, components }) {
127
- return <div>Hello</div>;
128
- }
129
- return MyComponent;
130
- })();
131
-
132
- // Also wrong:
133
- (function() {
134
- const MyComponent = ({ utilities }) => {
135
- return <div>Hello</div>;
136
- };
137
- })();
138
-
139
- // Also wrong - arrow function IIFE:
140
- (() => {
141
- function MyComponent({ utilities }) {
142
- return <div>Hello</div>;
143
- }
144
- })();
145
-
146
- // ✅ CORRECT - Direct function declaration:
147
- function MyComponent({ utilities, styles, components }) {
148
- return <div>Hello</div>;
149
- }
150
-
151
- // Why no IIFE?
152
- // 1. Components run in their own scope already
153
- // 2. The runtime handles isolation
154
- // 3. IIFEs prevent proper component discovery
155
- // 4. Makes debugging harder
156
- // 5. Unnecessary complexity`,
157
- }));
158
- }
159
- }
160
- }
161
- }
162
- // Also check for variable assignment with IIFE
163
- if (t.isVariableDeclaration(statement)) {
164
- for (const decl of statement.declarations) {
165
- if (decl.init && t.isCallExpression(decl.init)) {
166
- const callee = decl.init.callee;
167
- if (t.isFunctionExpression(callee) || t.isArrowFunctionExpression(callee)) {
168
- violations.push(createViolation('no-iife-wrapper', 'critical', decl, `Do not use IIFE pattern for component initialization. Define components as plain functions.`, decl.toString().substring(0, 50) + '...', {
169
- text: 'Remove the IIFE wrapper. Component code should be plain functions, not wrapped in immediately invoked functions.',
170
- example: `// ❌ WRONG - IIFE wrapper patterns:
171
- (function() {
172
- function MyComponent({ utilities, styles, components }) {
173
- return <div>Hello</div>;
174
- }
175
- return MyComponent;
176
- })();
177
-
178
- // Also wrong:
179
- (function() {
180
- const MyComponent = ({ utilities }) => {
181
- return <div>Hello</div>;
182
- };
183
- })();
184
-
185
- // Also wrong - arrow function IIFE:
186
- (() => {
187
- function MyComponent({ utilities }) {
188
- return <div>Hello</div>;
189
- }
190
- })();
191
-
192
- // ✅ CORRECT - Direct function declaration:
193
- function MyComponent({ utilities, styles, components }) {
194
- return <div>Hello</div>;
195
- }
196
-
197
- // Why no IIFE?
198
- // 1. Components run in their own scope already
199
- // 2. The runtime handles isolation
200
- // 3. IIFEs prevent proper component discovery
201
- // 4. Makes debugging harder
202
- // 5. Unnecessary complexity`,
203
- }));
204
- }
205
- }
206
- }
207
- }
208
- }
209
- }
210
- return violations;
211
- }
212
- };
213
- NoIifeWrapperRule = __decorate([
214
- RegisterClass(BaseLintRule, 'no-iife-wrapper')
215
- ], NoIifeWrapperRule);
216
- export { NoIifeWrapperRule };
217
- //# sourceMappingURL=no-iife-wrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-iife-wrapper.js","sourceRoot":"","sources":["../../../src/lib/runtime-rules/no-iife-wrapper.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;;;;;GAQG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,YAAY;IACjD,IAAI,IAAI,KAAK,OAAO,iBAAiB,CAAC,CAAC,CAAC;IACxC,IAAI,SAAS,KAA+B,OAAO,KAAK,CAAC,CAAC,CAAC;IAE3D,IAAI,CAAC,GAAW;QACd,MAAM,UAAU,GAAgB,EAAE,CAAC;QAEnC,iDAAiD;QACjD,IAAI,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACpC,KAAK,MAAM,SAAS,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;gBACzC,2EAA2E;gBAC3E,IAAI,CAAC,CAAC,qB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,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,EACxC;oCACE,IAAI,EAAE,kHAAkH;oCACxH,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAgCF;iCACR,CACF,CACF,CAAC;4BACJ,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAA;AA5OY,iBAAiB;IAD7B,aAAa,CAAC,YAAY,EAAE,iBAAiB,CAAC;GAClC,iBAAiB,CA4O7B"}
@@ -1,18 +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: no-import-statements
6
- *
7
- * Ensures that interactive components do not contain import statements.
8
- * All dependencies must be passed as props (utilities, components, styles).
9
- *
10
- * Severity: critical
11
- * Applies to: all components
12
- */
13
- export declare class NoImportStatementsRule extends BaseLintRule {
14
- get Name(): string;
15
- get AppliesTo(): 'all' | 'child' | 'root';
16
- Test(ast: t.File, componentName: string): Violation[];
17
- }
18
- //# sourceMappingURL=no-import-statements.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-import-statements.d.ts","sourceRoot":"","sources":["../../../src/lib/runtime-rules/no-import-statements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD;;;;;;;;GAQG;AACH,qBACa,sBAAuB,SAAQ,YAAY;IACtD,IAAI,IAAI,WAAqC;IAC7C,IAAI,SAAS,IAAI,KAAK,GAAG,OAAO,GAAG,MAAM,CAAkB;IAE3D,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,SAAS,EAAE;CAiDtD"}
@@ -1,65 +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 { BaseLintRule } from '../lint-rule.js';
9
- import { traverse, createViolation, truncateCode } from '../lint-utils.js';
10
- /**
11
- * Rule: no-import-statements
12
- *
13
- * Ensures that interactive components do not contain import statements.
14
- * All dependencies must be passed as props (utilities, components, styles).
15
- *
16
- * Severity: critical
17
- * Applies to: all components
18
- */
19
- let NoImportStatementsRule = class NoImportStatementsRule extends BaseLintRule {
20
- get Name() { return 'no-import-statements'; }
21
- get AppliesTo() { return 'all'; }
22
- Test(ast, componentName) {
23
- const violations = [];
24
- traverse(ast, {
25
- ImportDeclaration(path) {
26
- violations.push(createViolation('no-import-statements', 'critical', path.node, `Component "${componentName}" contains an import statement. Interactive components cannot use import statements - all dependencies must be passed as props.`, truncateCode(path.toString()), {
27
- text: 'Remove all import statements. Interactive components receive everything through props.',
28
- example: `// ❌ WRONG - Using import statements:
29
- import React from 'react';
30
- import { useState } from 'react';
31
- import { format } from 'date-fns';
32
- import './styles.css';
33
-
34
- function MyComponent({ utilities, styles }) {
35
- // ...
36
- }
37
-
38
- // ✅ CORRECT - Everything passed as props:
39
- function MyComponent({ utilities, styles, components }) {
40
- // React hooks are available globally (useState, useEffect, etc.)
41
- const [value, setValue] = useState('');
42
-
43
- // Utilities include formatting functions
44
- const formatted = utilities.formatDate(new Date());
45
-
46
- // Styles are passed as props
47
- return <div style={styles.container}>...</div>;
48
- }
49
-
50
- // All dependencies must be:
51
- // 1. Passed through the 'utilities' prop (formatting, helpers)
52
- // 2. Passed through the 'components' prop (child components)
53
- // 3. Passed through the 'styles' prop (styling)
54
- // 4. Available globally (React hooks)`,
55
- }));
56
- },
57
- });
58
- return violations;
59
- }
60
- };
61
- NoImportStatementsRule = __decorate([
62
- RegisterClass(BaseLintRule, 'no-import-statements')
63
- ], NoImportStatementsRule);
64
- export { NoImportStatementsRule };
65
- //# sourceMappingURL=no-import-statements.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-import-statements.js","sourceRoot":"","sources":["../../../src/lib/runtime-rules/no-import-statements.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAY,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElF;;;;;;;;GAQG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,YAAY;IACtD,IAAI,IAAI,KAAK,OAAO,sBAAsB,CAAC,CAAC,CAAC;IAC7C,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,iBAAiB,CAAC,IAAmC;gBACnD,UAAU,CAAC,IAAI,CACb,eAAe,CACb,sBAAsB,EACtB,UAAU,EACV,IAAI,CAAC,IAAI,EACT,cAAc,aAAa,iIAAiI,EAC5J,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAC7B;oBACE,IAAI,EAAE,wFAAwF;oBAC9F,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;uCA0BgB;iBAC1B,CACF,CACF,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAA;AArDY,sBAAsB;IADlC,aAAa,CAAC,YAAY,EAAE,sBAAsB,CAAC;GACvC,sBAAsB,CAqDlC"}
@@ -1,18 +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: no-react-destructuring
6
- *
7
- * Ensures that components do not destructure from React.
8
- * React hooks are available globally and don't need to be imported or destructured.
9
- *
10
- * Severity: critical
11
- * Applies to: all components
12
- */
13
- export declare class NoReactDestructuringRule extends BaseLintRule {
14
- get Name(): string;
15
- get AppliesTo(): 'all' | 'child' | 'root';
16
- Test(ast: t.File): Violation[];
17
- }
18
- //# sourceMappingURL=no-react-destructuring.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-react-destructuring.d.ts","sourceRoot":"","sources":["../../../src/lib/runtime-rules/no-react-destructuring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD;;;;;;;;GAQG;AACH,qBACa,wBAAyB,SAAQ,YAAY;IACxD,IAAI,IAAI,WAAuC;IAC/C,IAAI,SAAS,IAAI,KAAK,GAAG,OAAO,GAAG,MAAM,CAAkB;IAE3D,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,GAAG,SAAS,EAAE;CAmC/B"}
@@ -1,60 +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 * as t from '@babel/types';
8
- import { RegisterClass } from '@memberjunction/global';
9
- import { BaseLintRule } from '../lint-rule.js';
10
- import { traverse, truncateCode } from '../lint-utils.js';
11
- /**
12
- * Rule: no-react-destructuring
13
- *
14
- * Ensures that components do not destructure from React.
15
- * React hooks are available globally and don't need to be imported or destructured.
16
- *
17
- * Severity: critical
18
- * Applies to: all components
19
- */
20
- let NoReactDestructuringRule = class NoReactDestructuringRule extends BaseLintRule {
21
- get Name() { return 'no-react-destructuring'; }
22
- get AppliesTo() { return 'all'; }
23
- Test(ast) {
24
- const violations = [];
25
- traverse(ast, {
26
- VariableDeclarator(path) {
27
- // Check for destructuring from React
28
- if (t.isObjectPattern(path.node.id) && t.isIdentifier(path.node.init) && path.node.init.name === 'React') {
29
- // Get the destructured properties
30
- const destructuredProps = path.node.id.properties
31
- .filter((prop) => t.isObjectProperty(prop) && t.isIdentifier(prop.key))
32
- .map((prop) => prop.key)
33
- .map((key) => key.name);
34
- violations.push({
35
- rule: 'no-react-destructuring',
36
- severity: 'critical',
37
- line: path.node.loc?.start.line || 0,
38
- column: path.node.loc?.start.column || 0,
39
- message: `Cannot destructure from React. The hooks (${destructuredProps.join(', ')}) are already available as global functions in the React runtime.`,
40
- code: truncateCode(path.toString()),
41
- suggestion: {
42
- text: `Remove the destructuring statement. React hooks like ${destructuredProps.join(', ')} are already available globally and don't need to be imported or destructured.`,
43
- example: `// Remove this line entirely:
44
- // const { ${destructuredProps.join(', ')} } = React;
45
-
46
- // Just use the hooks directly:
47
- const [state, setState] = useState(initialValue);`,
48
- },
49
- });
50
- }
51
- },
52
- });
53
- return violations;
54
- }
55
- };
56
- NoReactDestructuringRule = __decorate([
57
- RegisterClass(BaseLintRule, 'no-react-destructuring')
58
- ], NoReactDestructuringRule);
59
- export { NoReactDestructuringRule };
60
- //# sourceMappingURL=no-react-destructuring.js.map
@@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,CAAC,CAAC;oBAE1B,UAAU,CAAC,IAAI,CAAC;wBACd,IAAI,EAAE,wBAAwB;wBAC9B,QAAQ,EAAE,UAAU;wBACpB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC;wBACpC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,IAAI,CAAC;wBACxC,OAAO,EAAE,6CAA6C,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,mEAAmE;wBACrJ,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;wBACnC,UAAU,EAAE;4BACV,IAAI,EAAE,wDAAwD,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,gFAAgF;4BAC1K,OAAO,EAAE;aACV,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;;;kDAGS;yBACrC;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAA;AAvCY,wBAAwB;IADpC,aAAa,CAAC,YAAY,EAAE,wBAAwB,CAAC;GACzC,wBAAwB,CAuCpC"}
@@ -1,18 +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: no-require-statements
6
- *
7
- * Ensures that interactive components do not use require() or dynamic import().
8
- * All dependencies must be passed as props.
9
- *
10
- * Severity: critical
11
- * Applies to: all components
12
- */
13
- export declare class NoRequireStatementsRule extends BaseLintRule {
14
- get Name(): string;
15
- get AppliesTo(): 'all' | 'child' | 'root';
16
- Test(ast: t.File, componentName: string): Violation[];
17
- }
18
- //# sourceMappingURL=no-require-statements.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-require-statements.d.ts","sourceRoot":"","sources":["../../../src/lib/runtime-rules/no-require-statements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD;;;;;;;;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,aAAa,EAAE,MAAM,GAAG,SAAS,EAAE;CAuGtD"}
@@ -1,109 +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 * as t from '@babel/types';
8
- import { RegisterClass } from '@memberjunction/global';
9
- import { BaseLintRule } from '../lint-rule.js';
10
- import { traverse, createViolation, truncateCode } from '../lint-utils.js';
11
- /**
12
- * Rule: no-require-statements
13
- *
14
- * Ensures that interactive components do not use require() or dynamic import().
15
- * All dependencies must be passed as props.
16
- *
17
- * Severity: critical
18
- * Applies to: all components
19
- */
20
- let NoRequireStatementsRule = class NoRequireStatementsRule extends BaseLintRule {
21
- get Name() { return 'no-require-statements'; }
22
- get AppliesTo() { return 'all'; }
23
- Test(ast, componentName) {
24
- const violations = [];
25
- traverse(ast, {
26
- CallExpression(path) {
27
- const callee = path.node.callee;
28
- // Check for require() calls
29
- if (t.isIdentifier(callee) && callee.name === 'require') {
30
- violations.push(createViolation('no-require-statements', 'critical', path.node, `Component "${componentName}" contains a require() statement. Interactive components cannot use require - all dependencies must be passed as props.`, truncateCode(path.toString()), {
31
- text: 'Remove all require() and dynamic import() statements. Use props instead.',
32
- example: `// ❌ WRONG - Using require or dynamic import:
33
- function MyComponent({ utilities }) {
34
- const lodash = require('lodash');
35
- const module = await import('./module');
36
-
37
- return <div>...</div>;
38
- }
39
-
40
- // ✅ CORRECT - Use utilities and components props:
41
- function MyComponent({ utilities, styles, components }) {
42
- // Use utilities for helper functions
43
- const result = utilities.debounce(() => {
44
- // ...
45
- }, 300);
46
-
47
- // Use components prop for child components
48
- const { DataTable, FilterPanel } = components;
49
-
50
- return (
51
- <div>
52
- <DataTable {...props} />
53
- <FilterPanel {...props} />
54
- </div>
55
- );
56
- }
57
-
58
- // Everything the component needs must be:
59
- // - Passed via props (utilities, components, styles)
60
- // - Available globally (React hooks)
61
- // No module loading allowed!`,
62
- }));
63
- }
64
- // Also check for dynamic import() calls
65
- if (t.isImport(callee)) {
66
- violations.push(createViolation('no-require-statements', 'critical', path.node, `Component "${componentName}" contains a dynamic import() statement. Interactive components cannot use dynamic imports - all dependencies must be passed as props.`, truncateCode(path.toString()), {
67
- text: 'Remove all require() and dynamic import() statements. Use props instead.',
68
- example: `// ❌ WRONG - Using require or dynamic import:
69
- function MyComponent({ utilities }) {
70
- const lodash = require('lodash');
71
- const module = await import('./module');
72
-
73
- return <div>...</div>;
74
- }
75
-
76
- // ✅ CORRECT - Use utilities and components props:
77
- function MyComponent({ utilities, styles, components }) {
78
- // Use utilities for helper functions
79
- const result = utilities.debounce(() => {
80
- // ...
81
- }, 300);
82
-
83
- // Use components prop for child components
84
- const { DataTable, FilterPanel } = components;
85
-
86
- return (
87
- <div>
88
- <DataTable {...props} />
89
- <FilterPanel {...props} />
90
- </div>
91
- );
92
- }
93
-
94
- // Everything the component needs must be:
95
- // - Passed via props (utilities, components, styles)
96
- // - Available globally (React hooks)
97
- // No module loading allowed!`,
98
- }));
99
- }
100
- },
101
- });
102
- return violations;
103
- }
104
- };
105
- NoRequireStatementsRule = __decorate([
106
- RegisterClass(BaseLintRule, 'no-require-statements')
107
- ], NoRequireStatementsRule);
108
- export { NoRequireStatementsRule };
109
- //# sourceMappingURL=no-require-statements.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-require-statements.js","sourceRoot":"","sources":["../../../src/lib/runtime-rules/no-require-statements.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAY,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElF;;;;;;;;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,aAAqB;QACrC,MAAM,UAAU,GAAgB,EAAE,CAAC;QAEnC,QAAQ,CAAC,GAAG,EAAE;YACZ,cAAc,CAAC,IAAgC;gBAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;gBAEhC,4BAA4B;gBAC5B,IAAI,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;oBACxD,UAAU,CAAC,IAAI,CACb,eAAe,CACb,uBAAuB,EACvB,UAAU,EACV,IAAI,CAAC,IAAI,EACT,cAAc,aAAa,yHAAyH,EACpJ,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAC7B;wBACE,IAAI,EAAE,0EAA0E;wBAChF,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA6BK;qBACf,CACF,CACF,CAAC;gBACJ,CAAC;gBAED,wCAAwC;gBACxC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;oBACvB,UAAU,CAAC,IAAI,CACb,eAAe,CACb,uBAAuB,EACvB,UAAU,EACV,IAAI,CAAC,IAAI,EACT,cAAc,aAAa,wIAAwI,EACnK,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAC7B;wBACE,IAAI,EAAE,0EAA0E;wBAChF,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA6BK;qBACf,CACF,CACF,CAAC;gBACJ,CAAC;YACH,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAA;AA3GY,uBAAuB;IADnC,aAAa,CAAC,YAAY,EAAE,uBAAuB,CAAC;GACxC,uBAAuB,CA2GnC"}
@@ -1,18 +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: no-return-component
6
- *
7
- * Ensures that components don't have return statements or component references
8
- * at the end of the file. The component function should stand alone.
9
- *
10
- * Severity: critical
11
- * Applies to: all components
12
- */
13
- export declare class NoReturnComponentRule extends BaseLintRule {
14
- get Name(): string;
15
- get AppliesTo(): 'all' | 'child' | 'root';
16
- Test(ast: t.File, componentName: string): Violation[];
17
- }
18
- //# sourceMappingURL=no-return-component.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-return-component.d.ts","sourceRoot":"","sources":["../../../src/lib/runtime-rules/no-return-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD;;;;;;;;GAQG;AACH,qBACa,qBAAsB,SAAQ,YAAY;IACrD,IAAI,IAAI,WAAoC;IAC5C,IAAI,SAAS,IAAI,KAAK,GAAG,OAAO,GAAG,MAAM,CAAkB;IAE3D,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,SAAS,EAAE;CAoGtD"}