Skip to content

Commit 2e5b3be

Browse files
committed
fix(lint): resolve eslint errors and warnings
1 parent dc1e98e commit 2e5b3be

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

app/api/get-schema/[name]/route.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export async function GET(
4545
console.log(`Attempting to read schema file: ${filePath}`); // Add logging
4646

4747
const fileContent = await fs.readFile(filePath, "utf-8");
48-
const schemaJson = JSON.parse(fileContent);
48+
// Assert the type after parsing JSON to satisfy eslint
49+
const schemaJson = JSON.parse(fileContent) as Record<string, unknown>;
4950

5051
return NextResponse.json(schemaJson);
5152
} catch (error) {

app/api/list-schemas/route.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { NextResponse } from "next/server";
22
import fs from "fs/promises";
33
import path from "path";
44

5-
const SCHEMAS_DIR = path.join(process.cwd(), "public", "schemas", "v1");
5+
// Remove unused constant
6+
// const SCHEMAS_DIR = path.join(process.cwd(), "public", "schemas", "v1");
67

78
// Interface for the response items
89
interface SchemaObject {

components/csv-validator.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ export default function CsvValidator() {
300300
const workerRef = useRef<Worker | null>(null);
301301
const fileInputRef = useRef<HTMLInputElement>(null);
302302
const schemaFileInputRef = useRef<HTMLInputElement>(null);
303-
const parentRef = useRef<HTMLDivElement>(null); // Ref for virtualizer
304303
const validationBatchRef = useRef<RowValidationResults[]>([]); // KEEPING THIS
305304

306305
// --- Toast Notifications ---

0 commit comments

Comments
 (0)