lint: remove unused imports and rename unused variables (6 fixes)
Co-Authored-By: Justin Edmund <justin@jedmund.com>
This commit is contained in:
parent
ee31ed9a1e
commit
38b8b8995c
3 changed files with 4 additions and 6 deletions
|
|
@ -2,7 +2,6 @@
|
||||||
import { onMount } from 'svelte'
|
import { onMount } from 'svelte'
|
||||||
import { goto } from '$app/navigation'
|
import { goto } from '$app/navigation'
|
||||||
import AdminPage from '$lib/components/admin/AdminPage.svelte'
|
import AdminPage from '$lib/components/admin/AdminPage.svelte'
|
||||||
import AdminHeader from '$lib/components/admin/AdminHeader.svelte'
|
|
||||||
import Button from '$lib/components/admin/Button.svelte'
|
import Button from '$lib/components/admin/Button.svelte'
|
||||||
import Modal from '$lib/components/admin/Modal.svelte'
|
import Modal from '$lib/components/admin/Modal.svelte'
|
||||||
import { formatBytes } from '$lib/utils/format'
|
import { formatBytes } from '$lib/utils/format'
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
// Clear any related upload progress
|
// Clear any related upload progress
|
||||||
const fileName = files[index]?.name
|
const fileName = files[index]?.name
|
||||||
if (fileName && uploadProgress[fileName]) {
|
if (fileName && uploadProgress[fileName]) {
|
||||||
const { [fileName]: removed, ...rest } = uploadProgress
|
const { [fileName]: _removed, ...rest } = uploadProgress
|
||||||
uploadProgress = rest
|
uploadProgress = rest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -96,7 +96,7 @@
|
||||||
successCount++
|
successCount++
|
||||||
uploadProgress = { ...uploadProgress, [file.name]: 100 }
|
uploadProgress = { ...uploadProgress, [file.name]: 100 }
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
uploadErrors = [...uploadErrors, `${file.name}: Network error`]
|
uploadErrors = [...uploadErrors, `${file.name}: Network error`]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import { makeDraftKey, saveDraft, loadDraft, clearDraft, timeAgo } from '$lib/ad
|
||||||
import LoadingSpinner from '$lib/components/admin/LoadingSpinner.svelte'
|
import LoadingSpinner from '$lib/components/admin/LoadingSpinner.svelte'
|
||||||
import PostMetadataPopover from '$lib/components/admin/PostMetadataPopover.svelte'
|
import PostMetadataPopover from '$lib/components/admin/PostMetadataPopover.svelte'
|
||||||
import DeleteConfirmationModal from '$lib/components/admin/DeleteConfirmationModal.svelte'
|
import DeleteConfirmationModal from '$lib/components/admin/DeleteConfirmationModal.svelte'
|
||||||
import Button from '$lib/components/admin/Button.svelte'
|
|
||||||
import StatusDropdown from '$lib/components/admin/StatusDropdown.svelte'
|
import StatusDropdown from '$lib/components/admin/StatusDropdown.svelte'
|
||||||
import { createAutoSaveStore } from '$lib/admin/autoSave.svelte'
|
import { createAutoSaveStore } from '$lib/admin/autoSave.svelte'
|
||||||
import AutoSaveStatus from '$lib/components/admin/AutoSaveStatus.svelte'
|
import AutoSaveStatus from '$lib/components/admin/AutoSaveStatus.svelte'
|
||||||
|
|
@ -271,7 +270,7 @@ onMount(async () => {
|
||||||
// Fallback error messaging
|
// Fallback error messaging
|
||||||
loadError = 'Post not found'
|
loadError = 'Post not found'
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
loadError = 'Network error occurred while loading post'
|
loadError = 'Network error occurred while loading post'
|
||||||
} finally {
|
} finally {
|
||||||
loading = false
|
loading = false
|
||||||
|
|
@ -405,7 +404,7 @@ onMount(async () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
// Navigation guard: flush autosave before navigating away (only if there are unsaved changes)
|
// Navigation guard: flush autosave before navigating away (only if there are unsaved changes)
|
||||||
beforeNavigate(async (navigation) => {
|
beforeNavigate(async (_navigation) => {
|
||||||
if (hasLoaded) {
|
if (hasLoaded) {
|
||||||
// If status is 'saved', there are no unsaved changes - allow navigation
|
// If status is 'saved', there are no unsaved changes - allow navigation
|
||||||
if (autoSave.status === 'saved') {
|
if (autoSave.status === 'saved') {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue