@memberjunction/react-linter 0.0.1 → 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 (330) hide show
  1. package/dist/component-linter.d.ts +77 -0
  2. package/dist/component-linter.d.ts.map +1 -0
  3. package/dist/component-linter.js +1206 -0
  4. package/dist/component-linter.js.map +1 -0
  5. package/dist/control-flow-analyzer.d.ts +184 -0
  6. package/dist/control-flow-analyzer.d.ts.map +1 -0
  7. package/dist/control-flow-analyzer.js +798 -0
  8. package/dist/control-flow-analyzer.js.map +1 -0
  9. package/dist/index.d.ts +6 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +8 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/library-lint-cache.d.ts +50 -0
  14. package/dist/library-lint-cache.d.ts.map +1 -0
  15. package/dist/library-lint-cache.js +173 -0
  16. package/dist/library-lint-cache.js.map +1 -0
  17. package/dist/lint-rule.d.ts +70 -0
  18. package/dist/lint-rule.d.ts.map +1 -0
  19. package/dist/lint-rule.js +30 -0
  20. package/dist/lint-rule.js.map +1 -0
  21. package/dist/lint-utils.d.ts +131 -0
  22. package/dist/lint-utils.d.ts.map +1 -0
  23. package/dist/lint-utils.js +358 -0
  24. package/dist/lint-utils.js.map +1 -0
  25. package/dist/linter-options.d.ts +51 -0
  26. package/dist/linter-options.d.ts.map +1 -0
  27. package/dist/linter-options.js +2 -0
  28. package/dist/linter-options.js.map +1 -0
  29. package/dist/prop-value-extractor.d.ts +147 -0
  30. package/dist/prop-value-extractor.d.ts.map +1 -0
  31. package/dist/prop-value-extractor.js +472 -0
  32. package/dist/prop-value-extractor.js.map +1 -0
  33. package/dist/runtime-rules/ai-tools-availability-check.d.ts +9 -0
  34. package/dist/runtime-rules/ai-tools-availability-check.d.ts.map +1 -0
  35. package/dist/runtime-rules/ai-tools-availability-check.js +223 -0
  36. package/dist/runtime-rules/ai-tools-availability-check.js.map +1 -0
  37. package/dist/runtime-rules/callback-event-validation.d.ts +22 -0
  38. package/dist/runtime-rules/callback-event-validation.d.ts.map +1 -0
  39. package/dist/runtime-rules/callback-event-validation.js +561 -0
  40. package/dist/runtime-rules/callback-event-validation.js.map +1 -0
  41. package/dist/runtime-rules/chart-field-validation.d.ts +10 -0
  42. package/dist/runtime-rules/chart-field-validation.d.ts.map +1 -0
  43. package/dist/runtime-rules/chart-field-validation.js +270 -0
  44. package/dist/runtime-rules/chart-field-validation.js.map +1 -0
  45. package/dist/runtime-rules/child-component-prop-validation.d.ts +11 -0
  46. package/dist/runtime-rules/child-component-prop-validation.d.ts.map +1 -0
  47. package/dist/runtime-rules/child-component-prop-validation.js +443 -0
  48. package/dist/runtime-rules/child-component-prop-validation.js.map +1 -0
  49. package/dist/runtime-rules/component-name-mismatch.d.ts +19 -0
  50. package/dist/runtime-rules/component-name-mismatch.d.ts.map +1 -0
  51. package/dist/runtime-rules/component-name-mismatch.js +82 -0
  52. package/dist/runtime-rules/component-name-mismatch.js.map +1 -0
  53. package/dist/runtime-rules/component-not-in-dependencies.d.ts +20 -0
  54. package/dist/runtime-rules/component-not-in-dependencies.d.ts.map +1 -0
  55. package/dist/runtime-rules/component-not-in-dependencies.js +92 -0
  56. package/dist/runtime-rules/component-not-in-dependencies.js.map +1 -0
  57. package/dist/runtime-rules/component-props-validation.d.ts +25 -0
  58. package/dist/runtime-rules/component-props-validation.d.ts.map +1 -0
  59. package/dist/runtime-rules/component-props-validation.js +228 -0
  60. package/dist/runtime-rules/component-props-validation.js.map +1 -0
  61. package/dist/runtime-rules/component-usage-without-destructuring.d.ts +20 -0
  62. package/dist/runtime-rules/component-usage-without-destructuring.d.ts.map +1 -0
  63. package/dist/runtime-rules/component-usage-without-destructuring.js +124 -0
  64. package/dist/runtime-rules/component-usage-without-destructuring.js.map +1 -0
  65. package/dist/runtime-rules/data-result-validation.d.ts +9 -0
  66. package/dist/runtime-rules/data-result-validation.d.ts.map +1 -0
  67. package/dist/runtime-rules/data-result-validation.js +763 -0
  68. package/dist/runtime-rules/data-result-validation.js.map +1 -0
  69. package/dist/runtime-rules/datagrid-field-validation.d.ts +10 -0
  70. package/dist/runtime-rules/datagrid-field-validation.d.ts.map +1 -0
  71. package/dist/runtime-rules/datagrid-field-validation.js +249 -0
  72. package/dist/runtime-rules/datagrid-field-validation.js.map +1 -0
  73. package/dist/runtime-rules/dependency-shadowing.d.ts +20 -0
  74. package/dist/runtime-rules/dependency-shadowing.d.ts.map +1 -0
  75. package/dist/runtime-rules/dependency-shadowing.js +147 -0
  76. package/dist/runtime-rules/dependency-shadowing.js.map +1 -0
  77. package/dist/runtime-rules/entity-field-access-validation.d.ts +12 -0
  78. package/dist/runtime-rules/entity-field-access-validation.d.ts.map +1 -0
  79. package/dist/runtime-rules/entity-field-access-validation.js +304 -0
  80. package/dist/runtime-rules/entity-field-access-validation.js.map +1 -0
  81. package/dist/runtime-rules/event-parameter-validation.d.ts +22 -0
  82. package/dist/runtime-rules/event-parameter-validation.d.ts.map +1 -0
  83. package/dist/runtime-rules/event-parameter-validation.js +406 -0
  84. package/dist/runtime-rules/event-parameter-validation.js.map +1 -0
  85. package/dist/runtime-rules/index.d.ts +61 -0
  86. package/dist/runtime-rules/index.d.ts.map +1 -0
  87. package/dist/runtime-rules/index.js +62 -0
  88. package/dist/runtime-rules/index.js.map +1 -0
  89. package/dist/runtime-rules/library-variable-names.d.ts +24 -0
  90. package/dist/runtime-rules/library-variable-names.d.ts.map +1 -0
  91. package/dist/runtime-rules/library-variable-names.js +88 -0
  92. package/dist/runtime-rules/library-variable-names.js.map +1 -0
  93. package/dist/runtime-rules/no-child-implementation.d.ts +18 -0
  94. package/dist/runtime-rules/no-child-implementation.d.ts.map +1 -0
  95. package/dist/runtime-rules/no-child-implementation.js +57 -0
  96. package/dist/runtime-rules/no-child-implementation.js.map +1 -0
  97. package/dist/runtime-rules/no-data-prop.d.ts +22 -0
  98. package/dist/runtime-rules/no-data-prop.d.ts.map +1 -0
  99. package/dist/runtime-rules/no-data-prop.js +111 -0
  100. package/dist/runtime-rules/no-data-prop.js.map +1 -0
  101. package/dist/runtime-rules/no-export-statements.d.ts +18 -0
  102. package/dist/runtime-rules/no-export-statements.d.ts.map +1 -0
  103. package/dist/runtime-rules/no-export-statements.js +143 -0
  104. package/dist/runtime-rules/no-export-statements.js.map +1 -0
  105. package/dist/runtime-rules/no-iife-wrapper.d.ts +18 -0
  106. package/dist/runtime-rules/no-iife-wrapper.d.ts.map +1 -0
  107. package/dist/runtime-rules/no-iife-wrapper.js +217 -0
  108. package/dist/runtime-rules/no-iife-wrapper.js.map +1 -0
  109. package/dist/runtime-rules/no-import-statements.d.ts +18 -0
  110. package/dist/runtime-rules/no-import-statements.d.ts.map +1 -0
  111. package/dist/runtime-rules/no-import-statements.js +65 -0
  112. package/dist/runtime-rules/no-import-statements.js.map +1 -0
  113. package/dist/runtime-rules/no-react-destructuring.d.ts +18 -0
  114. package/dist/runtime-rules/no-react-destructuring.d.ts.map +1 -0
  115. package/dist/runtime-rules/no-react-destructuring.js +60 -0
  116. package/dist/runtime-rules/no-react-destructuring.js.map +1 -0
  117. package/dist/runtime-rules/no-require-statements.d.ts +18 -0
  118. package/dist/runtime-rules/no-require-statements.d.ts.map +1 -0
  119. package/dist/runtime-rules/no-require-statements.js +109 -0
  120. package/dist/runtime-rules/no-require-statements.js.map +1 -0
  121. package/dist/runtime-rules/no-return-component.d.ts +18 -0
  122. package/dist/runtime-rules/no-return-component.d.ts.map +1 -0
  123. package/dist/runtime-rules/no-return-component.js +106 -0
  124. package/dist/runtime-rules/no-return-component.js.map +1 -0
  125. package/dist/runtime-rules/no-unwrap-utility-libs.d.ts +20 -0
  126. package/dist/runtime-rules/no-unwrap-utility-libs.d.ts.map +1 -0
  127. package/dist/runtime-rules/no-unwrap-utility-libs.js +75 -0
  128. package/dist/runtime-rules/no-unwrap-utility-libs.js.map +1 -0
  129. package/dist/runtime-rules/no-use-reducer.d.ts +19 -0
  130. package/dist/runtime-rules/no-use-reducer.d.ts.map +1 -0
  131. package/dist/runtime-rules/no-use-reducer.js +78 -0
  132. package/dist/runtime-rules/no-use-reducer.js.map +1 -0
  133. package/dist/runtime-rules/no-window-access.d.ts +23 -0
  134. package/dist/runtime-rules/no-window-access.d.ts.map +1 -0
  135. package/dist/runtime-rules/no-window-access.js +136 -0
  136. package/dist/runtime-rules/no-window-access.js.map +1 -0
  137. package/dist/runtime-rules/noisy-settings-updates.d.ts +18 -0
  138. package/dist/runtime-rules/noisy-settings-updates.d.ts.map +1 -0
  139. package/dist/runtime-rules/noisy-settings-updates.js +110 -0
  140. package/dist/runtime-rules/noisy-settings-updates.js.map +1 -0
  141. package/dist/runtime-rules/overflow-hidden-on-layout-container.d.ts +30 -0
  142. package/dist/runtime-rules/overflow-hidden-on-layout-container.d.ts.map +1 -0
  143. package/dist/runtime-rules/overflow-hidden-on-layout-container.js +220 -0
  144. package/dist/runtime-rules/overflow-hidden-on-layout-container.js.map +1 -0
  145. package/dist/runtime-rules/pass-standard-props.d.ts +19 -0
  146. package/dist/runtime-rules/pass-standard-props.d.ts.map +1 -0
  147. package/dist/runtime-rules/pass-standard-props.js +82 -0
  148. package/dist/runtime-rules/pass-standard-props.js.map +1 -0
  149. package/dist/runtime-rules/prefer-async-await.d.ts +17 -0
  150. package/dist/runtime-rules/prefer-async-await.d.ts.map +1 -0
  151. package/dist/runtime-rules/prefer-async-await.js +52 -0
  152. package/dist/runtime-rules/prefer-async-await.js.map +1 -0
  153. package/dist/runtime-rules/prefer-jsx-syntax.d.ts +17 -0
  154. package/dist/runtime-rules/prefer-jsx-syntax.d.ts.map +1 -0
  155. package/dist/runtime-rules/prefer-jsx-syntax.js +51 -0
  156. package/dist/runtime-rules/prefer-jsx-syntax.js.map +1 -0
  157. package/dist/runtime-rules/prop-state-sync.d.ts +19 -0
  158. package/dist/runtime-rules/prop-state-sync.d.ts.map +1 -0
  159. package/dist/runtime-rules/prop-state-sync.js +76 -0
  160. package/dist/runtime-rules/prop-state-sync.js.map +1 -0
  161. package/dist/runtime-rules/property-name-consistency.d.ts +20 -0
  162. package/dist/runtime-rules/property-name-consistency.d.ts.map +1 -0
  163. package/dist/runtime-rules/property-name-consistency.js +172 -0
  164. package/dist/runtime-rules/property-name-consistency.js.map +1 -0
  165. package/dist/runtime-rules/query-result-field-access-validation.d.ts +10 -0
  166. package/dist/runtime-rules/query-result-field-access-validation.d.ts.map +1 -0
  167. package/dist/runtime-rules/query-result-field-access-validation.js +304 -0
  168. package/dist/runtime-rules/query-result-field-access-validation.js.map +1 -0
  169. package/dist/runtime-rules/react-component-naming.d.ts +19 -0
  170. package/dist/runtime-rules/react-component-naming.d.ts.map +1 -0
  171. package/dist/runtime-rules/react-component-naming.js +72 -0
  172. package/dist/runtime-rules/react-component-naming.js.map +1 -0
  173. package/dist/runtime-rules/react-hooks-rules.d.ts +27 -0
  174. package/dist/runtime-rules/react-hooks-rules.d.ts.map +1 -0
  175. package/dist/runtime-rules/react-hooks-rules.js +223 -0
  176. package/dist/runtime-rules/react-hooks-rules.js.map +1 -0
  177. package/dist/runtime-rules/required-queries-not-called.d.ts +19 -0
  178. package/dist/runtime-rules/required-queries-not-called.d.ts.map +1 -0
  179. package/dist/runtime-rules/required-queries-not-called.js +146 -0
  180. package/dist/runtime-rules/required-queries-not-called.js.map +1 -0
  181. package/dist/runtime-rules/runquery-call-validation.d.ts +11 -0
  182. package/dist/runtime-rules/runquery-call-validation.d.ts.map +1 -0
  183. package/dist/runtime-rules/runquery-call-validation.js +886 -0
  184. package/dist/runtime-rules/runquery-call-validation.js.map +1 -0
  185. package/dist/runtime-rules/runview-call-validation.d.ts +10 -0
  186. package/dist/runtime-rules/runview-call-validation.d.ts.map +1 -0
  187. package/dist/runtime-rules/runview-call-validation.js +336 -0
  188. package/dist/runtime-rules/runview-call-validation.js.map +1 -0
  189. package/dist/runtime-rules/saved-user-settings-pattern.d.ts +19 -0
  190. package/dist/runtime-rules/saved-user-settings-pattern.d.ts.map +1 -0
  191. package/dist/runtime-rules/saved-user-settings-pattern.js +90 -0
  192. package/dist/runtime-rules/saved-user-settings-pattern.js.map +1 -0
  193. package/dist/runtime-rules/search-availability-check.d.ts +9 -0
  194. package/dist/runtime-rules/search-availability-check.d.ts.map +1 -0
  195. package/dist/runtime-rules/search-availability-check.js +220 -0
  196. package/dist/runtime-rules/search-availability-check.js.map +1 -0
  197. package/dist/runtime-rules/search-call-validation.d.ts +9 -0
  198. package/dist/runtime-rules/search-call-validation.d.ts.map +1 -0
  199. package/dist/runtime-rules/search-call-validation.js +336 -0
  200. package/dist/runtime-rules/search-call-validation.js.map +1 -0
  201. package/dist/runtime-rules/server-reload-on-client-operation.d.ts +18 -0
  202. package/dist/runtime-rules/server-reload-on-client-operation.d.ts.map +1 -0
  203. package/dist/runtime-rules/server-reload-on-client-operation.js +107 -0
  204. package/dist/runtime-rules/server-reload-on-client-operation.js.map +1 -0
  205. package/dist/runtime-rules/single-function-only.d.ts +18 -0
  206. package/dist/runtime-rules/single-function-only.d.ts.map +1 -0
  207. package/dist/runtime-rules/single-function-only.js +103 -0
  208. package/dist/runtime-rules/single-function-only.js.map +1 -0
  209. package/dist/runtime-rules/string-replace-all-occurrences.d.ts +19 -0
  210. package/dist/runtime-rules/string-replace-all-occurrences.d.ts.map +1 -0
  211. package/dist/runtime-rules/string-replace-all-occurrences.js +109 -0
  212. package/dist/runtime-rules/string-replace-all-occurrences.js.map +1 -0
  213. package/dist/runtime-rules/string-template-validation.d.ts +22 -0
  214. package/dist/runtime-rules/string-template-validation.d.ts.map +1 -0
  215. package/dist/runtime-rules/string-template-validation.js +163 -0
  216. package/dist/runtime-rules/string-template-validation.js.map +1 -0
  217. package/dist/runtime-rules/styles-validation.d.ts +10 -0
  218. package/dist/runtime-rules/styles-validation.d.ts.map +1 -0
  219. package/dist/runtime-rules/styles-validation.js +153 -0
  220. package/dist/runtime-rules/styles-validation.js.map +1 -0
  221. package/dist/runtime-rules/type-inference-errors.d.ts +23 -0
  222. package/dist/runtime-rules/type-inference-errors.d.ts.map +1 -0
  223. package/dist/runtime-rules/type-inference-errors.js +53 -0
  224. package/dist/runtime-rules/type-inference-errors.js.map +1 -0
  225. package/dist/runtime-rules/type-mismatch-operation.d.ts +23 -0
  226. package/dist/runtime-rules/type-mismatch-operation.d.ts.map +1 -0
  227. package/dist/runtime-rules/type-mismatch-operation.js +145 -0
  228. package/dist/runtime-rules/type-mismatch-operation.js.map +1 -0
  229. package/dist/runtime-rules/undefined-component-usage.d.ts +20 -0
  230. package/dist/runtime-rules/undefined-component-usage.d.ts.map +1 -0
  231. package/dist/runtime-rules/undefined-component-usage.js +138 -0
  232. package/dist/runtime-rules/undefined-component-usage.js.map +1 -0
  233. package/dist/runtime-rules/undefined-jsx-component.d.ts +25 -0
  234. package/dist/runtime-rules/undefined-jsx-component.d.ts.map +1 -0
  235. package/dist/runtime-rules/undefined-jsx-component.js +269 -0
  236. package/dist/runtime-rules/undefined-jsx-component.js.map +1 -0
  237. package/dist/runtime-rules/unsafe-array-operations.d.ts +25 -0
  238. package/dist/runtime-rules/unsafe-array-operations.d.ts.map +1 -0
  239. package/dist/runtime-rules/unsafe-array-operations.js +347 -0
  240. package/dist/runtime-rules/unsafe-array-operations.js.map +1 -0
  241. package/dist/runtime-rules/unsafe-formatting-methods.d.ts +24 -0
  242. package/dist/runtime-rules/unsafe-formatting-methods.d.ts.map +1 -0
  243. package/dist/runtime-rules/unsafe-formatting-methods.js +277 -0
  244. package/dist/runtime-rules/unsafe-formatting-methods.js.map +1 -0
  245. package/dist/runtime-rules/unused-component-dependencies.d.ts +19 -0
  246. package/dist/runtime-rules/unused-component-dependencies.d.ts.map +1 -0
  247. package/dist/runtime-rules/unused-component-dependencies.js +90 -0
  248. package/dist/runtime-rules/unused-component-dependencies.js.map +1 -0
  249. package/dist/runtime-rules/unused-libraries.d.ts +19 -0
  250. package/dist/runtime-rules/unused-libraries.d.ts.map +1 -0
  251. package/dist/runtime-rules/unused-libraries.js +127 -0
  252. package/dist/runtime-rules/unused-libraries.js.map +1 -0
  253. package/dist/runtime-rules/use-function-declaration.d.ts +18 -0
  254. package/dist/runtime-rules/use-function-declaration.d.ts.map +1 -0
  255. package/dist/runtime-rules/use-function-declaration.js +127 -0
  256. package/dist/runtime-rules/use-function-declaration.js.map +1 -0
  257. package/dist/runtime-rules/use-unwrap-components.d.ts +19 -0
  258. package/dist/runtime-rules/use-unwrap-components.d.ts.map +1 -0
  259. package/dist/runtime-rules/use-unwrap-components.js +84 -0
  260. package/dist/runtime-rules/use-unwrap-components.js.map +1 -0
  261. package/dist/runtime-rules/useeffect-unstable-dependencies.d.ts +23 -0
  262. package/dist/runtime-rules/useeffect-unstable-dependencies.d.ts.map +1 -0
  263. package/dist/runtime-rules/useeffect-unstable-dependencies.js +215 -0
  264. package/dist/runtime-rules/useeffect-unstable-dependencies.js.map +1 -0
  265. package/dist/runtime-rules/utilities-api-validation.d.ts +24 -0
  266. package/dist/runtime-rules/utilities-api-validation.d.ts.map +1 -0
  267. package/dist/runtime-rules/utilities-api-validation.js +121 -0
  268. package/dist/runtime-rules/utilities-api-validation.js.map +1 -0
  269. package/dist/runtime-rules/utilities-no-direct-instantiation.d.ts +20 -0
  270. package/dist/runtime-rules/utilities-no-direct-instantiation.d.ts.map +1 -0
  271. package/dist/runtime-rules/utilities-no-direct-instantiation.js +58 -0
  272. package/dist/runtime-rules/utilities-no-direct-instantiation.js.map +1 -0
  273. package/dist/runtime-rules/validate-component-references.d.ts +19 -0
  274. package/dist/runtime-rules/validate-component-references.d.ts.map +1 -0
  275. package/dist/runtime-rules/validate-component-references.js +255 -0
  276. package/dist/runtime-rules/validate-component-references.js.map +1 -0
  277. package/dist/schema-validation/component-prop-rule.d.ts +131 -0
  278. package/dist/schema-validation/component-prop-rule.d.ts.map +1 -0
  279. package/dist/schema-validation/component-prop-rule.js +625 -0
  280. package/dist/schema-validation/component-prop-rule.js.map +1 -0
  281. package/dist/schema-validation/index.d.ts +26 -0
  282. package/dist/schema-validation/index.d.ts.map +1 -0
  283. package/dist/schema-validation/index.js +26 -0
  284. package/dist/schema-validation/index.js.map +1 -0
  285. package/dist/schema-validation/semantic-validators/index.d.ts +23 -0
  286. package/dist/schema-validation/semantic-validators/index.d.ts.map +1 -0
  287. package/dist/schema-validation/semantic-validators/index.js +23 -0
  288. package/dist/schema-validation/semantic-validators/index.js.map +1 -0
  289. package/dist/schema-validation/semantic-validators/required-when-validator.d.ts +43 -0
  290. package/dist/schema-validation/semantic-validators/required-when-validator.d.ts.map +1 -0
  291. package/dist/schema-validation/semantic-validators/required-when-validator.js +94 -0
  292. package/dist/schema-validation/semantic-validators/required-when-validator.js.map +1 -0
  293. package/dist/schema-validation/semantic-validators/semantic-validator-registry.d.ts +122 -0
  294. package/dist/schema-validation/semantic-validators/semantic-validator-registry.d.ts.map +1 -0
  295. package/dist/schema-validation/semantic-validators/semantic-validator-registry.js +166 -0
  296. package/dist/schema-validation/semantic-validators/semantic-validator-registry.js.map +1 -0
  297. package/dist/schema-validation/semantic-validators/semantic-validator.d.ts +260 -0
  298. package/dist/schema-validation/semantic-validators/semantic-validator.d.ts.map +1 -0
  299. package/dist/schema-validation/semantic-validators/semantic-validator.js +301 -0
  300. package/dist/schema-validation/semantic-validators/semantic-validator.js.map +1 -0
  301. package/dist/schema-validation/semantic-validators/sql-where-clause-validator.d.ts +115 -0
  302. package/dist/schema-validation/semantic-validators/sql-where-clause-validator.d.ts.map +1 -0
  303. package/dist/schema-validation/semantic-validators/sql-where-clause-validator.js +381 -0
  304. package/dist/schema-validation/semantic-validators/sql-where-clause-validator.js.map +1 -0
  305. package/dist/schema-validation/semantic-validators/subset-of-entity-fields-validator.d.ts +60 -0
  306. package/dist/schema-validation/semantic-validators/subset-of-entity-fields-validator.d.ts.map +1 -0
  307. package/dist/schema-validation/semantic-validators/subset-of-entity-fields-validator.js +195 -0
  308. package/dist/schema-validation/semantic-validators/subset-of-entity-fields-validator.js.map +1 -0
  309. package/dist/schema-validation/semantic-validators/validation-context.d.ts +335 -0
  310. package/dist/schema-validation/semantic-validators/validation-context.d.ts.map +1 -0
  311. package/dist/schema-validation/semantic-validators/validation-context.js +13 -0
  312. package/dist/schema-validation/semantic-validators/validation-context.js.map +1 -0
  313. package/dist/styles-type-analyzer.d.ts +64 -0
  314. package/dist/styles-type-analyzer.d.ts.map +1 -0
  315. package/dist/styles-type-analyzer.js +242 -0
  316. package/dist/styles-type-analyzer.js.map +1 -0
  317. package/dist/type-context.d.ts +184 -0
  318. package/dist/type-context.d.ts.map +1 -0
  319. package/dist/type-context.js +415 -0
  320. package/dist/type-context.js.map +1 -0
  321. package/dist/type-inference-engine.d.ts +181 -0
  322. package/dist/type-inference-engine.d.ts.map +1 -0
  323. package/dist/type-inference-engine.js +1151 -0
  324. package/dist/type-inference-engine.js.map +1 -0
  325. package/dist/type-rules/type-compatibility-rule.d.ts +85 -0
  326. package/dist/type-rules/type-compatibility-rule.d.ts.map +1 -0
  327. package/dist/type-rules/type-compatibility-rule.js +211 -0
  328. package/dist/type-rules/type-compatibility-rule.js.map +1 -0
  329. package/package.json +35 -7
  330. package/README.md +0 -45
