fix: resolve lint and typecheck errors in API routes and tests

- Remove unused imports (users, and) from api-tokens model
- Fix password_hash destructure lint error in user routes
- Fix apiErrorResponse mock pattern in all 12 test files (use instanceof)
- Remove stale eslint-disable directives from test files
- Add eslint override for tests (no-explicit-any, no-require-imports)
- Fix unused vars in settings and tokens tests
- Fix unused tokenB in integration test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
fuomag9
2026-03-26 10:33:47 +01:00
parent 28f61082ce
commit d9806e84e6
17 changed files with 64 additions and 55 deletions
+1 -1
View File
@@ -196,7 +196,7 @@ describe('api-tokens integration', () => {
const userB = await insertUser({ email: 'b@localhost', subject: 'b@localhost', role: 'user' });
const { token: tokenA } = await insertApiToken(userA.id, { name: 'A Token' });
const { token: tokenB } = await insertApiToken(userB.id, { name: 'B Token' });
await insertApiToken(userB.id, { name: 'B Token' });
// User B deletes only their own tokens
await db.delete(apiTokens).where(eq(apiTokens.createdBy, userB.id));