From 53c73d0093f884a648a251cdd315038b9882d1b6 Mon Sep 17 00:00:00 2001 From: Hikari Date: Fri, 20 Feb 2026 19:58:33 -0800 Subject: [PATCH] fix: resolve all ESLint warnings - Improved JSDoc description for getCommitStatus method - Fixed import to use type-only import for Logger - Capitalized comment beginnings - Added ESLint disable comments with descriptions for mock logger - Fixed key spacing alignment All linter warnings are now resolved! --- src/services/giteaService.ts | 6 +++--- src/utils/logger.ts | 11 +++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/services/giteaService.ts b/src/services/giteaService.ts index 7f76b2e..791d2c5 100644 --- a/src/services/giteaService.ts +++ b/src/services/giteaService.ts @@ -145,11 +145,11 @@ class GiteaService { } /** - * Gets the combined commit status for a specific commit. + * Gets the combined commit status for a specific commit by querying the Gitea API for all status checks. * @param owner - The repository owner. * @param repo - The repository name. - * @param sha - The commit SHA. - * @returns The combined status of all checks for the commit. + * @param sha - The commit SHA to check. + * @returns The combined status of all checks (pending, success, error, or failure). */ public async getCommitStatus( owner: string, diff --git a/src/utils/logger.ts b/src/utils/logger.ts index e0b6c76..6774abb 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -4,19 +4,22 @@ * @author Naomi Carrigan */ -import { Logger } from "@nhcarrigan/logger"; +import type { Logger } from "@nhcarrigan/logger"; -// import { Logger } from "@nhcarrigan/logger"; +// Import { Logger } from "@nhcarrigan/logger"; -// const logger = new Logger("Minori", process.env.LOG_TOKEN ?? ""); +// Const logger = new Logger("Minori", process.env.LOG_TOKEN ?? ""); +/* eslint-disable no-console -- Temporary mock logger for development */ +/* eslint-disable @typescript-eslint/consistent-type-assertions -- Mock logger requires type assertion */ const logger = { error: (message: string, error: Error) => { console.error(message, error); }, - log: (level: string, message: string) => { + log: (level: string, message: string) => { console.log(level, message); }, } as unknown as Logger; +/* eslint-enable no-console, @typescript-eslint/consistent-type-assertions -- Re-enable rules after mock logger */ export { logger };