@eventcatalog/core 4.10.12 → 4.10.14

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 (179) hide show
  1. package/dist/analytics/analytics.cjs +1 -1
  2. package/dist/analytics/analytics.js +2 -2
  3. package/dist/analytics/log-build.cjs +1 -1
  4. package/dist/analytics/log-build.js +3 -3
  5. package/dist/{chunk-7URQ754Q.js → chunk-HERAHLM2.js} +1 -1
  6. package/dist/{chunk-Y5XU3YLT.js → chunk-LITOQH56.js} +1 -1
  7. package/dist/{chunk-S4LLGOO4.js → chunk-LUW6RDA7.js} +1 -1
  8. package/dist/{chunk-VFSEVDCQ.js → chunk-ONDFEA5R.js} +1 -1
  9. package/dist/{chunk-A53VCEEA.js → chunk-V2SKOQYF.js} +1 -1
  10. package/dist/constants.cjs +1 -1
  11. package/dist/constants.js +1 -1
  12. package/dist/docs/api/02-config.md +55 -1
  13. package/dist/docs/development/authentication/providers/03-setting-up-github.md +29 -0
  14. package/dist/docs/development/bring-your-own-documentation/custom-pages/02-adding-custom-docs.md +2 -2
  15. package/dist/docs/development/bring-your-own-documentation/custom-pages/03-components.md +17 -0
  16. package/dist/docs/development/components/07-resource-references.md +7 -1
  17. package/dist/docs/development/components/components/05-architecture-graph.md +65 -0
  18. package/dist/docs/development/components/components/{05-attachments.md → 06-attachments.md} +1 -1
  19. package/dist/docs/development/components/components/{06-channel-information.md → 07-channel-information.md} +1 -1
  20. package/dist/docs/development/components/components/{07-custom-properties.md → 08-custom-properties.md} +1 -1
  21. package/dist/docs/development/components/components/{08-design.md → 09-design.md} +1 -1
  22. package/dist/docs/development/components/components/{09-entitymap.md → 10-entitymap.md} +1 -1
  23. package/dist/docs/development/components/components/{10-flow.md → 11-flow.md} +1 -1
  24. package/dist/docs/development/components/components/{11-link.md → 12-link.md} +1 -1
  25. package/dist/docs/development/components/components/{12-mermaid-file-loader.md → 13-mermaid-file-loader.md} +1 -1
  26. package/dist/docs/development/components/components/{13-message-table.md → 14-message-table.md} +1 -1
  27. package/dist/docs/development/components/components/{14-nodegraph.md → 15-nodegraph.md} +1 -1
  28. package/dist/docs/development/components/components/{15-openapi.md → 16-openapi.md} +1 -1
  29. package/dist/docs/development/components/components/{16-prompt.md → 17-prompt.md} +1 -1
  30. package/dist/docs/development/components/components/{17-remote-schema.md → 18-remote-schema.md} +1 -1
  31. package/dist/docs/development/components/components/{18-resource-group-table.md → 19-resource-group-table.md} +1 -1
  32. package/dist/docs/development/components/components/{19-resource-link.md → 20-resource-link.md} +1 -1
  33. package/dist/docs/development/components/components/{20-schema.md → 21-schema.md} +1 -1
  34. package/dist/docs/development/components/components/{21-schema-viewer.md → 22-schema-viewer.md} +1 -1
  35. package/dist/docs/development/components/components/{22-steps.md → 23-steps.md} +1 -1
  36. package/dist/docs/development/components/components/{23-tabs.md → 24-tabs.md} +1 -1
  37. package/dist/docs/development/components/components/{24-tiles.md → 25-tiles.md} +1 -1
  38. package/dist/docs/development/components/components/{25-visibility.md → 26-visibility.md} +1 -1
  39. package/dist/docs/development/customization/04-documentation-sidebar.md +3 -3
  40. package/dist/docs/development/customization/05-resource-sidebar.md +235 -0
  41. package/dist/docs/development/customization/09-embed-eventcatalog.md +179 -0
  42. package/dist/docs/development/customization/_category_.json +1 -1
  43. package/dist/docs/development/deployment/build-and-deploy.md +4 -0
  44. package/dist/docs/development/deployment/hosting-options.md +1 -1
  45. package/dist/docs/development/deployment/link-validation.md +105 -0
  46. package/dist/docs/development/developer-tools/eventcatalog-linter/00-overview.md +76 -0
  47. package/dist/docs/development/developer-tools/eventcatalog-linter/01-setup.md +144 -0
  48. package/dist/docs/development/developer-tools/eventcatalog-linter/_category_.json +10 -0
  49. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/01-configure-rules.md +130 -0
  50. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/02-run-in-ci.md +93 -0
  51. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/03-use-custom-frontmatter.md +81 -0
  52. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/04-reference-external-catalogs.md +51 -0
  53. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/05-fix-common-problems.md +120 -0
  54. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/_category_.json +12 -0
  55. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/01-cli.md +109 -0
  56. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/02-configuration.md +120 -0
  57. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/03-rules.md +287 -0
  58. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/04-versions.md +77 -0
  59. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/05-supported-resources.md +75 -0
  60. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/_category_.json +12 -0
  61. package/dist/docs/development/guides/97-architecture-graph.md +78 -0
  62. package/dist/docs/development/guides/domains/02-create-domain.md +1 -1
  63. package/dist/docs/development/guides/domains/03-ownership-and-language/02-adding-ubiquitous-language.md +29 -0
  64. package/dist/docs/development/guides/domains/09-reference.md +10 -0
  65. package/dist/docs/development/guides/resources/messages/04-message-channels/02-adding-channels.md +2 -2
  66. package/dist/docs/development/guides/resources/messages/04-message-channels/04-adding-messages-to-services.md +8 -0
  67. package/dist/docs/development/guides/resources/schemas/03-add-specifications-to-services/01-add-openapi-specifications.md +2 -2
  68. package/dist/docs/development/guides/resources/schemas/03-add-specifications-to-services/02-add-asyncapi-specifications.md +3 -3
  69. package/dist/docs/development/guides/systems/05-system-context-maps.md +2 -0
  70. package/dist/docs/development/license-keys/license-validation.md +7 -3
  71. package/dist/docs/development/license-keys/overview.md +7 -3
  72. package/dist/docs/development/upgrading/upgrading.md +3 -3
  73. package/dist/docs/development/upgrading/v2.md +3 -3
  74. package/dist/docs/federation/00-overview.md +158 -0
  75. package/dist/docs/federation/01-first-federation.md +199 -0
  76. package/dist/docs/federation/_category_.json +12 -0
  77. package/dist/docs/federation/explanation/_category_.json +12 -0
  78. package/dist/docs/federation/explanation/how-it-works.md +129 -0
  79. package/dist/docs/federation/explanation/lockfile-and-cache.md +134 -0
  80. package/dist/docs/federation/explanation/mvp-status-and-feedback.md +86 -0
  81. package/dist/docs/federation/explanation/ownership-and-references.md +134 -0
  82. package/dist/docs/federation/how-to/_category_.json +12 -0
  83. package/dist/docs/federation/how-to/configure-github-sources.md +156 -0
  84. package/dist/docs/federation/how-to/configure-validation-rules.md +127 -0
  85. package/dist/docs/federation/how-to/run-in-ci.md +138 -0
  86. package/dist/docs/federation/how-to/share-assets-and-components.md +125 -0
  87. package/dist/docs/federation/how-to/use-local-sources.md +138 -0
  88. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/00-introduction.md +11 -2
  89. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/01-installation.md +11 -3
  90. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/02-plugin-configuration.md +11 -2
  91. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/03-examples.md +11 -1
  92. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/04-configuration.md +11 -1
  93. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/05-setup-team-catalog.md +11 -2
  94. package/dist/docs/federation/legacy-federation/_category_.json +12 -0
  95. package/dist/docs/federation/reference/_category_.json +12 -0
  96. package/dist/docs/federation/reference/cli.md +122 -0
  97. package/dist/docs/federation/reference/configuration.md +192 -0
  98. package/dist/docs/federation/reference/diagnostic-rules.md +173 -0
  99. package/dist/docs/federation/reference/generated-output.md +118 -0
  100. package/dist/docs/federation/reference/supported-content.md +86 -0
  101. package/dist/docs/federation/reference/troubleshooting.md +208 -0
  102. package/dist/docs/plugins/01-intro.md +3 -3
  103. package/dist/docs/plugins/03-all-plugins.md +2 -2
  104. package/dist/docs/plugins/asyncapi/00-intro.md +4 -4
  105. package/dist/docs/plugins/asyncapi/02-plugin-configuration.md +4 -4
  106. package/dist/docs/plugins/backstage/00-overview.md +53 -0
  107. package/dist/docs/plugins/backstage/01-get-started.md +95 -0
  108. package/dist/docs/plugins/backstage/02-embed-entity-tabs.md +109 -0
  109. package/dist/docs/plugins/backstage/03-add-overview-cards.md +79 -0
  110. package/dist/docs/plugins/backstage/04-control-theme-and-size.md +54 -0
  111. package/dist/docs/plugins/backstage/05-migrate-to-annotations.md +49 -0
  112. package/dist/docs/plugins/backstage/06-configuration.md +85 -0
  113. package/dist/docs/plugins/backstage/07-components.md +129 -0
  114. package/dist/docs/plugins/backstage/08-how-embeds-work.md +52 -0
  115. package/dist/docs/plugins/backstage/_category_.json +4 -3
  116. package/dist/docs/plugins/eventbridge/00-intro.md +5 -5
  117. package/dist/docs/plugins/eventbridge/03-api.md +3 -3
  118. package/dist/docs/plugins/graphql/00-intro.md +2 -2
  119. package/dist/docs/plugins/graphql/02-plugin-configuration.md +2 -2
  120. package/dist/docs/plugins/hookdeck/01-intro.md +1 -1
  121. package/dist/docs/plugins/openapi/00-intro.md +1 -1
  122. package/dist/eventcatalog.cjs +1 -1
  123. package/dist/eventcatalog.js +5 -5
  124. package/dist/generate.cjs +1 -1
  125. package/dist/generate.js +3 -3
  126. package/dist/utils/cli-logger.cjs +1 -1
  127. package/dist/utils/cli-logger.js +2 -2
  128. package/eventcatalog/src/components/ChatPanel/ChatPanel.tsx +208 -119
  129. package/eventcatalog/src/components/ChatPanel/ChatPanelButton.tsx +28 -8
  130. package/eventcatalog/src/components/ChatPanel/OfflineReply.tsx +45 -0
  131. package/eventcatalog/src/components/Header.astro +11 -6
  132. package/eventcatalog/src/components/MDX/Design/Design.astro +2 -2
  133. package/eventcatalog/src/components/MDX/EntityMap/EntityMap.astro +2 -2
  134. package/eventcatalog/src/components/MDX/Flow/Flow.astro +2 -2
  135. package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +2 -2
  136. package/eventcatalog/src/components/SchemaExplorer/AvroSchemaViewer.tsx +21 -19
  137. package/eventcatalog/src/components/SchemaExplorer/JSONSchemaViewer.tsx +79 -77
  138. package/eventcatalog/src/components/SchemaExplorer/ProtobufSchemaViewer.test.tsx +91 -0
  139. package/eventcatalog/src/components/SchemaExplorer/ProtobufSchemaViewer.tsx +115 -33
  140. package/eventcatalog/src/components/SchemaExplorer/SchemaViewerHover.test.tsx +33 -0
  141. package/eventcatalog/src/components/SchemaExplorer/protobuf-validation.test.ts +84 -0
  142. package/eventcatalog/src/components/SchemaExplorer/protobuf-validation.ts +149 -0
  143. package/eventcatalog/src/components/Search/Search.astro +11 -4
  144. package/eventcatalog/src/components/Settings/AssistantSettingsForm.tsx +29 -24
  145. package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +3 -3
  146. package/eventcatalog/src/pages/diagrams/[id]/[version]/index.astro +2 -2
  147. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +5 -3
  148. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +10 -4
  149. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/asyncapi/[filename].astro +2 -2
  150. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +3 -3
  151. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/[filename].astro +2 -2
  152. package/eventcatalog/src/pages/visualiser/designs/[id]/index.astro +2 -2
  153. package/eventcatalog/src/utils/feature.ts +1 -0
  154. package/eventcatalog/src/utils/protobuf-schema.ts +211 -16
  155. package/package.json +3 -3
  156. package/dist/docs/cli/channels.md +0 -180
  157. package/dist/docs/cli/commands.md +0 -183
  158. package/dist/docs/cli/custom-docs.md +0 -78
  159. package/dist/docs/cli/data-products.md +0 -177
  160. package/dist/docs/cli/data-stores.md +0 -166
  161. package/dist/docs/cli/diagrams.md +0 -147
  162. package/dist/docs/cli/domains.md +0 -280
  163. package/dist/docs/cli/entities.md +0 -138
  164. package/dist/docs/cli/events.md +0 -186
  165. package/dist/docs/cli/export.md +0 -27
  166. package/dist/docs/cli/governance.md +0 -24
  167. package/dist/docs/cli/messages.md +0 -69
  168. package/dist/docs/cli/queries.md +0 -183
  169. package/dist/docs/cli/services.md +0 -266
  170. package/dist/docs/cli/snapshots.md +0 -44
  171. package/dist/docs/cli/teams.md +0 -75
  172. package/dist/docs/cli/users.md +0 -75
  173. package/dist/docs/cli/utilities.md +0 -43
  174. package/dist/docs/development/developer-tools/eventcatalog-linter.md +0 -732
  175. package/dist/docs/plugins/backstage/00-intro.md +0 -67
  176. package/dist/docs/plugins/backstage/01-installation.md +0 -242
  177. package/dist/docs/plugins/backstage/02-api.md +0 -51
  178. package/dist/docs/plugins/backstage/03-examples.md +0 -12
  179. package/dist/docs/plugins/eventcatalog-federation/_category_.json +0 -11
