lint: remove unused imports and rename unused catch errors (8 fixes)
Co-Authored-By: Justin Edmund <justin@jedmund.com>
This commit is contained in:
parent
14e18fb1bb
commit
29f2da61dd
6 changed files with 4 additions and 9 deletions
|
|
@ -5,7 +5,7 @@ import * as pmView from '@tiptap/pm/view'
|
|||
function getPmView() {
|
||||
try {
|
||||
return pmView
|
||||
} catch (error: Error) {
|
||||
} catch (_error) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Editor, Node, mergeAttributes, type CommandProps, type NodeViewProps } from '@tiptap/core'
|
||||
import { Node, mergeAttributes, type CommandProps, type NodeViewProps } from '@tiptap/core'
|
||||
import type { Component } from 'svelte'
|
||||
import { SvelteNodeViewRenderer } from 'svelte-tiptap'
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
interface Props extends NodeViewProps {}
|
||||
|
||||
let { node, updateAttributes }: Props = $props()
|
||||
let { node }: Props = $props()
|
||||
|
||||
let mapContainer: HTMLDivElement
|
||||
let map: L.Map | null = null
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
import Upload from 'lucide-svelte/icons/upload'
|
||||
import { NodeViewWrapper } from 'svelte-tiptap'
|
||||
import UnifiedMediaModal from '../../../admin/UnifiedMediaModal.svelte'
|
||||
import { onMount } from 'svelte'
|
||||
|
||||
const { editor, deleteNode }: NodeViewProps = $props()
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
const { editor, node, deleteNode, getPos, selected }: NodeViewProps = $props()
|
||||
|
||||
let loading = $state(false)
|
||||
let showActions = $state(false)
|
||||
let showContextMenu = $state(false)
|
||||
let contextMenuPosition = $state({ x: 0, y: 0 })
|
||||
|
|
@ -48,7 +47,6 @@
|
|||
|
||||
async function refreshMetadata() {
|
||||
if (!node.attrs.url) return
|
||||
loading = true
|
||||
|
||||
try {
|
||||
const response = await fetch(
|
||||
|
|
@ -77,8 +75,6 @@
|
|||
}
|
||||
} catch (err) {
|
||||
console.error('Error refreshing metadata:', err)
|
||||
} finally {
|
||||
loading = false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ export async function parseRequestBody<T>(request: Request): Promise<T | null> {
|
|||
try {
|
||||
const body = await request.json()
|
||||
return body as T
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue