From 105ad7d0fa2e9bf21684217e3438ac039c62d848 Mon Sep 17 00:00:00 2001 From: estib Date: Mon, 2 Sep 2024 15:18:31 +0200 Subject: [PATCH] Resolve linting errors --- .../lib/components/RemoveProjectButton.svelte | 20 +++++++------------ apps/desktop/src/lib/utils/errors.ts | 1 - crates/gitbutler-tauri/src/projects.rs | 2 +- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/apps/desktop/src/lib/components/RemoveProjectButton.svelte b/apps/desktop/src/lib/components/RemoveProjectButton.svelte index c7793e881..c448ad1ae 100644 --- a/apps/desktop/src/lib/components/RemoveProjectButton.svelte +++ b/apps/desktop/src/lib/components/RemoveProjectButton.svelte @@ -14,24 +14,18 @@ modal.close(); } -function handleClick() { - if (noModal) { - onDeleteClicked(); - } else { - modal.show(); + function handleClick() { + if (noModal) { + onDeleteClicked(); + } else { + modal.show(); + } } -} let modal: Modal; - diff --git a/apps/desktop/src/lib/utils/errors.ts b/apps/desktop/src/lib/utils/errors.ts index e5fe2f5aa..3bffe89df 100644 --- a/apps/desktop/src/lib/utils/errors.ts +++ b/apps/desktop/src/lib/utils/errors.ts @@ -16,7 +16,6 @@ export interface FailedToOpenRepoInexistentError extends BaseKnownError { export type KnownError = FailedToOpenRepoInexistentError; - export function getErrorMessage(something: unknown): string | null { if (something instanceof Error) return something.message; if (typeof something === 'string') return something; diff --git a/crates/gitbutler-tauri/src/projects.rs b/crates/gitbutler-tauri/src/projects.rs index 2219135ab..c19d0d028 100644 --- a/crates/gitbutler-tauri/src/projects.rs +++ b/crates/gitbutler-tauri/src/projects.rs @@ -98,7 +98,7 @@ pub mod commands { projects: State<'_, Controller>, path: &path::Path, ) -> Result<(), Error> { - let project = projects + let project = projects .list() .context("failed to list projects")? .into_iter()