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
+2 -7
View File
@@ -6,14 +6,11 @@
import { test, expect } from '@playwright/test';
import { PrismaClient } from '@prisma/client';
import { scryptAsync } from '@noble/hashes/scrypt.js';
import { hex } from '@better-auth/utils/hex';
import fs from 'fs';
import path from 'path';
const prisma = new PrismaClient();
// Polyfill crypto for Node.js environment
const crypto = globalThis.crypto || require('crypto').webcrypto;
test.describe('Elo Rating Updates', () => {
test.beforeAll(async () => {
// Clean up any existing test data
@@ -285,8 +282,6 @@ ${tournament.id},1,1,${player1.name},${player3.name},10,${player2.name},${player
${tournament.id},2,1,${player1.name},${player3.name},10,${player2.name},${player4.name},5,odds`;
// Upload first match through UI
const fs = require('fs');
const path = require('path');
const tmpFile1 = path.join('/tmp', `elo-test-multi-1-${Date.now()}.csv`);
fs.writeFileSync(tmpFile1, csvContent1);