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:
2025-07-11 23:49:45 +02:00
committed by Kaj Kowalski
parent 1eea2cc3e4
commit 314326400e
42 changed files with 3171 additions and 2781 deletions

View File

@ -157,8 +157,11 @@ export function TRPCDemo() {
</div>
) : (
<div className="space-y-2">
{topQuestions?.map((item, index) => (
<div key={index} className="flex justify-between items-center">
{topQuestions?.map((item) => (
<div
key={item.question}
className="flex justify-between items-center"
>
<span className="text-sm">{item.question}</span>
<Badge>{item.count}</Badge>
</div>
@ -223,8 +226,12 @@ export function TRPCDemo() {
</p>
{session.questions && session.questions.length > 0 && (
<div className="flex flex-wrap gap-1">
{session.questions.slice(0, 3).map((question, idx) => (
<Badge key={idx} variant="outline" className="text-xs">
{session.questions.slice(0, 3).map((question) => (
<Badge
key={question}
variant="outline"
className="text-xs"
>
{question.length > 50
? `${question.slice(0, 50)}...`
: question}