@sfdxy/mule-lint 1.18.1 → 1.20.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 (250) hide show
  1. package/README.md +164 -151
  2. package/dist/bin/mule-lint-mcp.js.map +1 -1
  3. package/dist/bin/mule-lint.js +2 -2
  4. package/dist/bin/mule-lint.js.map +1 -1
  5. package/dist/package.json +26 -15
  6. package/dist/src/core/ComplexityCalculator.d.ts.map +1 -1
  7. package/dist/src/core/ComplexityCalculator.js.map +1 -1
  8. package/dist/src/core/FileScanner.d.ts.map +1 -1
  9. package/dist/src/core/FileScanner.js.map +1 -1
  10. package/dist/src/core/MetricsAggregator.d.ts.map +1 -1
  11. package/dist/src/core/MetricsAggregator.js +1 -1
  12. package/dist/src/core/MetricsAggregator.js.map +1 -1
  13. package/dist/src/core/MetricsCollector.d.ts.map +1 -1
  14. package/dist/src/core/MetricsCollector.js +1 -2
  15. package/dist/src/core/MetricsCollector.js.map +1 -1
  16. package/dist/src/core/QualityGateEvaluator.d.ts.map +1 -1
  17. package/dist/src/core/QualityGateEvaluator.js.map +1 -1
  18. package/dist/src/core/XPathHelper.d.ts.map +1 -1
  19. package/dist/src/core/XPathHelper.js +0 -1
  20. package/dist/src/core/XPathHelper.js.map +1 -1
  21. package/dist/src/core/XmlParser.d.ts.map +1 -1
  22. package/dist/src/core/XmlParser.js.map +1 -1
  23. package/dist/src/core/YamlParser.d.ts.map +1 -1
  24. package/dist/src/core/YamlParser.js.map +1 -1
  25. package/dist/src/core/errors.js.map +1 -1
  26. package/dist/src/engine/LintEngine.d.ts +10 -0
  27. package/dist/src/engine/LintEngine.d.ts.map +1 -1
  28. package/dist/src/engine/LintEngine.js +68 -4
  29. package/dist/src/engine/LintEngine.js.map +1 -1
  30. package/dist/src/formatter/MuleXmlFormatter.d.ts.map +1 -1
  31. package/dist/src/formatter/MuleXmlFormatter.js +7 -1
  32. package/dist/src/formatter/MuleXmlFormatter.js.map +1 -1
  33. package/dist/src/formatter/index.d.ts +2 -2
  34. package/dist/src/formatter/index.d.ts.map +1 -1
  35. package/dist/src/formatter/index.js.map +1 -1
  36. package/dist/src/formatters/CsvFormatter.js.map +1 -1
  37. package/dist/src/formatters/HtmlFormatter.js +0 -1
  38. package/dist/src/formatters/HtmlFormatter.js.map +1 -1
  39. package/dist/src/formatters/JsonFormatter.d.ts.map +1 -1
  40. package/dist/src/formatters/JsonFormatter.js.map +1 -1
  41. package/dist/src/formatters/SarifFormatter.js.map +1 -1
  42. package/dist/src/formatters/TableFormatter.js.map +1 -1
  43. package/dist/src/formatters/html/components/Icons.js +1 -1
  44. package/dist/src/formatters/html/components/Icons.js.map +1 -1
  45. package/dist/src/formatters/html/components/MetricCard.d.ts.map +1 -1
  46. package/dist/src/formatters/html/components/MetricCard.js.map +1 -1
  47. package/dist/src/formatters/html/components/Modal.d.ts.map +1 -1
  48. package/dist/src/formatters/html/components/Modal.js.map +1 -1
  49. package/dist/src/formatters/html/components/RatingBadge.d.ts.map +1 -1
  50. package/dist/src/formatters/html/components/RatingBadge.js +6 -6
  51. package/dist/src/formatters/html/components/RatingBadge.js.map +1 -1
  52. package/dist/src/formatters/html/index.d.ts +2 -2
  53. package/dist/src/formatters/html/index.d.ts.map +1 -1
  54. package/dist/src/formatters/html/index.js.map +1 -1
  55. package/dist/src/formatters/html/scripts/charts.d.ts.map +1 -1
  56. package/dist/src/formatters/html/scripts/charts.js +45 -12
  57. package/dist/src/formatters/html/scripts/charts.js.map +1 -1
  58. package/dist/src/formatters/html/scripts/index.d.ts.map +1 -1
  59. package/dist/src/formatters/html/scripts/index.js.map +1 -1
  60. package/dist/src/formatters/html/scripts/renderer.d.ts.map +1 -1
  61. package/dist/src/formatters/html/scripts/renderer.js +175 -35
  62. package/dist/src/formatters/html/scripts/renderer.js.map +1 -1
  63. package/dist/src/formatters/html/sections/Header.d.ts.map +1 -1
  64. package/dist/src/formatters/html/sections/Header.js.map +1 -1
  65. package/dist/src/formatters/html/sections/LintSummary.d.ts.map +1 -1
  66. package/dist/src/formatters/html/sections/LintSummary.js.map +1 -1
  67. package/dist/src/formatters/html/sections/QualityRatings.js.map +1 -1
  68. package/dist/src/formatters/html/sections/Sidebar.d.ts.map +1 -1
  69. package/dist/src/formatters/html/sections/Sidebar.js.map +1 -1
  70. package/dist/src/formatters/html/styles/badges.d.ts.map +1 -1
  71. package/dist/src/formatters/html/styles/badges.js.map +1 -1
  72. package/dist/src/formatters/html/styles/index.d.ts.map +1 -1
  73. package/dist/src/formatters/html/styles/index.js.map +1 -1
  74. package/dist/src/formatters/html/theme.js.map +1 -1
  75. package/dist/src/formatters/html/views/Dashboard.js +5 -5
  76. package/dist/src/formatters/html/views/Dashboard.js.map +1 -1
  77. package/dist/src/formatters/html/views/IssuesView.d.ts.map +1 -1
  78. package/dist/src/formatters/html/views/IssuesView.js.map +1 -1
  79. package/dist/src/formatters/index.js.map +1 -1
  80. package/dist/src/mcp/index.d.ts.map +1 -1
  81. package/dist/src/mcp/index.js +0 -1
  82. package/dist/src/mcp/index.js.map +1 -1
  83. package/dist/src/mcp/prompts/index.js.map +1 -1
  84. package/dist/src/mcp/resources/index.js +30 -7
  85. package/dist/src/mcp/resources/index.js.map +1 -1
  86. package/dist/src/mcp/tools/formatMuleXml.d.ts.map +1 -1
  87. package/dist/src/mcp/tools/formatMuleXml.js +4 -13
  88. package/dist/src/mcp/tools/formatMuleXml.js.map +1 -1
  89. package/dist/src/mcp/tools/getRuleDetails.d.ts.map +1 -1
  90. package/dist/src/mcp/tools/getRuleDetails.js +1 -3
  91. package/dist/src/mcp/tools/getRuleDetails.js.map +1 -1
  92. package/dist/src/mcp/tools/runLintAnalysis.js +9 -9
  93. package/dist/src/mcp/tools/runLintAnalysis.js.map +1 -1
  94. package/dist/src/mcp/tools/validateSnippet.d.ts.map +1 -1
  95. package/dist/src/mcp/tools/validateSnippet.js.map +1 -1
  96. package/dist/src/quality/calculator.d.ts.map +1 -1
  97. package/dist/src/quality/calculator.js +1 -1
  98. package/dist/src/quality/calculator.js.map +1 -1
  99. package/dist/src/quality/index.d.ts.map +1 -1
  100. package/dist/src/quality/index.js.map +1 -1
  101. package/dist/src/quality/thresholds.js.map +1 -1
  102. package/dist/src/quality/types.d.ts.map +1 -1
  103. package/dist/src/rules/api-led/ApiLedRules.d.ts.map +1 -1
  104. package/dist/src/rules/api-led/ApiLedRules.js +6 -2
  105. package/dist/src/rules/api-led/ApiLedRules.js.map +1 -1
  106. package/dist/src/rules/api-led/SingleSystemSapiRule.d.ts.map +1 -1
  107. package/dist/src/rules/api-led/SingleSystemSapiRule.js.map +1 -1
  108. package/dist/src/rules/base/BaseRule.d.ts.map +1 -1
  109. package/dist/src/rules/base/BaseRule.js.map +1 -1
  110. package/dist/src/rules/base/ProjectRule.d.ts.map +1 -1
  111. package/dist/src/rules/base/ProjectRule.js.map +1 -1
  112. package/dist/src/rules/complexity/FlowComplexityRule.d.ts.map +1 -1
  113. package/dist/src/rules/complexity/FlowComplexityRule.js.map +1 -1
  114. package/dist/src/rules/dataweave/DataWeaveRules.d.ts +6 -0
  115. package/dist/src/rules/dataweave/DataWeaveRules.d.ts.map +1 -1
  116. package/dist/src/rules/dataweave/DataWeaveRules.js +17 -3
  117. package/dist/src/rules/dataweave/DataWeaveRules.js.map +1 -1
  118. package/dist/src/rules/dataweave/Java17DWErrorHandlingRule.d.ts.map +1 -1
  119. package/dist/src/rules/dataweave/Java17DWErrorHandlingRule.js.map +1 -1
  120. package/dist/src/rules/documentation/DisplayNameRule.d.ts.map +1 -1
  121. package/dist/src/rules/documentation/DisplayNameRule.js.map +1 -1
  122. package/dist/src/rules/documentation/FlowDescriptionRule.d.ts.map +1 -1
  123. package/dist/src/rules/documentation/FlowDescriptionRule.js.map +1 -1
  124. package/dist/src/rules/documentation/MissingDocNameRule.d.ts.map +1 -1
  125. package/dist/src/rules/documentation/MissingDocNameRule.js.map +1 -1
  126. package/dist/src/rules/error-handling/CorrelationIdRule.d.ts +22 -1
  127. package/dist/src/rules/error-handling/CorrelationIdRule.d.ts.map +1 -1
  128. package/dist/src/rules/error-handling/CorrelationIdRule.js +107 -6
  129. package/dist/src/rules/error-handling/CorrelationIdRule.js.map +1 -1
  130. package/dist/src/rules/error-handling/GenericErrorRule.d.ts.map +1 -1
  131. package/dist/src/rules/error-handling/GenericErrorRule.js.map +1 -1
  132. package/dist/src/rules/error-handling/GlobalErrorHandlerRule.d.ts +14 -2
  133. package/dist/src/rules/error-handling/GlobalErrorHandlerRule.d.ts.map +1 -1
  134. package/dist/src/rules/error-handling/GlobalErrorHandlerRule.js +40 -18
  135. package/dist/src/rules/error-handling/GlobalErrorHandlerRule.js.map +1 -1
  136. package/dist/src/rules/error-handling/HttpStatusRule.d.ts +5 -0
  137. package/dist/src/rules/error-handling/HttpStatusRule.d.ts.map +1 -1
  138. package/dist/src/rules/error-handling/HttpStatusRule.js +15 -0
  139. package/dist/src/rules/error-handling/HttpStatusRule.js.map +1 -1
  140. package/dist/src/rules/error-handling/MissingErrorHandlerRule.d.ts.map +1 -1
  141. package/dist/src/rules/error-handling/MissingErrorHandlerRule.js.map +1 -1
  142. package/dist/src/rules/error-handling/TryScopeRule.d.ts.map +1 -1
  143. package/dist/src/rules/error-handling/TryScopeRule.js.map +1 -1
  144. package/dist/src/rules/experimental/ExperimentalRules.d.ts.map +1 -1
  145. package/dist/src/rules/experimental/ExperimentalRules.js +6 -2
  146. package/dist/src/rules/experimental/ExperimentalRules.js.map +1 -1
  147. package/dist/src/rules/governance/GovernanceRules.d.ts.map +1 -1
  148. package/dist/src/rules/governance/GovernanceRules.js.map +1 -1
  149. package/dist/src/rules/http/HttpContentTypeRule.d.ts +28 -1
  150. package/dist/src/rules/http/HttpContentTypeRule.d.ts.map +1 -1
  151. package/dist/src/rules/http/HttpContentTypeRule.js +68 -7
  152. package/dist/src/rules/http/HttpContentTypeRule.js.map +1 -1
  153. package/dist/src/rules/http/HttpTimeoutRule.d.ts.map +1 -1
  154. package/dist/src/rules/http/HttpTimeoutRule.js.map +1 -1
  155. package/dist/src/rules/http/HttpUserAgentRule.d.ts.map +1 -1
  156. package/dist/src/rules/http/HttpUserAgentRule.js.map +1 -1
  157. package/dist/src/rules/index.js.map +1 -1
  158. package/dist/src/rules/logging/ExcessiveLoggersRule.d.ts.map +1 -1
  159. package/dist/src/rules/logging/ExcessiveLoggersRule.js.map +1 -1
  160. package/dist/src/rules/logging/LoggerCategoryRule.d.ts.map +1 -1
  161. package/dist/src/rules/logging/LoggerCategoryRule.js.map +1 -1
  162. package/dist/src/rules/logging/LoggerInUntilSuccessfulRule.d.ts.map +1 -1
  163. package/dist/src/rules/logging/LoggerInUntilSuccessfulRule.js.map +1 -1
  164. package/dist/src/rules/logging/LoggerPayloadRule.d.ts.map +1 -1
  165. package/dist/src/rules/logging/LoggerPayloadRule.js.map +1 -1
  166. package/dist/src/rules/logging/NewLoggingRules.d.ts.map +1 -1
  167. package/dist/src/rules/logging/NewLoggingRules.js.map +1 -1
  168. package/dist/src/rules/naming/FlowCasingRule.d.ts.map +1 -1
  169. package/dist/src/rules/naming/FlowCasingRule.js.map +1 -1
  170. package/dist/src/rules/naming/FlowNamingRule.d.ts.map +1 -1
  171. package/dist/src/rules/naming/FlowNamingRule.js +3 -1
  172. package/dist/src/rules/naming/FlowNamingRule.js.map +1 -1
  173. package/dist/src/rules/naming/VariableNamingRule.d.ts.map +1 -1
  174. package/dist/src/rules/naming/VariableNamingRule.js.map +1 -1
  175. package/dist/src/rules/operations/CommentedCodeRule.d.ts.map +1 -1
  176. package/dist/src/rules/operations/CommentedCodeRule.js.map +1 -1
  177. package/dist/src/rules/operations/UnusedFlowRule.d.ts +6 -1
  178. package/dist/src/rules/operations/UnusedFlowRule.d.ts.map +1 -1
  179. package/dist/src/rules/operations/UnusedFlowRule.js +23 -9
  180. package/dist/src/rules/operations/UnusedFlowRule.js.map +1 -1
  181. package/dist/src/rules/performance/AsyncErrorHandlerRule.d.ts.map +1 -1
  182. package/dist/src/rules/performance/AsyncErrorHandlerRule.js.map +1 -1
  183. package/dist/src/rules/performance/ConnectionPoolingRule.d.ts +5 -0
  184. package/dist/src/rules/performance/ConnectionPoolingRule.d.ts.map +1 -1
  185. package/dist/src/rules/performance/ConnectionPoolingRule.js +18 -5
  186. package/dist/src/rules/performance/ConnectionPoolingRule.js.map +1 -1
  187. package/dist/src/rules/performance/LargeChoiceBlockRule.d.ts.map +1 -1
  188. package/dist/src/rules/performance/LargeChoiceBlockRule.js.map +1 -1
  189. package/dist/src/rules/performance/ReconnectionStrategyRule.d.ts +7 -0
  190. package/dist/src/rules/performance/ReconnectionStrategyRule.d.ts.map +1 -1
  191. package/dist/src/rules/performance/ReconnectionStrategyRule.js +15 -2
  192. package/dist/src/rules/performance/ReconnectionStrategyRule.js.map +1 -1
  193. package/dist/src/rules/performance/ScatterGatherRoutesRule.d.ts.map +1 -1
  194. package/dist/src/rules/performance/ScatterGatherRoutesRule.js.map +1 -1
  195. package/dist/src/rules/security/EncryptionKeyInLogsRule.d.ts.map +1 -1
  196. package/dist/src/rules/security/EncryptionKeyInLogsRule.js.map +1 -1
  197. package/dist/src/rules/security/HardcodedCredentialsRule.d.ts.map +1 -1
  198. package/dist/src/rules/security/HardcodedCredentialsRule.js.map +1 -1
  199. package/dist/src/rules/security/HardcodedHttpRule.d.ts.map +1 -1
  200. package/dist/src/rules/security/HardcodedHttpRule.js +1 -9
  201. package/dist/src/rules/security/HardcodedHttpRule.js.map +1 -1
  202. package/dist/src/rules/security/InputValidationRule.d.ts.map +1 -1
  203. package/dist/src/rules/security/InputValidationRule.js +1 -3
  204. package/dist/src/rules/security/InputValidationRule.js.map +1 -1
  205. package/dist/src/rules/security/InsecureTlsRule.d.ts.map +1 -1
  206. package/dist/src/rules/security/InsecureTlsRule.js.map +1 -1
  207. package/dist/src/rules/security/RateLimitingRule.d.ts.map +1 -1
  208. package/dist/src/rules/security/RateLimitingRule.js.map +1 -1
  209. package/dist/src/rules/security/TlsVersionRule.d.ts.map +1 -1
  210. package/dist/src/rules/security/TlsVersionRule.js.map +1 -1
  211. package/dist/src/rules/standards/ApiKitValidationRule.d.ts.map +1 -1
  212. package/dist/src/rules/standards/ApiKitValidationRule.js.map +1 -1
  213. package/dist/src/rules/standards/AutoDiscoveryRule.d.ts.map +1 -1
  214. package/dist/src/rules/standards/AutoDiscoveryRule.js.map +1 -1
  215. package/dist/src/rules/standards/ChoiceAntiPatternRule.d.ts.map +1 -1
  216. package/dist/src/rules/standards/ChoiceAntiPatternRule.js.map +1 -1
  217. package/dist/src/rules/standards/CronExternalizedRule.d.ts.map +1 -1
  218. package/dist/src/rules/standards/CronExternalizedRule.js.map +1 -1
  219. package/dist/src/rules/standards/DeprecatedComponentRule.d.ts.map +1 -1
  220. package/dist/src/rules/standards/DeprecatedComponentRule.js.map +1 -1
  221. package/dist/src/rules/standards/DwlStandardsRule.d.ts.map +1 -1
  222. package/dist/src/rules/standards/DwlStandardsRule.js.map +1 -1
  223. package/dist/src/rules/standards/HttpPortPlaceholderRule.d.ts.map +1 -1
  224. package/dist/src/rules/standards/HttpPortPlaceholderRule.js.map +1 -1
  225. package/dist/src/rules/structure/StructureRules.d.ts +8 -1
  226. package/dist/src/rules/structure/StructureRules.d.ts.map +1 -1
  227. package/dist/src/rules/structure/StructureRules.js +11 -7
  228. package/dist/src/rules/structure/StructureRules.js.map +1 -1
  229. package/dist/src/rules/yaml/YamlRules.d.ts.map +1 -1
  230. package/dist/src/rules/yaml/YamlRules.js +2 -7
  231. package/dist/src/rules/yaml/YamlRules.js.map +1 -1
  232. package/dist/src/types/Config.d.ts.map +1 -1
  233. package/dist/src/types/Config.js.map +1 -1
  234. package/dist/src/types/QualityGate.d.ts.map +1 -1
  235. package/dist/src/types/QualityGate.js.map +1 -1
  236. package/dist/src/types/Report.d.ts.map +1 -1
  237. package/dist/src/types/Rule.d.ts +22 -0
  238. package/dist/src/types/Rule.d.ts.map +1 -1
  239. package/docs/README.md +27 -27
  240. package/docs/best-practices/documentation-standards.md +20 -11
  241. package/docs/best-practices/folder-structure.md +16 -10
  242. package/docs/best-practices/mulesoft-best-practices.md +96 -94
  243. package/docs/best-practices/rules-catalog.md +422 -299
  244. package/docs/linter/architecture.md +70 -64
  245. package/docs/linter/extending.md +137 -128
  246. package/docs/linter/folder-structure.md +39 -38
  247. package/docs/linter/naming-conventions.md +80 -78
  248. package/docs/linter/rule-engine.md +306 -306
  249. package/docs/mcp-design.md +35 -21
  250. package/package.json +84 -73
