From 40e11e053c1cf304255c21f91e950c520285c6c5 Mon Sep 17 00:00:00 2001 From: Taylor Mullen Date: Fri, 18 Apr 2025 19:09:41 -0400 Subject: Fix remaining tslint errors (YAY). - Also updated ci.yml to ensure that linting failures will break the build. Fully fixes https://b.corp.google.com/issues/411384603 --- packages/cli/src/ui/hooks/useAppEffects.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'packages/cli/src/ui/hooks') diff --git a/packages/cli/src/ui/hooks/useAppEffects.ts b/packages/cli/src/ui/hooks/useAppEffects.ts index 7bd7c6d6..86b56223 100644 --- a/packages/cli/src/ui/hooks/useAppEffects.ts +++ b/packages/cli/src/ui/hooks/useAppEffects.ts @@ -3,6 +3,7 @@ import fs from 'fs'; import path from 'path'; import os from 'os'; import type { HistoryItem } from '../types.js'; +import { getErrorMessage } from '../../utils/errors.js'; const warningsFilePath = path.join(os.tmpdir(), 'gemini-code-cli-warnings.txt'); @@ -19,17 +20,17 @@ export function useStartupWarnings( ); try { fs.unlinkSync(warningsFilePath); - } catch (unlinkErr: any) { + } catch { setStartupWarnings((prev) => [ ...prev, `Warning: Could not delete temporary warnings file.`, ]); } } - } catch (err: any) { + } catch (err: unknown) { setStartupWarnings((prev) => [ ...prev, - `Error checking/reading warnings file: ${err.message}`, + `Error checking/reading warnings file: ${getErrorMessage(err)}`, ]); } }, [setStartupWarnings]); // Include setStartupWarnings in dependency array -- cgit v1.2.3