@felixgeelhaar/cclint
Version:
Catch CLAUDE.md drift before Claude misbehaves. Lints CLAUDE.md, skills, subagents, and hooks for Claude Code projects.
44 lines • 1.24 kB
JavaScript
/**
* 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