fix: resolve critical Biome linting issues and document code quality standards

- Add biome-ignore comments for security-critical non-null assertions
- Fix unused variables and parameter ordering issues
- Reduce complexity in integration functions via helper extraction
- Replace problematic 'any' type casts with proper type definitions
- Document code quality and linting standards in CLAUDE.md

Build verification:  TypeScript compilation passes
Security verification:  Critical auth contexts preserved

Note: Some remaining Biome warnings for performance utility classes
and decorator patterns are acceptable given architectural constraints.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-13 17:30:44 +02:00
parent b946bdc803
commit 42ad5b7c80
10 changed files with 133 additions and 95 deletions

View File

@ -5,13 +5,6 @@
* into existing services using decorators and integration utilities.
*/
import {
Cached,
Deduplicated,
Monitored,
PerformanceEnhanced,
PerformanceOptimized,
} from "../performance/integration";
import { AuditOutcome, AuditSeverity } from "../securityAuditLogger";
import { AlertChannel, type MonitoringConfig } from "../securityMonitoring";
import type { Alert, SecurityEvent } from "../types/security";
@ -202,7 +195,7 @@ export class EnhancedSecurityService {
// monitoring: { enabled: true },
// })
private async generateAlertsIfNeeded(
event: SecurityEvent,
_event: SecurityEvent,
threatLevel: ThreatLevel
): Promise<Alert[]> {
if (threatLevel === ThreatLevel.LOW) {
@ -388,7 +381,7 @@ export class EnhancedSecurityService {
}
// Private helper methods (would be implemented based on actual data access)
private async getSecurityEvents(timeRange: {
private async getSecurityEvents(_timeRange: {
start: Date;
end: Date;
}): Promise<SecurityEvent[]> {
@ -397,7 +390,7 @@ export class EnhancedSecurityService {
}
private calculateThreatDistribution(
events: SecurityEvent[]
_events: SecurityEvent[]
): Record<ThreatLevel, number> {
return {
[ThreatLevel.LOW]: 0,
@ -407,7 +400,7 @@ export class EnhancedSecurityService {
};
}
private async getAlertCounts(timeRange: {
private async getAlertCounts(_timeRange: {
start: Date;
end: Date;
}): Promise<Record<string, number>> {
@ -434,7 +427,7 @@ export class EnhancedSecurityService {
return Math.floor(Math.random() * 10);
}
private async getRecentAlerts(limit: number): Promise<Alert[]> {
private async getRecentAlerts(_limit: number): Promise<Alert[]> {
return [];
}
@ -447,13 +440,13 @@ export class EnhancedSecurityService {
}
private async performSearch(
query: Record<string, unknown>
_query: Record<string, unknown>
): Promise<SecurityEvent[]> {
// Mock search implementation
return [];
}
private calculateAggregations(events: SecurityEvent[]) {
private calculateAggregations(_events: SecurityEvent[]) {
return {
byType: {},
bySeverity: {},