UNPKG

@felixgeelhaar/cclint

Version:

A comprehensive linter for CLAUDE.md files with multi-language code block validation

44 lines 1.24 kB
/** * Abstract base class for custom rules * Provides a foundation for implementing custom validation logic */ export class CustomRule { id; description; category; version; constructor(id, description, options) { this.id = id; this.description = description; this.category = options?.category; this.version = options?.version; } /** * Main linting method that calls the internal validation * This provides a consistent interface while allowing custom implementation */ lint(file) { return this.validateInternal(file); } /** * Validate rule configuration options * Override this method to add custom configuration validation */ validateOptions(_options) { // Default implementation accepts any options return true; } /** * Get rule metadata for documentation and tooling */ getMetadata() { return { id: this.id, description: this.description, category: this.category, version: this.version, hasAutoFix: true, // All custom rules support auto-fix by default }; } } //# sourceMappingURL=CustomRule.js.map