@@ -134,13 +134,13 @@ mule-lint/
134
134
 
135
135
  **Purpose:** Low-level utilities that don't depend on business logic.
136
136
 
137
- | File | Responsibility |
138
- |------|----------------|
139
- | `XmlParser.ts` | Parse XML string to DOM, handle errors gracefully |
140
- | `XPathHelper.ts` | Namespace-aware XPath queries |
141
- | `YamlParser.ts` | Parse YAML files, detect sensitive keys |
142
- | `FileScanner.ts` | Discover `.xml` and `.yaml` files using glob patterns |
143
- | `ComplexityCalculator.ts` | Calculate cyclomatic complexity of flows |
137
+ | File | Responsibility |
138
+ | ------------------------- | ----------------------------------------------------- |
139
+ | `XmlParser.ts` | Parse XML string to DOM, handle errors gracefully |
140
+ | `XPathHelper.ts` | Namespace-aware XPath queries |
141
+ | `YamlParser.ts` | Parse YAML files, detect sensitive keys |
142
+ | `FileScanner.ts` | Discover `.xml` and `.yaml` files using glob patterns |
143
+ | `ComplexityCalculator.ts` | Calculate cyclomatic complexity of flows |
144
144
 
145
145
  ### `/src/rules`
146
146
 
@@ -148,24 +148,24 @@ mule-lint/
148
148
 