@@ -0,0 +1,270 @@
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 * as t from '@babel/types';
9
+ import { RegisterClass } from '@memberjunction/global';
10
+ import { BaseLintRule } from '../lint-rule.js';
11
+ import { TypeContext, mapSQLTypeToJSType } from '../type-context.js';
12
+ /**
13
+ * Rule: chart-field-validation
14
+ *
15
+ * Validates that chart component props reference fields that exist in the data source.
16
+ * Checks valueField, groupByField/groupBy, and seriesField against available fields
17
+ * from entity metadata or query fieldMetadata in the spec. Also validates that
18
+ * aggregate functions (average, sum) are only applied to numeric fields.
19
+ *
20
+ * Severity: high
21
+ * Applies to: all components
22
+ */
23
+ /** Chart-related prop names that reference data fields */
24
+ const CHART_FIELD_PROPS = new Set(['valueField', 'groupByField', 'groupBy', 'seriesField']);
25
+ /** Props that specify aggregate functions */
26
+ const AGGREGATE_PROP = 'aggregateFunction';
27
+ /** Aggregate functions that require numeric fields */
28
+ const NUMERIC_AGGREGATES = new Set(['sum', 'average', 'avg', 'min', 'max', 'median', 'standardDeviation']);
29
+ /** SQL types that map to numeric JavaScript types */
30
+ const NUMERIC_SQL_TYPES = new Set([
31
+ 'int', 'bigint', 'smallint', 'tinyint', 'decimal', 'numeric',
32
+ 'float', 'real', 'money', 'smallmoney',
33
+ ]);
34
+ /** Chart component name patterns */
35
+ const CHART_COMPONENT_NAMES = new Set(['SimpleChart', 'MultiSeriesChart']);
36
+ /**
37
+ * Checks if a JSX element name matches a chart component.
38
+ * Matches known chart names and dependency components with chart-related props.
39
+ */
40
+ function isChartComponent(elementName, hasChartProps) {
41
+ if (CHART_COMPONENT_NAMES.has(elementName))
42
+ return true;
43
+ // If the element has chart field props, treat it as a chart component
44
+ return hasChartProps;
45
+ }
46
+ /**
47
+ * Collects available field names and their SQL types from the component spec's data requirements.
48
+ * Merges entity fieldMetadata and query fields into a unified map.
49
+ */
50
+ function collectAvailableFields(typeContext, componentSpec) {
51
+ const fieldMap = new Map(); // fieldName -> sqlType
52
+ // Collect from entities
53
+ if (componentSpec.dataRequirements?.entities) {
54
+ for (const entity of componentSpec.dataRequirements.entities) {
55
+ const entityFields = typeContext.getEntityFieldTypesSync(entity.name);
56
+ for (const [fieldName, fieldInfo] of entityFields) {
57
+ fieldMap.set(fieldName, fieldInfo.sqlType ?? 'nvarchar');
58
+ }
59
+ // Also use fieldMetadata directly from the spec (lightweight info)
60
+ if (entity.fieldMetadata) {
61
+ for (const fm of entity.fieldMetadata) {
62
+ if (!fieldMap.has(fm.name)) {
63
+ fieldMap.set(fm.name, fm.type);
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ // Collect from queries
70
+ if (componentSpec.dataRequirements?.queries) {
71
+ for (const query of componentSpec.dataRequirements.queries) {
72
+ const queryFields = typeContext.getQueryFieldTypes(query.name, query.categoryPath);
73
+ if (queryFields) {
74
+ for (const [fieldName, fieldInfo] of queryFields) {
75
+ if (!fieldMap.has(fieldName)) {
76
+ fieldMap.set(fieldName, fieldInfo.sqlType ?? 'nvarchar');
77
+ }
78
+ }
79
+ }
80
+ // Also use fields directly from the query spec
81
+ if (query.fields) {
82
+ for (const f of query.fields) {
83
+ if (!fieldMap.has(f.name)) {
84
+ fieldMap.set(f.name, f.type);
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ return fieldMap;
91
+ }
92
+ /**
93
+ * Checks whether a SQL type is numeric.
94
+ */
95
+ function isNumericSqlType(sqlType) {
96
+ const normalized = sqlType.toLowerCase().replace(/\(.*\)/, '').trim();
97
+ if (NUMERIC_SQL_TYPES.has(normalized))
98
+ return true;
99
+ return mapSQLTypeToJSType(normalized) === 'number';
100
+ }
101
+ /**
102
+ * Extracts JSX attribute props from a JSXOpeningElement and returns them as a map.
103
+ */
104
+ function extractJsxProps(openingElement) {
105
+ const props = new Map();
106
+ for (const attr of openingElement.attributes) {
107
+ if (t.isJSXAttribute(attr) && t.isJSXIdentifier(attr.name)) {
108
+ props.set(attr.name.name, attr);
109
+ }
110
+ }
111
+ return props;
112
+ }
113
+ /**
114
+ * Extracts a string literal value from a JSX attribute value node.
115
+ * Returns null if the value is not a string literal.
116
+ */
117
+ function getStringLiteralFromAttr(attr) {
118
+ if (t.isStringLiteral(attr.value)) {
119
+ return attr.value.value;
120
+ }
121
+ // Handle JSXExpressionContainer wrapping a string literal
122
+ if (t.isJSXExpressionContainer(attr.value) &&
123
+ t.isStringLiteral(attr.value.expression)) {
124
+ return attr.value.expression.value;
125
+ }
126
+ return null;
127
+ }
128
+ /**
129
+ * Validates that chart field props (valueField, groupBy, seriesField) reference
130
+ * fields that exist in the available data source fields.
131
+ */
132
+ function validateChartFieldProps(props, availableFields, violations) {
133
+ for (const propName of CHART_FIELD_PROPS) {
134
+ const attr = props.get(propName);
135
+ if (!attr)
136
+ continue;
137
+ const fieldValue = getStringLiteralFromAttr(attr);
138
+ if (!fieldValue)
139
+ continue;
140
+ if (!availableFields.has(fieldValue)) {
141
+ const available = Array.from(availableFields.keys()).slice(0, 10);
142
+ const moreText = availableFields.size > 10
143
+ ? ` and ${availableFields.size - 10} more`
144
+ : '';
145
+ violations.push({
146
+ rule: 'chart-field-validation',
147
+ severity: 'high',
148
+ line: attr.loc?.start.line ?? 0,
149
+ column: attr.loc?.start.column ?? 0,
150
+ message: `Chart prop "${propName}" references field "${fieldValue}" which does not exist in the data source. Available fields: ${available.join(', ')}${moreText}`,
151
+ code: `${propName}="${fieldValue}"`,
152
+ suggestion: {
153
+ text: `Use one of the available fields: ${available.join(', ')}${moreText}`,
154
+ },
155
+ });
156
+ }
157
+ }
158
+ }
159
+ /**
160
+ * Validates that aggregate functions (sum, average, etc.) are only applied
161
+ * to numeric valueField references.
162
+ */
163
+ function validateAggregateFunction(props, availableFields, violations) {
164
+ const aggregateAttr = props.get(AGGREGATE_PROP);
165
+ if (!aggregateAttr)
166
+ return;
167
+ const aggregateValue = getStringLiteralFromAttr(aggregateAttr);
168
+ if (!aggregateValue)
169
+ return;
170
+ if (!NUMERIC_AGGREGATES.has(aggregateValue.toLowerCase()))
171
+ return;
172
+ // Check if valueField references a non-numeric field
173
+ const valueFieldAttr = props.get('valueField');
174
+ if (!valueFieldAttr)
175
+ return;
176
+ const valueFieldName = getStringLiteralFromAttr(valueFieldAttr);
177
+ if (!valueFieldName)
178
+ return;
179
+ const sqlType = availableFields.get(valueFieldName);
180
+ if (!sqlType)
181
+ return; // Field doesn't exist - already caught by field validation
182
+ if (!isNumericSqlType(sqlType)) {
183
+ violations.push({
184
+ rule: 'chart-field-validation',
185
+ severity: 'high',
186
+ line: aggregateAttr.loc?.start.line ?? 0,
187
+ column: aggregateAttr.loc?.start.column ?? 0,
188
+ message: `Aggregate function "${aggregateValue}" requires a numeric field, but valueField "${valueFieldName}" has type "${sqlType}" which is not numeric`,
189
+ code: `aggregateFunction="${aggregateValue}" valueField="${valueFieldName}"`,
190
+ suggestion: {
191
+ text: `Use a numeric field for "${aggregateValue}" aggregation, or use "count" which works on all field types`,
192
+ },
193
+ });
194
+ }
195
+ }
196
+ let ChartFieldValidationRule = class ChartFieldValidationRule extends BaseLintRule {
197
+ get Name() { return 'chart-field-validation'; }
198
+ get AppliesTo() { return 'all'; }
199
+ Test(ast, _componentName, componentSpec) {
200
+ const violations = [];
201
+ if (!componentSpec?.dataRequirements) {
202
+ return violations;
203
+ }
204
+ const typeContext = new TypeContext(componentSpec);
205
+ const availableFields = collectAvailableFields(typeContext, componentSpec);
206
+ // If no fields found in the spec, skip validation
207
+ if (availableFields.size === 0) {
208
+ return violations;
209
+ }
210
+ // Check if the component contains data transformations (.map, .reduce, .flatMap)
211
+ // that could create computed fields not in the original metadata.
212
+ // If so, skip chart field validation since we can't statically determine field names.
213
+ let hasDataTransformations = false;
214
+ traverse(ast, {
215
+ CallExpression(p) {
216
+ if (t.isMemberExpression(p.node.callee) && t.isIdentifier(p.node.callee.property)) {
217
+ const method = p.node.callee.property.name;
218
+ if (['map', 'flatMap', 'reduce'].includes(method)) {
219
+ hasDataTransformations = true;
220
+ p.stop();
221
+ }
222
+ }
223
+ },
224
+ noScope: true,
225
+ });
226
+ if (hasDataTransformations) {
227
+ return violations;
228
+ }
229
+ traverse(ast, {
230
+ JSXOpeningElement(path) {
231
+ const nameNode = path.node.name;
232
+ if (!t.isJSXIdentifier(nameNode))
233
+ return;
234
+ const props = extractJsxProps(path.node);
235
+ const hasChartProps = Array.from(props.keys()).some((p) => CHART_FIELD_PROPS.has(p) || p === AGGREGATE_PROP);
236
+ if (!isChartComponent(nameNode.name, hasChartProps))
237
+ return;
238
+ // Check if the data prop comes from a transformation (.map, .reduce, etc.)
239
+ // If so, the fields may differ from raw metadata — skip validation
240
+ const dataAttr = props.get('data');
241
+ if (dataAttr) {
242
+ const dataValue = t.isJSXExpressionContainer(dataAttr.value) ? dataAttr.value.expression : null;
243
+ if (dataValue && t.isIdentifier(dataValue)) {
244
+ const binding = path.scope.getBinding(dataValue.name);
245
+ if (binding && t.isVariableDeclarator(binding.path.node)) {
246
+ const init = binding.path.node.init;
247
+ // Check if initialized from a .map(), .filter(), .reduce(), etc.
248
+ if (init && t.isCallExpression(init) && t.isMemberExpression(init.callee) && t.isIdentifier(init.callee.property)) {
249
+ const method = init.callee.property.name;
250
+ if (['map', 'flatMap', 'reduce'].includes(method)) {
251
+ return; // Data is transformed — can't validate fields statically
252
+ }
253
+ }
254
+ }
255
+ }
256
+ }
257
+ // Validate each chart field prop
258
+ validateChartFieldProps(props, availableFields, violations);
259
+ // Validate aggregate function on numeric fields
260
+ validateAggregateFunction(props, availableFields, violations);
261
+ },
262
+ });
263
+ return violations;
264
+ }
265
+ };
266
+ ChartFieldValidationRule = __decorate([
267
+ RegisterClass(BaseLintRule, 'chart-field-validation')
268
+ ], ChartFieldValidationRule);
269
+ export { ChartFieldValidationRule };
270
+ //# sourceMappingURL=chart-field-validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart-field-validation.js","sourceRoot":"","sources":["../../src/runtime-rules/chart-field-validation.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAY,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAElE;;;;;;;;;;G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M,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;4BACpC,iEAAiE;4BACjE,IAAI,IAAI,IAAI,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;gCAClH,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;gCACzC,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;oCAClD,OAAO,CAAC,yDAAyD;gCACnE,CAAC;4BACH,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;gBAED,iCAAiC;gBACjC,uBAAuB,CAAC,KAAK,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;gBAE5D,gDAAgD;gBAChD,yBAAyB,CAAC,KAAK,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;YAChE,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAA;AAjFY,wBAAwB;IADpC,aAAa,CAAC,YAAY,EAAE,wBAAwB,CAAC;GACzC,wBAAwB,CAiFpC"}
@@ -0,0 +1,11 @@
1
+ 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
+ import type { LinterOptions } from '../linter-options.js';
6
+ export declare class ChildComponentPropValidationRule extends BaseLintRule {
7
+ get Name(): string;
8
+ get AppliesTo(): 'all' | 'child' | 'root';
9
+ Test(ast: t.File, _componentName: string, componentSpec?: ComponentSpec, options?: LinterOptions): Violation[];
10
+ }
11
+ //# sourceMappingURL=child-component-prop-validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"child-component-prop-validation.d.ts","sourceRoot":"","sources":["../../src/runtime-rules/child-component-prop-validation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAE5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAwWvD,qBACa,gCAAiC,SAAQ,YAAY;IAChE,IAAI,IAAI,WAAgD;IACxD,IAAI,SAAS,IAAI,KAAK,GAAG,OAAO,GAAG,MAAM,CAAkB;IAE3D,IAAI,CACF,GAAG,EAAE,CAAC,CAAC,IAAI,EACX,cAAc,EAAE,MAAM,EACtB,aAAa,CAAC,EAAE,aAAa,EAC7B,OAAO,CAAC,EAAE,aAAa,GACtB,SAAS,EAAE;CAmIf"}