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() {
|
function getPmView() {
|
||||||
try {
|
try {
|
||||||
return pmView
|
return pmView
|
||||||
} catch (error: Error) {
|
} catch (_error) {
|
||||||
return null
|
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 type { Component } from 'svelte'
|
||||||
import { SvelteNodeViewRenderer } from 'svelte-tiptap'
|
import { SvelteNodeViewRenderer } from 'svelte-tiptap'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
interface Props extends NodeViewProps {}
|
interface Props extends NodeViewProps {}
|
||||||
|
|
||||||
let { node, updateAttributes }: Props = $props()
|
let { node }: Props = $props()
|
||||||
|
|
||||||
let mapContainer: HTMLDivElement
|
let mapContainer: HTMLDivElement
|
||||||
let map: L.Map | null = null
|
let map: L.Map | null = null
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
import Upload from 'lucide-svelte/icons/upload'
|
import Upload from 'lucide-svelte/icons/upload'
|
||||||
import { NodeViewWrapper } from 'svelte-tiptap'
|
import { NodeViewWrapper } from 'svelte-tiptap'
|
||||||
import UnifiedMediaModal from '../../../admin/UnifiedMediaModal.svelte'
|
import UnifiedMediaModal from '../../../admin/UnifiedMediaModal.svelte'
|
||||||
import { onMount } from 'svelte'
|
|
||||||
|
|
||||||
const { editor, deleteNode }: NodeViewProps = $props()
|
const { editor, deleteNode }: NodeViewProps = $props()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
const { editor, node, deleteNode, getPos, selected }: NodeViewProps = $props()
|
const { editor, node, deleteNode, getPos, selected }: NodeViewProps = $props()
|
||||||
|
|
||||||
let loading = $state(false)
|
|
||||||
let showActions = $state(false)
|
let showActions = $state(false)
|
||||||
let showContextMenu = $state(false)
|
let showContextMenu = $state(false)
|
||||||
let contextMenuPosition = $state({ x: 0, y: 0 })
|
let contextMenuPosition = $state({ x: 0, y: 0 })
|
||||||
|
|
@ -48,7 +47,6 @@
|
||||||
|
|
||||||
async function refreshMetadata() {
|
async function refreshMetadata() {
|
||||||
if (!node.attrs.url) return
|
if (!node.attrs.url) return
|
||||||
loading = true
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
|
|
@ -77,8 +75,6 @@
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Error refreshing metadata:', 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 {
|
try {
|
||||||
const body = await request.json()
|
const body = await request.json()
|
||||||
return body as T
|
return body as T
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue