From 47578c001869b55141e4b666fb46226013f8dc11 Mon Sep 17 00:00:00 2001 From: Bryan Brooks Date: Mon, 23 Feb 2026 16:56:50 -0600 Subject: [PATCH] fix: resolve lint errors blocking CI pipeline Fix unused variable errors: prefix catch vars with _, remove unused imports, add caughtErrorsIgnorePattern to eslint config. --- gateway/eslint.config.js | 2 +- gateway/src/routes/admin-dashboard.ts | 2 +- gateway/src/routes/admin.proxy.test.ts | 2 +- gateway/src/routes/proxy-auth.ts | 8 ++++---- gateway/src/utils/proxy-auth.test.ts | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gateway/eslint.config.js b/gateway/eslint.config.js index 5f5f0d7..69bcb2d 100644 --- a/gateway/eslint.config.js +++ b/gateway/eslint.config.js @@ -15,7 +15,7 @@ export default tseslint.config( }, }, rules: { - '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], + '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }], '@typescript-eslint/no-explicit-any': 'warn', }, }, diff --git a/gateway/src/routes/admin-dashboard.ts b/gateway/src/routes/admin-dashboard.ts index 816749e..719daf1 100644 --- a/gateway/src/routes/admin-dashboard.ts +++ b/gateway/src/routes/admin-dashboard.ts @@ -319,7 +319,7 @@ export function createAdminDashboardRoutes( description: description || null, }); res.redirect('/admin/dashboard/access?msg=Rule+added'); - } catch (e) { + } catch (_e) { res.redirect('/admin/dashboard/access?msg=Failed+to+add+rule'); } }); diff --git a/gateway/src/routes/admin.proxy.test.ts b/gateway/src/routes/admin.proxy.test.ts index eb544f3..0b0f7b6 100644 --- a/gateway/src/routes/admin.proxy.test.ts +++ b/gateway/src/routes/admin.proxy.test.ts @@ -1,7 +1,7 @@ /** * Admin Proxy API Tests */ -import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; +import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import express from 'express'; import request from 'supertest'; import crypto from 'crypto'; diff --git a/gateway/src/routes/proxy-auth.ts b/gateway/src/routes/proxy-auth.ts index ed22d0b..fcbcbb6 100644 --- a/gateway/src/routes/proxy-auth.ts +++ b/gateway/src/routes/proxy-auth.ts @@ -482,7 +482,7 @@ function renderProxyLoginPage(authRequestId: string, nonce?: string, errorMessag `; } -function renderForbiddenPage(nonce?: string): string { +function renderForbiddenPage(_nonce?: string): string { return ` @@ -501,7 +501,7 @@ function renderForbiddenPage(nonce?: string): string { `; } -function renderAccessDeniedPage(nonce?: string): string { +function renderAccessDeniedPage(_nonce?: string): string { return ` @@ -520,7 +520,7 @@ function renderAccessDeniedPage(nonce?: string): string { `; } -function renderErrorPage(title: string, message: string, nonce?: string): string { +function renderErrorPage(title: string, message: string, _nonce?: string): string { return ` @@ -539,7 +539,7 @@ function renderErrorPage(title: string, message: string, nonce?: string): string `; } -function renderLoggedOutPage(nonce?: string): string { +function renderLoggedOutPage(_nonce?: string): string { return ` diff --git a/gateway/src/utils/proxy-auth.test.ts b/gateway/src/utils/proxy-auth.test.ts index 8ddb878..6fd5d48 100644 --- a/gateway/src/utils/proxy-auth.test.ts +++ b/gateway/src/utils/proxy-auth.test.ts @@ -1,7 +1,7 @@ /** * Forward-Auth Proxy Utilities Tests */ -import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest'; +import { describe, it, expect, vi } from 'vitest'; import { createSessionCookie, verifySessionCookie, -- knotmirror 0.0.1