mirror of
https://github.com/aljazceru/goose.git
synced 2026-01-26 09:44:28 +01:00
Fix ESLint warnings and and enable max warnings 0 to fail builds (#2101)
This commit is contained in:
@@ -6,7 +6,7 @@ import log from './logger';
|
||||
export const getBinaryPath = (app: Electron.App, binaryName: string): string => {
|
||||
const isWindows = process.platform === 'win32';
|
||||
|
||||
const possiblePaths = [];
|
||||
const possiblePaths: string[] = [];
|
||||
if (isWindows) {
|
||||
addPaths(isWindows, possiblePaths, `${binaryName}.exe`, app);
|
||||
addPaths(isWindows, possiblePaths, `${binaryName}.cmd`, app);
|
||||
@@ -33,7 +33,7 @@ export const getBinaryPath = (app: Electron.App, binaryName: string): string =>
|
||||
|
||||
const addPaths = (
|
||||
isWindows: boolean,
|
||||
possiblePaths: any[],
|
||||
possiblePaths: string[],
|
||||
executableName: string,
|
||||
app: Electron.App
|
||||
): void => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { getApiUrl, getSecretKey } from '../config';
|
||||
import { required_keys } from '../components/settings/models/hardcoded_stuff';
|
||||
|
||||
export async function DeleteProviderKeysFromKeychain() {
|
||||
for (const [provider, keys] of Object.entries(required_keys)) {
|
||||
for (const [_provider, keys] of Object.entries(required_keys)) {
|
||||
for (const keyName of keys) {
|
||||
try {
|
||||
const deleteResponse = await fetch(getApiUrl('/configs/delete'), {
|
||||
|
||||
@@ -16,7 +16,12 @@ import type { ExtensionConfig, FixedExtensionEntry } from '../components/ConfigC
|
||||
import { toastService } from '../toasts';
|
||||
import { ExtensionQuery, addExtension as apiAddExtension } from '../api';
|
||||
|
||||
export function getStoredProvider(config: any): string | null {
|
||||
interface AppConfig {
|
||||
GOOSE_PROVIDER?: string;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export function getStoredProvider(config: AppConfig): string | null {
|
||||
return config.GOOSE_PROVIDER || localStorage.getItem(GOOSE_PROVIDER);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user