fix linting

This commit is contained in:
peterkogo
2025-04-17 10:34:47 +02:00
parent 3d18393615
commit 1083170b1d
6 changed files with 5 additions and 8 deletions
@@ -25,6 +25,7 @@ export default function (node: Element, target: Portal | undefined) {
async update(target: Portal) { async update(target: Portal) {
if (target !== previousTarget) { if (target !== previousTarget) {
node.parentNode?.removeChild(node); node.parentNode?.removeChild(node);
previousTarget = target;
} }
tryToMount(node, domNode, target); tryToMount(node, domNode, target);
}, },
@@ -13,7 +13,6 @@
height, height,
selectEdgeOnClick = false, selectEdgeOnClick = false,
transparent = false, transparent = false,
style,
class: className, class: className,
children, children,
...rest ...rest
@@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { useStore } from '$lib/store'; import { useStore } from '$lib/store';
import type { Edge } from '$lib/types'; import type { Edge } from '$lib/types';
import { XYHandle, type HandleType, type XYPosition } from '@xyflow/system'; import { XYHandle, type HandleType } from '@xyflow/system';
import { getContext } from 'svelte'; import { getContext } from 'svelte';
import { EdgeLabel } from '../EdgeLabel'; import { EdgeLabel } from '../EdgeLabel';
import type { EdgeReconnectAnchorProps } from './types'; import type { EdgeReconnectAnchorProps } from './types';
@@ -12,7 +12,6 @@
position, position,
class: className, class: className,
size = 25, size = 25,
style,
children, children,
...rest ...rest
}: EdgeReconnectAnchorProps = $props(); }: EdgeReconnectAnchorProps = $props();
@@ -26,7 +26,7 @@
// Unfortunately we have to destructure the props here this way, // Unfortunately we have to destructure the props here this way,
// so we don't pass all the props as attributes to the div element // so we don't pass all the props as attributes to the div element
/* eslint-disable @typescript-eslint/no-unused-vars */
let { let {
id, id,
class: className, class: className,
@@ -83,6 +83,7 @@
disableKeyboardA11y, disableKeyboardA11y,
...divAttributes ...divAttributes
} = $derived(rest); } = $derived(rest);
/* eslint-enable @typescript-eslint/no-unused-vars */
type OnlyDivAttributes<T> = { type OnlyDivAttributes<T> = {
[K in keyof T]: K extends keyof HTMLAttributes<HTMLDivElement> ? T[K] : never; [K in keyof T]: K extends keyof HTMLAttributes<HTMLDivElement> ? T[K] : never;
@@ -10,7 +10,6 @@
type XYResizerChildChange type XYResizerChildChange
} from '@xyflow/system'; } from '@xyflow/system';
import type { ResizeControlProps } from './types'; import type { ResizeControlProps } from './types';
import { useSvelteFlow } from '$lib/hooks/useSvelteFlow.svelte';
import type { Node } from '$lib/types'; import type { Node } from '$lib/types';
let { let {
@@ -34,8 +33,6 @@
const store = useStore(); const store = useStore();
const { updateNode } = useSvelteFlow();
let id = $derived( let id = $derived(
typeof nodeId === 'string' ? nodeId : getContext<string>('svelteflow__node_id') typeof nodeId === 'string' ? nodeId : getContext<string>('svelteflow__node_id')
); );
@@ -1,5 +1,5 @@
import type { Snippet } from 'svelte'; import type { Snippet } from 'svelte';
import type { ClassValue, HTMLAttributes } from 'svelte/elements'; import type { HTMLAttributes } from 'svelte/elements';
import type { import type {
ControlPosition, ControlPosition,
ResizeControlVariant, ResizeControlVariant,