149
149
  **Rule Families (56 total):**
150
150
 
151
- | Family | Directory | Rules |
152
- |--------|-----------|-------|
153
- | API-Led | `api-led/` | API-001, 002, 003, 004, 005 |
154
- | Complexity | `complexity/` | MULE-801 |
155
- | DataWeave | `dataweave/` | DW-001, 002, 003, 004 |
156
- | Documentation | `documentation/` | MULE-601, 604 |
157
- | Error Handling | `error-handling/` | MULE-001, 003, 005, 007, 009, ERR-001 |
158
- | Experimental | `experimental/` | EXP-001, 002, 003 |
159
- | Governance | `governance/` | PROJ-001, 002 |
160
- | HTTP | `http/` | MULE-401, 402, 403 |
161
- | Logging | `logging/` | MULE-006, 301, 303, LOG-001, 004 |
162
- | Naming | `naming/` | MULE-002, 101, 102 |
163
- | Operations | `operations/` | RES-001, OPS-001, 002, 003, HYG-001, 002, 003, DOC-001, API-005 |
164
- | Performance | `performance/` | MULE-501, 502, 503, PERF-002 |
165
- | Security | `security/` | MULE-004, 201, 202, SEC-002, 003, 004, 006 |
166
- | Standards | `standards/` | MULE-008, 010, 701 |
167
- | Structure | `structure/` | MULE-802, 803, 804 |
168
- | YAML | `yaml/` | YAML-001, 003, 004 |
151
+ | Family | Directory | Rules |
152
+ | -------------- | ----------------- | --------------------------------------------------------------- |
153
+ | API-Led | `api-led/` | API-001, 002, 003, 004, 005 |
154
+ | Complexity | `complexity/` | MULE-801 |
155
+ | DataWeave | `dataweave/` | DW-001, 002, 003, 004 |
156
+ | Documentation | `documentation/` | MULE-601, 604 |
157
+ | Error Handling | `error-handling/` | MULE-001, 003, 005, 007, 009, ERR-001 |
158
+ | Experimental | `experimental/` | EXP-001, 002, 003 |
159
+ | Governance | `governance/` | PROJ-001, 002 |
160
+ | HTTP | `http/` | MULE-401, 402, 403 |
161
+ | Logging | `logging/` | MULE-006, 301, 303, LOG-001, 004 |
162
+ | Naming | `naming/` | MULE-002, 101, 102 |
163
+ | Operations | `operations/` | RES-001, OPS-001, 002, 003, HYG-001, 002, 003, DOC-001, API-005 |
164
+ | Performance | `performance/` | MULE-501, 502, 503, PERF-002 |
165
+ | Security | `security/` | MULE-004, 201, 202, SEC-002, 003, 004, 006 |
166
+ | Standards | `standards/` | MULE-008, 010, 701 |
167
+ | Structure | `structure/` | MULE-802, 803, 804 |
168
+ | YAML | `yaml/` | YAML-001, 003, 004 |
169
169
 
170
170
  **Convention:** Each rule file exports one or more classes implementing `Rule`.
171
171
 
@@ -173,12 +173,12 @@ mule-lint/
173
173
 
174
174
  **Purpose:** Transform `LintReport` to various output formats.
175
175
 
176
- | Formatter | Use Case |
177
- |-----------|----------|
178
- | `TableFormatter.ts` | Human-readable CLI output |
179
- | `JsonFormatter.ts` | Script/automation consumption |
176
+ | Formatter | Use Case |
177
+ | ------------------- | ----------------------------- |
178
+ | `TableFormatter.ts` | Human-readable CLI output |
179
+ | `JsonFormatter.ts` | Script/automation consumption |
180
180
  | `SarifFormatter.ts` | AI agents and IDE integration |
181
- | `HtmlFormatter.ts` | Standalone HTML reports |
181
+ | `HtmlFormatter.ts` | Standalone HTML reports |
182
182
 
183
183
  ### `/src/config`
184
184
 
@@ -189,6 +189,7 @@ mule-lint/
189
189
  **Purpose:** Sample XML files for testing rules.
190
190
 
191
191
  **Naming Convention:**
192
+
192
193
  - Prefix with rule ID: `MULE-001-global-error-handler.xml`
193
194
  - Or use descriptive names: `flow-with-missing-category.xml`
194
195
 
@@ -224,14 +225,14 @@ import { XPathHelper } from '@core/XPathHelper';
224
225
 
225
226
  ## File Naming
226
227
 
227
- | Type | Convention | Example |
228
- |------|------------|---------|
229
- | Rule class | PascalCase + `Rule` suffix | `FlowNamingRule.ts` |
230
- | Multi-rule file | Feature + `Rules` suffix | `YamlRules.ts` |
231
- | Utility class | PascalCase | `XPathHelper.ts` |
232
- | Type definition | PascalCase | `Issue.ts` |
233
- | Test file | Match source + `.test.ts` | `FlowNamingRule.test.ts` |
234
- | Config | lowercase with dots | `jest.config.js` |
228
+ | Type | Convention | Example |
229
+ | --------------- | -------------------------- | ------------------------ |
230
+ | Rule class | PascalCase + `Rule` suffix | `FlowNamingRule.ts` |
231
+ | Multi-rule file | Feature + `Rules` suffix | `YamlRules.ts` |
232
+ | Utility class | PascalCase | `XPathHelper.ts` |
233
+ | Type definition | PascalCase | `Issue.ts` |
234
+ | Test file | Match source + `.test.ts` | `FlowNamingRule.test.ts` |
235
+ | Config | lowercase with dots | `jest.config.js` |
235
236
 
