@invisiblecities/sidequest-cqo
Version:
Configuration-agnostic TypeScript and ESLint orchestrator with real-time watch mode, SQLite persistence, and intelligent terminal detection
86 lines • 2.26 kB
JavaScript
/**
* @fileoverview Common types and interfaces for the Code Quality Orchestrator
*
* Defines the core data structures used across all audit engines and components
* for consistent violation reporting and categorization.
*/
/**
* Get human-readable label for violation category
*/
export function getCategoryLabel(category) {
switch (category) {
// TypeScript categories
case "type-alias": {
return "Type Issues";
}
case "annotation": {
return "Missing Types";
}
case "cast": {
return "Type Casting";
}
case "module-resolution": {
return "Import/Export";
}
case "unused-code": {
return "Unused Code";
}
case "null-safety": {
return "Null Safety";
}
case "inheritance": {
return "Class/Override";
}
case "index-access": {
return "Index Access";
}
case "strict-config": {
return "Strict Config";
}
case "syntax-error": {
return "Syntax Error";
}
case "setup-issue": {
return "Setup/Config Issue";
}
// ESLint categories
case "code-quality": {
return "Code Quality";
}
case "style": {
return "Code Style";
}
case "architecture": {
return "Architecture";
}
case "modernization": {
return "Modernization";
}
case "unused-vars": {
return "Unused Variables";
}
// Other categories
case "complexity": {
return "Complexity";
}
case "maintainability": {
return "Maintainability";
}
case "security": {
return "Security";
}
case "parse-error": {
return "Parse Error";
}
case "import-error": {
return "Import Error";
}
// Legacy/fallback
default: {
return category
.replaceAll("-", " ")
.replaceAll(/\b\w/g, (l) => l.toUpperCase());
}
}
}
//# sourceMappingURL=violation-types.js.map