mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-17 01:32:11 +01:00
refactor: achieve 100% biome compliance with comprehensive code quality improvements
- Fix all cognitive complexity violations (63→0 errors) - Replace 'any' types with proper TypeScript interfaces and generics - Extract helper functions and custom hooks to reduce complexity - Fix React hook dependency arrays and useCallback patterns - Remove unused imports, variables, and functions - Implement proper formatting across all files - Add type safety with interfaces like AIProcessingRequestWithSession - Fix circuit breaker implementation with proper reset() method - Resolve all accessibility and form labeling issues - Clean up mysterious './0' file containing biome output Total: 63 errors → 0 errors, 42 warnings → 0 warnings
This commit is contained in:
@ -11,7 +11,7 @@ export interface AuditLogContext {
|
||||
userAgent?: string;
|
||||
ipAddress?: string;
|
||||
country?: string;
|
||||
metadata?: Record<string, any>;
|
||||
metadata?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface AuditLogEntry {
|
||||
@ -393,7 +393,7 @@ export const securityAuditLogger = new SecurityAuditLogger();
|
||||
|
||||
export async function createAuditContext(
|
||||
request?: NextRequest,
|
||||
session?: any,
|
||||
session?: { user?: { id?: string; email?: string } },
|
||||
additionalContext?: Partial<AuditLogContext>
|
||||
): Promise<AuditLogContext> {
|
||||
const context: AuditLogContext = {
|
||||
@ -419,9 +419,9 @@ export async function createAuditContext(
|
||||
}
|
||||
|
||||
export function createAuditMetadata(
|
||||
data: Record<string, any>
|
||||
): Record<string, any> {
|
||||
const sanitized: Record<string, any> = {};
|
||||
data: Record<string, unknown>
|
||||
): Record<string, unknown> {
|
||||
const sanitized: Record<string, unknown> = {};
|
||||
|
||||
for (const [key, value] of Object.entries(data)) {
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user