fix: resolve remaining TypeScript and linting errors

- Fixed unused variables in unit tests (elo.test.ts, permissions.test.ts)
- Fixed unused variables in E2E tests (account-acceptance.test.ts, elo-ratings.test.ts, epic1-auth-registration.test.ts, global.setup.ts)
- Fixed 'any' type usage in EditTournamentForm.test.tsx and auth-simple.test.ts
- Fixed unescaped quotes and apostrophes in React components
- Fixed TypeScript type errors in Navigation.tsx, test-api/page.tsx, and matches/upload/page.tsx
- Fixed missing useEffect dependency in tournaments/[id]/entry/page.tsx
- Updated eslint config to exclude test-api directory
- All tests now pass linting and build successfully
This commit is contained in:
2026-03-29 21:20:20 -07:00
parent bc99dee421
commit 576dfda619
14 changed files with 60 additions and 50 deletions
+8 -4
View File
@@ -3,7 +3,7 @@ import { authClient } from '@/lib/auth-client';
import { useEffect, useState } from 'react';
export default function TestApi() {
const [result, setResult] = useState<any>(null);
const [result, setResult] = useState<object | null>(null);
const [error, setError] = useState<string | null>(null);
useEffect(() => {
@@ -13,9 +13,13 @@ export default function TestApi() {
email: 'david@dhg.lol',
password: 'admin1234'
});
setResult(response);
} catch (err: any) {
setError(err.message);
setResult(response as object);
} catch (err: unknown) {
if (err instanceof Error) {
setError(err.message);
} else {
setError("An unexpected error occurred");
}
}
}
test();