236
237
  ---
237
238
 
@@ -10,36 +10,36 @@
10
10
 
11
11
  mule-lint uses multiple rule prefixes to organize rules by domain:
12
12
 
13
- | Prefix | Format | Domain | Example |
14
- |--------|--------|--------|---------|
15
- | `MULE` | `MULE-NNN` | Core MuleSoft XML validation | `MULE-001` |
16
- | `SEC` | `SEC-NNN` | Security best practices | `SEC-002` |
17
- | `LOG` | `LOG-NNN` | Structured logging | `LOG-001` |
18
- | `ERR` | `ERR-NNN` | Error handling best practices | `ERR-001` |
19
- | `PERF` | `PERF-NNN` | Performance optimization | `PERF-002` |
20
- | `OPS` | `OPS-NNN` | Operations/deployment | `OPS-001` |
21
- | `RES` | `RES-NNN` | Resilience patterns | `RES-001` |
22
- | `HYG` | `HYG-NNN` | Code hygiene | `HYG-001` |
23
- | `DOC` | `DOC-NNN` | Documentation requirements | `DOC-001` |
24
- | `PROJ` | `PROJ-NNN` | Project governance | `PROJ-001` |
25
- | `YAML` | `YAML-NNN` | YAML properties validation | `YAML-001` |
26
- | `DW` | `DW-NNN` | DataWeave file validation | `DW-001` |
27
- | `API` | `API-NNN` | API-Led patterns | `API-001` |
28
- | `EXP` | `EXP-NNN` | Experimental rules | `EXP-001` |
13
+ | Prefix | Format | Domain | Example |
14
+ | ------ | ---------- | ----------------------------- | ---------- |
15
+ | `MULE` | `MULE-NNN` | Core MuleSoft XML validation | `MULE-001` |
16
+ | `SEC` | `SEC-NNN` | Security best practices | `SEC-002` |
17
+ | `LOG` | `LOG-NNN` | Structured logging | `LOG-001` |
18
+ | `ERR` | `ERR-NNN` | Error handling best practices | `ERR-001` |
19
+ | `PERF` | `PERF-NNN` | Performance optimization | `PERF-002` |
20
+ | `OPS` | `OPS-NNN` | Operations/deployment | `OPS-001` |
21
+ | `RES` | `RES-NNN` | Resilience patterns | `RES-001` |
22
+ | `HYG` | `HYG-NNN` | Code hygiene | `HYG-001` |
23
+ | `DOC` | `DOC-NNN` | Documentation requirements | `DOC-001` |
24
+ | `PROJ` | `PROJ-NNN` | Project governance | `PROJ-001` |
25
+ | `YAML` | `YAML-NNN` | YAML properties validation | `YAML-001` |
26
+ | `DW` | `DW-NNN` | DataWeave file validation | `DW-001` |
27
+ | `API` | `API-NNN` | API-Led patterns | `API-001` |
28
+ | `EXP` | `EXP-NNN` | Experimental rules | `EXP-001` |
29
29
 