@@ -1,732 +0,0 @@
1
- ---
2
- sidebar_position: 1
3
- keywords:
4
- - EventCatalog linter
5
- - schema validation
6
- - reference validation
7
- - CI/CD
8
- - quality assurance
9
- sidebar_label: EventCatalog Linter
10
- title: EventCatalog Linter
11
- description: Validate your EventCatalog frontmatter schemas and resource references with the comprehensive EventCatalog Linter
12
- ---
13
-
14
- import AddedIn from '@site/src/components/MDX/AddedIn';
15
- import Tabs from '@theme/Tabs';
16
- import TabItem from '@theme/TabItem';
17
-
18
- A comprehensive linter for EventCatalog that validates frontmatter schemas and resource references to ensure your architecture documentation is correct and consistent.
19
-
20
- The EventCatalog Linter helps you catch issues early in your development process, ensuring your documentation maintains high quality and accuracy across all your EventCatalog resources.
21
-
22
- ## Use cases
23
-
24
- - **Quality Assurance**: Ensure your documentation is correct and consistent
25
- - **CI/CD**: Integrate the linter into your CI/CD pipeline to catch issues early
26
- - **Documentation**: Run the linter regularly as part of your development workflow
27
- - **Version Consistency**: Use consistent version patterns across your EventCatalog resources
28
-
29
- ## Features
30
-
31
- - **📋 Schema Validation**: Validates all resource frontmatter against defined schemas using Zod
32
- - **🔗 Reference Validation**: Ensures all referenced resources (services, events, domains, etc.) actually exist
33
- - **📦 Semver Version Support**: Supports semantic versions, ranges (`^1.0.0`, `~1.2.0`), x-patterns (`0.0.x`), and `latest`
34
- - **⚙️ Configurable Rules**: Optional `.eventcatalogrc.js` config file for customizing rule severity and behavior
35
- - **🚫 Ignore Patterns**: Skip validation for specific file patterns (archived, drafts, etc.)
36
- - **🎯 Rule Overrides**: Apply different rules to different file patterns for flexible team workflows
37
- - **🎯 Comprehensive Coverage**: Supports all EventCatalog resource types
38
- - **⚡ Fast Performance**: Efficiently scans large catalogs
39
- - **🎨 ESLint-Inspired Output**: Clean, file-grouped error reporting with severity levels
40
- - **⚠️ Warnings Support**: Distinguish between errors and warnings with `--fail-on-warning` option
41
-
42
- ### Supported Resource Types
43
-
44
- The linter validates all EventCatalog resource types:
45
-
46
- - 🏢 **Domains** (including subdomains)
47
- - ⚙️ **Services**
48
- - 📨 **Events**
49
- - 📤 **Commands**
50
- - ❓ **Queries**
51
- - 📡 **Channels**
52
- - 🔄 **Flows**
53
- - 📊 **Entities**
54
- - 🤖 **Agents**
55
- - 🧱 **Containers** (including the legacy data store alias)
56
- - 📈 **Data Products**
57
- - 🧭 **Diagrams**
58
- - 📝 **ADRs**
59
- - 👤 **Users**
60
- - 👥 **Teams**
61
-
62
- <AddedIn version="1.2.0" />
63
-
64
- Agents, Containers, Data Products, Diagrams, and ADRs are validated as of version 1.2.0.
65
-
66
- ## Quick Start
67
-
68
- Get started with the EventCatalog Linter in three simple steps:
69
-
70
- ### 1. Run the Linter
71
-
72
- Start linting your EventCatalog immediately with npx:
73
-
74
- ```bash
75
- npx @eventcatalog/linter
76
- ```
77
-
78
- ### 2. Configure Rules (Optional)
79
-
80
- Create a `.eventcatalogrc.js` file in your EventCatalog root to customize validation:
81
-
82
- ```javascript
83
- module.exports = {
84
- rules: {
85
- 'best-practices/summary-required': 'warn',
86
- 'refs/owner-exists': 'error'
87
- },
88
- ignorePatterns: ['**/drafts/**']
89
- };
90
- ```
91
-
92
- ### 3. Integrate with CI/CD
93
-
94
- Add to your CI/CD pipeline for automated validation:
95
-
96
- ```yaml
97
- # GitHub Actions
98
- - run: npx @eventcatalog/linter --fail-on-warning
99
- ```
100
-
101
- ## Installation
102
-
103
- ### Use with npx (Recommended)
104
-
105
- <Tabs>
106
- <TabItem value="npm">
107
- ```bash
108
- npx @eventcatalog/linter
109
- ```
110
- </TabItem>
111
- <TabItem value="pnpm">
112
- ```bash
113
- pnpm dlx @eventcatalog/linter
114
- ```
115
- </TabItem>
116
- </Tabs>
117
-
118
- ### Global Installation
119
-
120
- <Tabs>
121
- <TabItem value="npm">
122
- ```bash
123
- npm install -g @eventcatalog/linter
124
- ```
125
- </TabItem>
126
- <TabItem value="pnpm">
127
- ```bash
128
- pnpm install -g @eventcatalog/linter
129
- ```
130
- </TabItem>
131
- </Tabs>
132
-
133
- ### Add to your project
134
-
135
- <Tabs>
136
- <TabItem value="npm">
137
- ```bash
138
- npm install --save-dev @eventcatalog/linter
139
- ```
140
- </TabItem>
141
- <TabItem value="pnpm">
142
- ```bash
143
- pnpm install --save-dev @eventcatalog/linter
144
- ```
145
- </TabItem>
146
- </Tabs>
147
-
148
- ## Usage
149
-
150
- ### Basic Usage
151
-
152
- Run the linter in your EventCatalog directory:
153
-
154
- ```js
155
- // Lint current directory
156
- eventcatalog-linter
157
-
158
- // Lint specific directory
159
- eventcatalog-linter ./my-eventcatalog
160
-
161
- // Verbose output with detailed information
162
- eventcatalog-linter --verbose
163
-
164
- // Show help
165
- eventcatalog-linter --help
166
- ```
167
-
168
- ### CLI Options
169
-
170
- ```
171
- Usage: eventcatalog-linter [options] [directory]
172
-
173
- Arguments:
174
- directory EventCatalog directory to lint (default: ".")
175
-
176
- Options:
177
- -V, --version output the version number
178
- -v, --verbose Show verbose output (default: false)
179
- --fail-on-warning Exit with non-zero code on warnings (default: false)
180
- -h, --help display help for command
181
- ```
182
-
183
- ## Configuration
184
-
185
- The EventCatalog Linter supports optional configuration through a `.eventcatalogrc.js` file in your catalog root directory. This allows you to:
186
-
187
- - Turn rules on/off
188
- - Configure rule severity levels (error, warn, off)
189
- - Ignore specific file patterns
190
- - Override rules for specific file patterns
191
-
192
- ### Quick Start with Configuration
193
-
194
- Create a `.eventcatalogrc.js` file in your EventCatalog root directory:
195
-
196
- ```javascript
197
- // .eventcatalogrc.js
198
- module.exports = {
199
- rules: {
200
- // Schema validation rules
201
- 'schema/required-fields': 'error',
202
- 'schema/valid-semver': 'error',
203
- 'schema/valid-email': 'warn',
204
-
205
- // Reference validation rules
206
- 'refs/owner-exists': 'error',
207
- 'refs/valid-version-range': 'error',
208
-
209
- // Best practice rules
210
- 'best-practices/summary-required': 'warn',
211
- 'best-practices/owner-required': 'error',
212
- },
213
-
214
- // Ignore certain paths
215
- ignorePatterns: ['**/archived/**', '**/drafts/**'],
216
-
217
- // Override rules for specific file patterns
218
- overrides: [
219
- {
220
- files: ['**/experimental/**'],
221
- rules: {
222
- 'best-practices/owner-required': 'off'
223
- }
224
- }
225
- ]
226
- };
227
- ```
228
-
229
- ### Rule Severity Levels
230
-
231
- - **`'error'`** - Causes the linter to exit with error code 1
232
- - **`'warn'`** - Shows warnings but allows the linter to pass (unless `--fail-on-warning` is used)
233
- - **`'off'`** - Disables the rule completely
234
-
235
- ### Available Rules
236
-
237
- | Rule Name | Description | Accepted Values | Default |
238
- |-----------|-------------|-----------------|----------|
239
- | **Schema Validation Rules** |
240
- | `schema/required-fields` | Validates that required fields are present in frontmatter | `error`, `warn`, `off` | `error` |
241
- | `schema/valid-type` | Validates that field types are correct (strings, arrays, objects) | `error`, `warn`, `off` | `error` |
242
- | `schema/valid-semver` | Validates semantic version format (1.0.0, 2.1.3-beta) | `error`, `warn`, `off` | `error` |
243
- | `schema/valid-email` | Validates email address format in user frontmatter | `error`, `warn`, `off` | `error` |
244
- | `schema/validation-error` | General schema validation errors | `error`, `warn`, `off` | `error` |
245
- | **Reference Validation Rules** |
246
- | `refs/owner-exists` | Ensures referenced owners (users/teams) exist | `error`, `warn`, `off` | `error` |
247
- | `refs/valid-version-range` | Validates version references and patterns | `error`, `warn`, `off` | `error` |
248
- | `refs/resource-exists` | Ensures referenced resources exist (always enabled for critical resources) | Always enabled | Always enabled |
249
- | **Best Practice Rules** |
250
- | `best-practices/summary-required` | Requires summary field for better documentation | `error`, `warn`, `off` | `error` |
251
- | `best-practices/owner-required` | Requires at least one owner for accountability | `error`, `warn`, `off` | `error` |
252
-
253
- :::info Core Resource Validation
254
- Core resource reference validation (services, domains, entities) is always enabled and cannot be disabled, ensuring referential integrity of your EventCatalog.
255
- :::
256
-
257
- ### Configuration Examples
258
-
259
- #### Relaxed Configuration for Development
260
-
261
- ```javascript
262
- module.exports = {
263
- rules: {
264
- 'best-practices/summary-required': 'warn',
265
- 'best-practices/owner-required': 'warn',
266
- 'refs/owner-exists': 'warn',
267
- },
268
- ignorePatterns: ['**/drafts/**', '**/experimental/**']
269
- };
270
- ```
271
-
272
- #### Strict Configuration for Production
273
-
274
- ```javascript
275
- module.exports = {
276
- rules: {
277
- 'schema/required-fields': 'error',
278
- 'refs/owner-exists': 'error',
279
- 'best-practices/summary-required': 'error',
280
- 'best-practices/owner-required': 'error',
281
- }
282
- };
283
- ```
284
-
285
- #### Team-Specific Overrides
286
-
287
- ```javascript
288
- module.exports = {
289
- rules: {
290
- 'best-practices/owner-required': 'error',
291
- 'best-practices/summary-required': 'error',
292
- },
293
- overrides: [
294
- {
295
- files: ['**/legacy/**'],
296
- rules: {
297
- 'best-practices/owner-required': 'warn',
298
- 'best-practices/summary-required': 'off'
299
- }
300
- },
301
- {
302
- files: ['**/critical/**'],
303
- rules: {
304
- 'best-practices/summary-required': 'error',
305
- 'refs/owner-exists': 'error'
306
- }
307
- }
308
- ]
309
- };
310
- ```
311
-
312
- ### Using with CI/CD
313
-
314
- The configuration file allows you to have different validation rules for different environments:
315
-
316
- ```bash
317
- # Development - warnings allowed
318
- npx @eventcatalog/linter
319
-
320
- # Production - fail on warnings
321
- npx @eventcatalog/linter --fail-on-warning
322
- ```
323
-
324
- ### Default Behavior
325
-
326
- If no `.eventcatalogrc.js` file is found, the linter uses the default rules listed above. Most validations are errors by default, while documentation quality checks such as orphan messages, missing descriptions, missing schemas, and deprecated references default to warnings.
327
-
328
- ### Package.json Integration
329
-
330
- Add to your `package.json` scripts:
331
-
332
- ```json
333
- {
334
- "scripts": {
335
- "lint:eventcatalog": "eventcatalog-linter",
336
- "lint:eventcatalog:verbose": "eventcatalog-linter --verbose"
337
- }
338
- }
339
- ```
340
-
341
- ## What It Validates
342
-
343
- ### Frontmatter Schema Validation
344
-
345
- - ✅ Required fields are present (`id`, `name`, `version`)
346
- - ✅ Field types are correct (strings, arrays, objects)
347
- - ✅ Semantic versions follow proper format (`1.0.0`, `2.1.3-beta`)
348
- - ✅ Version patterns supported (`latest`, `^1.0.0`, `~1.2.0`, `0.0.x`)
349
- - ✅ URLs are valid format
350
- - ✅ Email addresses are valid format
351
- - ✅ Enum values are from allowed lists
352
- - ✅ Nested object structures are correct
353
- - ✅ Common resource configuration is supported, including `attachments`, `editUrl`, `diagrams`, `detailsPanel`, sidebar colors, and GraphQL specifications
354
-
355
- ### Reference Validation
356
-
357
- - ✅ Services referenced in domains exist
358
- - ✅ Agents, data products, flows, entities, and subdomains referenced in domains exist
359
- - ✅ Events/Commands/Queries referenced in services exist
360
- - ✅ Events/Commands/Queries referenced in agents exist
361
- - ✅ Data product inputs and outputs reference existing resources
362
- - ✅ ADR relationships and typed `appliesTo` references exist
363
- - ✅ Entities referenced in domains/services exist
364
- - ✅ Channels referenced in sends/receives `to`/`from`, routes, messages, and message channels exist
365
- - ✅ Containers referenced in `writesTo`/`readsFrom` exist
366
- - ✅ Diagrams referenced from other resources exist
367
- - ✅ Users/Teams referenced as owners exist
368
- - ✅ User/team owned resources and team members exist
369
- - ✅ Flow steps reference existing services/messages/agents/containers/data products
370
- - ✅ Entity properties reference existing entities
371
- - ✅ Version-specific references are valid
372
-
373
- <AddedIn version="1.2.0" />
374
-
375
- The expanded reference checks for agents, data products, ADRs, diagrams, and flow steps were added in version 1.2.0.
376
-
377
- ## Example Output
378
-
379
- ### ✅ Success Output
380
-
381
- ```bash
382
- $ eventcatalog-linter
383
-
384
- ✔ No problems found!
385
-
386
- 42 files checked
387
- ```
388
-
389
- ### ❌ Error Output
390
-
391
- ```bash
392
- $ eventcatalog-linter
393
-
394
- services/user-service/index.mdx
395
- ✖ error version: Invalid semantic version format [version] (schema/valid-semver)
396
- ⚠ warning Summary is required for better documentation [summary] (best-practices/summary-required)
397
-
398
- ✖ 2 problems
399
-
400
- domains/sales/index.mdx
401
- ✖ error Referenced service "order-service" does not exist [services] (refs/resource-exists)
402
-
403
- ✖ 1 problem
404
-
405
- flows/user-registration/index.mdx
406
- ✖ error Referenced service "notification-service" (version: 2.0.0) does not exist [steps[1].service] (refs/valid-version-range)
407
-
408
- ✖ 1 problem
409
-
410
- ✖ 4 problems (3 errors, 1 warning)
411
- 3 files checked
412
- ```
413
-
414
- ## Version Pattern Support
415
-
416
- The linter supports flexible version patterns for resource references:
417
-
418
- ### Exact Versions
419
-
420
- ```yaml
421
- sends:
422
- - id: user-created
423
- version: 1.0.0 # Exact semantic version
424
- ```
425
-
426
- ### Latest Version
427
-
428
- ```yaml
429
- sends:
430
- - id: user-created
431
- version: latest # Always use the latest available version
432
- ```
433
-
434
- ### Semver Ranges
435
-
436
- ```yaml
437
- sends:
438
- - id: user-created
439
- version: ^1.0.0 # Compatible with 1.x.x (1.0.0, 1.2.3, but not 2.0.0)
440
- - id: user-updated
441
- version: ~1.2.0 # Compatible with 1.2.x (1.2.0, 1.2.5, but not 1.3.0)
442
- ```
443
-
444
- ### X-Pattern Matching
445
-
446
- ```yaml
447
- sends:
448
- - id: user-created
449
- version: 0.0.x # Matches 0.0.1, 0.0.5, 0.0.12, etc.
450
- - id: order-placed
451
- version: 1.x # Matches 1.0.0, 1.5.3, 1.99.0, etc.
452
- ```
453
-
454
- ## CI/CD Integration
455
-
456
- ### GitHub Actions
457
-
458
- ```yaml
459
- name: EventCatalog Lint
460
- on: [push, pull_request]
461
-
462
- jobs:
463
- lint:
464
- runs-on: ubuntu-latest
465
- steps:
466
- - uses: actions/checkout@v3
467
- - uses: actions/setup-node@v3
468
- with:
469
- node-version: '18'
470
- - run: npx @eventcatalog/linter
471
- ```
472
-
473
- ### GitLab CI
474
-
475
- ```yaml
476
- eventcatalog-lint:
477
- stage: test
478
- image: node:18
479
- script:
480
- - npx @eventcatalog/linter
481
- ```
482
-
483
- ## Rule Names and Error Codes
484
-
485
- The linter provides descriptive rule names in parentheses to help identify and fix issues quickly. Each error shows the specific rule that was violated:
486
-
487
- ### Schema Validation Rules
488
-
489
- - `(schema/required-fields)` - Required field is missing
490
- - `(schema/valid-type)` - Field has wrong data type
491
- - `(schema/valid-semver)` - Invalid semantic version format
492
- - `(schema/valid-email)` - Invalid email address format
493
- - `(schema/validation-error)` - General schema validation error
494
-
495
- ### Reference Validation Rules
496
-
497
- - `(refs/owner-exists)` - Referenced owner (user/team) doesn't exist
498
- - `(refs/valid-version-range)` - Referenced version doesn't exist or invalid pattern
499
- - `(refs/resource-exists)` - Referenced resource doesn't exist
500
- - `(refs/channel-exists)` - Referenced channel in sends/receives `to`/`from`, routes, messages, or message channels doesn't exist
501
- - `(refs/container-exists)` - Referenced container in `writesTo`/`readsFrom` or flow steps doesn't exist
502
- - `(refs/orphan-messages)` - Event/command/query has no producer and no consumer
503
-
504
- ### Best Practice Rules
505
-
506
- - `(best-practices/summary-required)` - Summary field is missing
507
- - `(best-practices/owner-required)` - At least one owner is required
508
-
509
- ### Parse Errors
510
-
511
- - `(@eventcatalog/parse-error)` - YAML/frontmatter parsing error
512
-
513
- ## Warnings Support
514
-
515
- The linter distinguishes between errors (critical issues) and warnings (suggestions for improvement):
516
-
517
- - **Errors**: Critical issues that must be fixed
518
- - **Warnings**: Suggestions for better documentation
519
-
520
- Use `--fail-on-warning` to treat warnings as errors in CI/CD pipelines:
521
-
522
- ```bash
523
- # Exit with error code if warnings are found
524
- eventcatalog-linter --fail-on-warning
525
- ```
526
-
527
- ## Common Validation Examples
528
-
529
- ### Valid Frontmatter Examples
530
-
531
- #### Service
532
-
533
- ```yaml
534
- ---
535
- id: user-service
536
- name: User Service
537
- version: 2.1.0
538
- summary: Manages user accounts and authentication
539
- owners:
540
- - platform-team
541
- - john-doe
542
- sends:
543
- - id: user-created
544
- version: 1.0.0
545
- - id: user-updated
546
- receives:
547
- - id: create-user
548
- - id: update-user
549
- entities:
550
- - id: user
551
- repository:
552
- language: TypeScript
553
- url: https://github.com/company/user-service
554
- ---
555
- ```
556
-
557
- #### Event
558
-
559
- ```yaml
560
- ---
561
- id: user-created
562
- name: User Created
563
- version: 1.0.0
564
- summary: Triggered when a new user account is created
565
- owners:
566
- - platform-team
567
- sidebar:
568
- badge: POST
569
- label: User Events
570
- draft: false
571
- deprecated: false
572
- ---
573
- ```
574
-
575
- #### Agent
576
-
577
- <AddedIn version="1.2.0" />
578
-
579
- ```yaml
580
- ---
581
- id: refund-agent
582
- name: Refund Agent
583
- version: 1.0.0
584
- summary: Coordinates customer refund decisions
585
- owners:
586
- - platform-team
587
- receives:
588
- - id: refund-requested
589
- from:
590
- - id: refunds
591
- sends:
592
- - id: refund-approved
593
- to:
594
- - id: public-events/orders
595
- readsFrom:
596
- - id: orders-db
597
- model:
598
- provider: OpenAI
599
- name: gpt-4.1-mini
600
- tools:
601
- - name: Payment lookup
602
- type: mcp
603
- ---
604
- ```
605
-
606
- #### Container
607
-
608
- <AddedIn version="1.2.0" />
609
-
610
- ```yaml
611
- ---
612
- id: orders-db
613
- name: Orders DB
614
- version: 1.0.0
615
- summary: Stores order records
616
- container_type: database
617
- technology: PostgreSQL
618
- classification: internal
619
- access_mode: readWrite
620
- authoritative: true
621
- ---
622
- ```
623
-
624
- #### Data product
625
-
626
- <AddedIn version="1.2.0" />
627
-
628
- ```yaml
629
- ---
630
- id: refund-analytics
631
- name: Refund Analytics
632
- version: 1.0.0
633
- summary: Curated refund metrics for finance teams
634
- inputs:
635
- - id: refund-approved
636
- - id: orders-db
637
- outputs:
638
- - id: public-events/orders
639
- contract:
640
- path: contracts/refund-analytics.json
641
- name: Refund Analytics Contract
642
- ---
643
- ```
644
-
645
- #### ADR
646
-
647
- <AddedIn version="1.2.0" />
648
-
649
- ```yaml
650
- ---
651
- id: adr-001
652
- name: Use event-driven refunds
653
- version: 1.0.0
654
- summary: Records the decision to coordinate refunds through events
655
- status: accepted
656
- date: 2026-05-26
657
- decisionMakers:
658
- - id: platform-team
659
- collection: teams
660
- appliesTo:
661
- - type: service
662
- id: order-service
663
- - type: data-product
664
- id: refund-analytics
665
- related:
666
- - id: adr-000
667
- ---
668
- ```
669
-
670
- #### Diagram
671
-
672
- <AddedIn version="1.2.0" />
673
-
674
- ```yaml
675
- ---
676
- id: refund-flow
677
- name: Refund Flow Diagram
678
- version: 1.0.0
679
- summary: Shows the refund workflow across services and agents
680
- owners:
681
- - platform-team
682
- ---
683
- ```
684
-
685
- ### Common Validation Errors
686
-
687
- #### ❌ Missing Required Fields
688
-
689
- ```yaml
690
- ---
691
- # Missing 'id' field
692
- name: User Service
693
- version: 1.0.0
694
- ---
695
- ```
696
-
697
- #### ❌ Invalid Semantic Version
698
-
699
- ```yaml
700
- ---
701
- id: user-service
702
- name: User Service
703
- version: v1.0 # Should be 1.0.0
704
- ---
705
- ```
706
-
707
- #### ❌ Invalid Reference
708
-
709
- ```yaml
710
- ---
711
- id: sales-domain
712
- name: Sales Domain
713
- version: 1.0.0
714
- services:
715
- - id: non-existent-service # Service doesn't exist
716
- ---
717
- ```
718
-
719
- ## Best Practices
720
-
721
- 1. **Start with Configuration**: Create a `.eventcatalogrc.js` file to customize rules for your team's workflow
722
- 2. **Run in CI/CD**: Integrate the linter into your CI/CD pipeline to catch issues early
723
- 3. **Use `--fail-on-warning`**: Consider treating warnings as errors in production environments
724
- 4. **Regular Validation**: Run the linter regularly as part of your development workflow
725
- 5. **Fix Issues Promptly**: Address validation errors immediately to maintain documentation quality
726
- 6. **Version Consistency**: Use consistent version patterns across your EventCatalog resources
727
- 7. **Team Overrides**: Use file pattern overrides for different validation requirements across teams
728
- 8. **Ignore Patterns**: Use ignore patterns for draft or experimental content that shouldn't be validated yet
729
-
730
- ## Issues?
731
-
732
- If you have any issues or feedback, please let us know by opening an issue on [GitHub](https://github.com/event-catalog/eventcatalog/issues) or joining our [Discord server](https://eventcatalog.dev/discord).