
Catch issues early and maintain high-quality documentation with the new EventCatalog Linter
I'm excited to announce the release of the EventCatalog Linter, a comprehensive validation tool that helps you maintain high-quality, consistent documentation for your architecture.
The EventCatalog Linter validates your frontmatter schemas and resource references, catching issues early in your development process—before they impact your team or reach production.
What is the EventCatalog Linter?
The EventCatalog Linter is a comprehensive validation tool designed specifically for EventCatalog projects. It performs two critical types of validation:
- Documentation Validation - Ensures your frontmatter follows the correct structure and data types
- Reference Validation - Verifies that all resource references actually exist in your catalog
Think of it as a quality gate for your documentation, similar to how ESLint works for JavaScript code.
What it validates:
- ✅ Required fields are present (id, name, version)
- ✅ Field types are correct (strings, arrays, objects)
- ✅ Semantic versions follow proper format (1.0.0, 2.1.3-beta)
- ✅ Referenced services, events, domains, and entities exist
- ✅ Version-specific references are valid
- ✅ Email addresses are properly formatted
- ✅ Owners (users/teams) exist in your catalog
Why you need the EventCatalog Linter
As your EventCatalog grows, maintaining consistency and accuracy becomes increasingly challenging. Without proper validation:
- Broken references can lead to 404 errors and poor user experience
- Invalid frontmatter can cause build failures or display issues
- Inconsistent documentation reduces trust in your architecture documentation
- Manual reviews are time-consuming and error-prone
The EventCatalog Linter solves these problems by automating validation and providing immediate feedback.
Key Features
🎯 Configurable Rules
Create a .eventcatalogrc.js file to customize validation rules for your team's workflow:
// .eventcatalogrc.js
module.exports = {
rules: {
// Schema validation rules
'schema/required-fields': 'error',
'schema/valid-semver': 'error',
'schema/valid-email': 'warn',
// Reference validation rules
'refs/owner-exists': 'error',
'refs/valid-version-range': 'error',
// Best practice rules
'best-practices/summary-required': 'warn',
'best-practices/owner-required': 'error',
},
// Ignore certain paths
ignorePatterns: ['**/archived/**', '**/drafts/**'],
// Override rules for specific file patterns
overrides: [
{
files: ['**/experimental/**'],
rules: {
'best-practices/owner-required': 'off'
}
}
]
};
📦 Flexible Version Support
The linter supports various version patterns for resource references:
# Exact versions
version: 1.0.0
# Latest version
version: latest
# Semver ranges
version: ^1.0.0 # Compatible with 1.x.x
version: ~1.2.0 # Compatible with 1.2.x
# X-pattern matching
version: 0.0.x # Matches 0.0.1, 0.0.5, etc.