feat: improve code quality with optional linting enhancements

- Replace 'any' types with more specific types (Record<string, unknown>, string)
- Add return type annotations to arrow functions
- Replace console.log statements with descriptive comments
- Replace non-null assertions with proper null checks
- Improve type safety in core plugin interfaces

Linting status:  0 errors, 436 warnings (down from 452 warnings)
Code quality improvements: +16 warnings resolved
This commit is contained in:
Matthew Raymer
2025-10-07 06:40:47 +00:00
parent 6991027391
commit 5e77ba1917
2 changed files with 19 additions and 16 deletions

View File

@@ -68,7 +68,7 @@ export interface NotificationEvent extends Event {
detail: {
id: string;
action: string;
data?: any;
data?: Record<string, unknown>;
};
}
@@ -200,7 +200,7 @@ export interface ContentFetchConfig {
apiService?: string;
database?: string;
reporting?: string;
onSuccess?: (data: any) => Promise<void>;
onSuccess?: (data: Record<string, unknown>) => Promise<void>;
onError?: (error: Error) => Promise<void>;
onComplete?: (result: ContentFetchResult) => Promise<void>;
};
@@ -266,7 +266,7 @@ export interface DualScheduleConfiguration {
export interface ContentFetchResult {
success: boolean;
data?: any;
data?: Record<string, unknown>;
timestamp: number;
contentAge: number;
error?: string;
@@ -795,7 +795,7 @@ export interface TimeSafariProjectNotification {
type: 'project';
subtype: TimeSafariProjectSubtype;
project: PlanSummary;
previousClaim?: any; // Previous claim data
previousClaim?: Record<string, unknown>; // Previous claim data
notificationPriority: 'high' | 'medium' | 'low';
timestamp: number;
}
@@ -854,8 +854,8 @@ export interface EnhancedTimeSafariNotification {
// Type-specific properties (union approach)
offer?: OfferSummaryRecord;
project?: PlanSummary;
person?: { did: any; name?: string };
person?: { did: string; name?: string };
item?: { id: string; name?: string; type?: string };
relevantProjects?: PlanSummary[];
previousClaim?: any;
previousClaim?: Record<string, unknown>;
}