30
30
  ### MULE ID Ranges
31
31
 
32
- | Range | Category | Description |
33
- |-------|----------|-------------|
34
- | 001-099 | Error Handling | Error handler configuration and patterns |
35
- | 100-199 | Naming | Naming conventions for flows, variables |
36
- | 200-299 | Security | Security vulnerabilities, hardcoded values |
37
- | 300-399 | Logging | Logging standards and structured logging |
38
- | 400-499 | HTTP | HTTP configuration and headers |
39
- | 500-599 | Performance | Performance anti-patterns |
40
- | 600-699 | Documentation | Documentation requirements |
41
- | 700-799 | Standards | General coding standards |
42
- | 800-899 | Complexity/Structure | Code complexity and project structure |
32
+ | Range | Category | Description |
33
+ | ------- | -------------------- | ------------------------------------------ |
34
+ | 001-099 | Error Handling | Error handler configuration and patterns |
35
+ | 100-199 | Naming | Naming conventions for flows, variables |
36
+ | 200-299 | Security | Security vulnerabilities, hardcoded values |
37
+ | 300-399 | Logging | Logging standards and structured logging |
38
+ | 400-499 | HTTP | HTTP configuration and headers |
39
+ | 500-599 | Performance | Performance anti-patterns |
40
+ | 600-699 | Documentation | Documentation requirements |
41
+ | 700-799 | Standards | General coding standards |
42
+ | 800-899 | Complexity/Structure | Code complexity and project structure |
43
43
 
44
44
  ### Rule Names
45
45
 
@@ -72,23 +72,23 @@ description = 'Finds missing error handlers';
72
72
 
73
73
  ### Source Files
74
74
 
75
- | Type | Convention | Example |
76
- |------|------------|---------|
77
- | Rule class | PascalCase + `Rule` suffix | `FlowNamingRule.ts` |
78
- | Multi-rule file | Feature + `Rules` suffix | `YamlRules.ts`, `ApiLedRules.ts` |
79
- | Base class | PascalCase + `Base` prefix | `BaseRule.ts` |
80
- | Utility/Helper | PascalCase + `Helper`/`Utils` | `XPathHelper.ts` |
81
- | Type definitions | PascalCase, singular | `Issue.ts`, `Rule.ts` |
82
- | Constants | PascalCase or SCREAMING_SNAKE | `Defaults.ts` |
83
- | Index/barrel files | Lowercase `index.ts` | `index.ts` |
75
+ | Type | Convention | Example |
76
+ | ------------------ | ----------------------------- | -------------------------------- |
77
+ | Rule class | PascalCase + `Rule` suffix | `FlowNamingRule.ts` |
78
+ | Multi-rule file | Feature + `Rules` suffix | `YamlRules.ts`, `ApiLedRules.ts` |
79
+ | Base class | PascalCase + `Base` prefix | `BaseRule.ts` |
80
+ | Utility/Helper | PascalCase + `Helper`/`Utils` | `XPathHelper.ts` |
81
+ | Type definitions | PascalCase, singular | `Issue.ts`, `Rule.ts` |
82
+ | Constants | PascalCase or SCREAMING_SNAKE | `Defaults.ts` |
83
+ | Index/barrel files | Lowercase `index.ts` | `index.ts` |
84
84
 
85
85
  ### Test Files
86
86
 
87
- | Convention | Example |
88
- |------------|---------|
89
- | Unit test | `{ClassName}.test.ts` | `FlowNamingRule.test.ts` |
90
- | Integration test | `{feature}.integration.test.ts` | `engine.integration.test.ts` |
91
- | Fixture | Descriptive kebab-case | `flow-with-error-handler.xml` |
87
+ | Convention | Example |
88
+ | ---------------- | ------------------------------- | ----------------------------- |
89
+ | Unit test | `{ClassName}.test.ts` | `FlowNamingRule.test.ts` |
90
+ | Integration test | `{feature}.integration.test.ts` | `engine.integration.test.ts` |
91
+ | Fixture | Descriptive kebab-case | `flow-with-error-handler.xml` |
92
92
 
93
93
  ---
94
94
 
@@ -98,25 +98,25 @@ description = 'Finds missing error handlers';
98
98
 
99
99
  ```typescript
100
100
  // ✅ Good - PascalCase, descriptive
101
- class FlowNamingRule { }
102
- class XPathHelper { }
103
- class SarifFormatter { }
101
+ class FlowNamingRule {}
102
+ class XPathHelper {}
103
+ class SarifFormatter {}
104
104
 
105
105
  // ❌ Bad
106
- class flowrule { }
107
- class Helper { } // Too generic
106
+ class flowrule {}
107
+ class Helper {} // Too generic
108
108
  ```
109
109
 
110
110
  ### Interfaces
111
111
 
