fix: resolve all ruff and ESLint lint errors

Backend (ruff):
- F821: Add TYPE_CHECKING imports for Vehicle, Contact, File in models
  (file.py, retouch.py, sale.py, vehicle.py)
- E741: Rename ambiguous variable  to /
  (copilot_service.py, price_compare_service.py, openrouter.py)
- F841: Remove unused variable  in sale_service.py

Frontend (ESLint):
- react/no-unescaped-entities: Escape quotes in ContractPreview.tsx
- @next/next/no-img-element: Replace <img> with <Image> from next/image
  (FileGallery.tsx, FileList.tsx, FilePreview.tsx, BeforeAfterSlider.tsx)

Tests: 392 backend passed, 112 frontend passed, next build successful
This commit is contained in:
2026-07-17 21:16:38 +02:00
parent f1d6de0e47
commit 341d0c6f38
30 changed files with 4078 additions and 48 deletions
+5 -2
View File
@@ -7,6 +7,7 @@ import {
getThumbnailUrl,
type FileResponse,
} from '@/lib/files';
import Image from 'next/image';
import { FilePreview } from './FilePreview';
interface FileGalleryProps {
@@ -76,10 +77,12 @@ export function FileGallery({ vehicleId }: FileGalleryProps) {
data-testid={`gallery-item-${image.id}`}
>
{thumbUrl && (
<img
<Image
src={thumbUrl}
alt={image.original_filename}
className="w-full h-full object-cover transition-transform group-hover:scale-105"
fill
className="object-cover transition-transform group-hover:scale-105"
unoptimized
/>
)}
<div className="absolute inset-0 bg-black/0 group-hover:bg-black/30 transition-colors flex items-end p-2">