chore(svelte): formatted and lint errors fixed

This commit is contained in:
peterkogo
2024-04-03 10:51:22 +02:00
parent d775012e1b
commit 3a4ddc2aee
16 changed files with 60 additions and 76 deletions
@@ -1,6 +1,6 @@
<script lang="ts" context="module">
declare const window: any;
declare const window: Window | undefined;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const getAttrFunction = (func: any): GetMiniMapNodeAttribute =>
func instanceof Function ? func : () => func;
</script>
@@ -61,6 +61,7 @@
const nodeStrokeColorFunc = getAttrFunction(nodeStrokeColor);
const nodeClassFunc = getAttrFunction(nodeClass);
const shapeRendering =
// @ts-expect-error - TS doesn't know about chrome
typeof window === 'undefined' || !!window.chrome ? 'crispEdges' : 'geometricPrecision';
const labelledBy = `svelte-flow__minimap-desc-${$flowId}`;
@@ -52,7 +52,7 @@
$: colorStyleProp = variant === ResizeControlVariant.Line ? 'border-color' : 'background-color';
$: _style = style ?? '';
$: controlStyle = !!color ? `${_style} ${colorStyleProp}: ${color};` : _style;
$: controlStyle = color ? `${_style} ${colorStyleProp}: ${color};` : _style;
onMount(() => {
if (resizeControlRef) {