112
112
  ```typescript
113
113
  // ✅ Good - PascalCase, noun-based
114
- interface Rule { }
115
- interface ValidationContext { }
116
- interface LintReport { }
114
+ interface Rule {}
115
+ interface ValidationContext {}
116
+ interface LintReport {}
117
117
 
118
118
  // ❌ Bad - I-prefix (not TypeScript convention)
119
- interface IRule { }
119
+ interface IRule {}
120
120
  ```
121
121
 
122
122
  ### Type Aliases
@@ -139,8 +139,8 @@ const MULE_NAMESPACE = 'http://www.mulesoft.org/schema/mule/core';
139
139
 
140
140
  // ✅ Also acceptable - Object of related constants
141
141
  const ExitCodes = {
142
- Success: 0,
143
- Error: 1,
142
+ Success: 0,
143
+ Error: 1,
144
144
  } as const;
145
145
  ```
146
146
 
@@ -148,13 +148,13 @@ const ExitCodes = {
148
148
 
149
149
  ```typescript
150
150
  // ✅ Good - camelCase, verb-based
151
- function validateDocument(doc: Document): Issue[] { }
152
- function getLineNumber(node: Node): number { }
153
- function loadConfiguration(): Config { }
151
+ function validateDocument(doc: Document): Issue[] {}
152
+ function getLineNumber(node: Node): number {}
153
+ function loadConfiguration(): Config {}
154
154
 
155
155
  // ✅ Good - boolean getters with is/has/should prefix
156
- function isEnabled(rule: Rule): boolean { }
157
- function hasErrorHandler(flow: Node): boolean { }
156
+ function isEnabled(rule: Rule): boolean {}
157
+ function hasErrorHandler(flow: Node): boolean {}
158
158
  ```
159
159
 
160
160
  ### Variables
@@ -246,11 +246,11 @@ COMMON_UTILS.dwl
246
246
 
247
247
  ### Files
248
248
 
249
- | Type | Convention | Example |
250
- |------|------------|---------|
251
- | Main docs | lowercase-kebab | `rule-engine.md` |
252
- | Rule docs | Rule ID | `MULE-001.md` |
253
- | Guides | lowercase-kebab | `getting-started.md` |
249
+ | Type | Convention | Example |
250
+ | --------- | --------------- | -------------------- |
251
+ | Main docs | lowercase-kebab | `rule-engine.md` |
252
+ | Rule docs | Rule ID | `MULE-001.md` |
253
+ | Guides | lowercase-kebab | `getting-started.md` |
254
254
 
255
255
  ### Sections
256
256
 
@@ -258,7 +258,9 @@ Use sentence case for headers:
258
258
 
259
259
  ```markdown
260
260
  # Getting started
261
+
261
262
  ## How to install
263
+
262
264
  ### Running in CI/CD
263
265
  ```
264
266
 
@@ -291,19 +293,19 @@ chore: upgrade xmldom to 0.9.0
291
293
 
292
294
  ## Summary Table
293
295
 
294
- | Entity | Convention | Example |
295
- |--------|------------|---------|
296
- | File (rule class) | PascalCase + Rule | `FlowNamingRule.ts` |
297
- | File (multi-rule) | Feature + Rules | `YamlRules.ts` |
298
- | File (test) | {Class}.test.ts | `FlowNamingRule.test.ts` |
299
- | Class | PascalCase | `class FlowNamingRule` |
300
- | Interface | PascalCase | `interface Rule` |
301
- | Type | PascalCase | `type Severity` |
302
- | Constant | SCREAMING_SNAKE | `const MAX_FILES` |
303
- | Function | camelCase, verb | `validateDocument()` |
304
- | Variable | camelCase | `const filePath` |
305
- | Rule ID (MULE) | MULE-NNN | `MULE-001` |
306
- | Rule ID (YAML) | YAML-NNN | `YAML-001` |
307
- | Rule ID (DW) | DW-NNN | `DW-001` |
308
- | Rule ID (API) | API-NNN | `API-001` |
309
- | Rule ID (EXP) | EXP-NNN | `EXP-001` |
296
+ | Entity | Convention | Example |
297
+ | ----------------- | ----------------- | ------------------------ |
298
+ | File (rule class) | PascalCase + Rule | `FlowNamingRule.ts` |
299
+ | File (multi-rule) | Feature + Rules | `YamlRules.ts` |
300
+ | File (test) | {Class}.test.ts | `FlowNamingRule.test.ts` |
301
+ | Class | PascalCase | `class FlowNamingRule` |
302
+ | Interface | PascalCase | `interface Rule` |
303
+ | Type | PascalCase | `type Severity` |
304
+ | Constant | SCREAMING_SNAKE | `const MAX_FILES` |
305
+ | Function | camelCase, verb | `validateDocument()` |
306
+ | Variable | camelCase | `const filePath` |
307
+ | Rule ID (MULE) | MULE-NNN | `MULE-001` |
308
+ | Rule ID (YAML) | YAML-NNN | `YAML-001` |
309
+ | Rule ID (DW) | DW-NNN | `DW-001` |
310
+ | Rule ID (API) | API-NNN | `API-001` |
311
+ | Rule ID (EXP) | EXP-NNN | `EXP-001` |