fix: silent eslint issues

This commit is contained in:
Sujal Shah 2024-11-25 14:00:18 +05:30
parent 1cb836a648
commit f94165a421
3 changed files with 5 additions and 9 deletions

View File

@ -29,9 +29,6 @@ const EXAMPLE_PROMPTS = [
{ text: 'How do I center a div?' }, { text: 'How do I center a div?' },
]; ];
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const providerList = PROVIDER_LIST;
// @ts-ignore TODO: Introduce proper types // @ts-ignore TODO: Introduce proper types
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
const ModelSelector = ({ model, setModel, provider, setProvider, modelList, providerList, apiKeys }) => { const ModelSelector = ({ model, setModel, provider, setProvider, modelList, providerList, apiKeys }) => {

View File

@ -93,14 +93,13 @@ export class ActionRunner {
this.#updateAction(actionId, { ...action, ...data.action, executed: !isStreaming }); this.#updateAction(actionId, { ...action, ...data.action, executed: !isStreaming });
// eslint-disable-next-line consistent-return this.#currentExecutionPromise = this.#currentExecutionPromise
return (this.#currentExecutionPromise = this.#currentExecutionPromise
.then(() => { .then(() => {
this.#executeAction(actionId, isStreaming); this.#executeAction(actionId, isStreaming);
}) })
.catch((error) => { .catch((error) => {
console.error('Action failed:', error); console.error('Action failed:', error);
})); });
} }
async #executeAction(actionId: string, isStreaming: boolean = false) { async #executeAction(actionId: string, isStreaming: boolean = false) {

View File

@ -294,8 +294,8 @@ async function getOllamaModels(): Promise<ModelInfo[]> {
provider: 'Ollama', provider: 'Ollama',
maxTokenAllowed: 8000, maxTokenAllowed: 8000,
})); }));
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) { } catch (e) {
console.error('Error getting Ollama models:', e);
return []; return [];
} }
} }
@ -321,8 +321,8 @@ async function getOpenAILikeModels(): Promise<ModelInfo[]> {
label: model.id, label: model.id,
provider: 'OpenAILike', provider: 'OpenAILike',
})); }));
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) { } catch (e) {
console.error('Error getting OpenAILike models:', e);
return []; return [];
} }
} }
@ -371,8 +371,8 @@ async function getLMStudioModels(): Promise<ModelInfo[]> {
label: model.id, label: model.id,
provider: 'LMStudio', provider: 'LMStudio',
})); }));
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) { } catch (e) {
console.error('Error getting LMStudio models:', e);
return []; return [];
} }
} }