+
diff --git a/examples/svelte/svelte.config.js b/examples/svelte/svelte.config.js
index 94011562..10899539 100644
--- a/examples/svelte/svelte.config.js
+++ b/examples/svelte/svelte.config.js
@@ -5,7 +5,7 @@ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
- preprocess: vitePreprocess({ script: true }),
+ preprocess: vitePreprocess(),
compilerOptions: {
runes: true
},
diff --git a/examples/svelte/tsconfig.json b/examples/svelte/tsconfig.json
index 2bb201c3..8625d4ce 100644
--- a/examples/svelte/tsconfig.json
+++ b/examples/svelte/tsconfig.json
@@ -9,7 +9,9 @@
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
- "target": "ES2022",
+ "target": "esnext",
+ "module": "esnext",
+ "moduleResolution": "bundler",
"verbatimModuleSyntax": true,
"isolatedModules": true
}
diff --git a/packages/svelte/eslint.config.js b/packages/svelte/eslint.config.js
index 56e30008..668d61b0 100644
--- a/packages/svelte/eslint.config.js
+++ b/packages/svelte/eslint.config.js
@@ -1,29 +1,34 @@
-import globals from 'globals';
+import prettier from 'eslint-config-prettier';
+import { fileURLToPath } from 'node:url';
+import { includeIgnoreFile } from '@eslint/compat';
import js from '@eslint/js';
-import ts from 'typescript-eslint';
import svelte from 'eslint-plugin-svelte';
-import eslintConfigPrettier from 'eslint-config-prettier';
+import { defineConfig } from 'eslint/config';
+import globals from 'globals';
+import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';
-export default ts.config(
+const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
+
+export default defineConfig(
+ includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
- eslintConfigPrettier,
+ prettier,
+ ...svelte.configs.prettier,
{
languageOptions: {
- ecmaVersion: 2020,
- sourceType: 'module',
- globals: {
- ...globals.browser,
- ...globals.es2017,
- ...globals.node
- }
+ globals: { ...globals.browser, ...globals.node }
+ },
+ rules: {
+ // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
+ // see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
+ 'no-undef': 'off'
}
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
- ignores: ['eslint.config.js', 'svelte.config.js'],
languageOptions: {
parserOptions: {
projectService: true,
@@ -32,8 +37,5 @@ export default ts.config(
svelteConfig
}
}
- },
- {
- ignores: ['.svelte-kit/*', 'build/*', 'dist/*'] // Add common ignore patterns
}
);
diff --git a/packages/svelte/package.json b/packages/svelte/package.json
index c2dd3ba6..b04a36ec 100644
--- a/packages/svelte/package.json
+++ b/packages/svelte/package.json
@@ -55,35 +55,36 @@
"@xyflow/system": "workspace:*"
},
"devDependencies": {
- "@eslint/js": "^9.28.0",
- "@sveltejs/adapter-auto": "^6.0.1",
- "@sveltejs/kit": "^2.21.4",
- "@sveltejs/package": "^2.3.11",
- "@sveltejs/vite-plugin-svelte": "^5.1.0",
- "@typescript-eslint/eslint-plugin": "^8.34.0",
- "@typescript-eslint/parser": "^8.34.0",
- "autoprefixer": "^10.4.21",
- "cssnano": "^7.0.7",
- "dotenv": "^16.5.0",
- "eslint": "^9.28.0",
- "eslint-config-prettier": "^10.1.5",
- "eslint-plugin-svelte": "^3.9.2",
- "globals": "^16.2.0",
- "postcss": "^8.5.4",
+ "@eslint/compat": "^2.0.0",
+ "@eslint/js": "^9.39.1",
+ "@sveltejs/adapter-auto": "^7.0.0",
+ "@sveltejs/kit": "^2.49.1",
+ "@sveltejs/package": "^2.5.7",
+ "@sveltejs/vite-plugin-svelte": "^6.2.1",
+ "@typescript-eslint/eslint-plugin": "^8.48.1",
+ "@typescript-eslint/parser": "^8.48.1",
+ "autoprefixer": "^10.4.22",
+ "cssnano": "^7.1.2",
+ "dotenv": "^17.2.3",
+ "eslint": "^9.39.1",
+ "eslint-config-prettier": "^10.1.8",
+ "eslint-plugin-svelte": "^3.13.0",
+ "globals": "^16.5.0",
+ "postcss": "^8.5.6",
"postcss-cli": "^11.0.1",
"postcss-combine-duplicated-selectors": "^10.0.3",
- "postcss-import": "^16.1.0",
+ "postcss-import": "^16.1.1",
"postcss-nested": "^7.0.2",
"postcss-rename": "^0.8.0",
- "prettier": "^3.5.3",
+ "prettier": "^3.7.4",
"prettier-plugin-svelte": "^3.4.0",
- "svelte": "^5.33.19",
- "svelte-check": "^4.2.1",
- "svelte-eslint-parser": "^1.2.0",
+ "svelte": "^5.45.4",
+ "svelte-check": "^4.3.4",
+ "svelte-eslint-parser": "^1.4.0",
"svelte-preprocess": "^6.0.3",
"tslib": "^2.8.1",
- "typescript": "^5.8.3",
- "typescript-eslint": "^8.34.0"
+ "typescript": "^5.9.3",
+ "typescript-eslint": "^8.48.1"
},
"peerDependencies": {
"svelte": "^5.25.0"
diff --git a/packages/svelte/src/lib/components/EdgeLabel/EdgeLabel.svelte b/packages/svelte/src/lib/components/EdgeLabel/EdgeLabel.svelte
index b01ce307..ab48ef0d 100644
--- a/packages/svelte/src/lib/components/EdgeLabel/EdgeLabel.svelte
+++ b/packages/svelte/src/lib/components/EdgeLabel/EdgeLabel.svelte
@@ -1,11 +1,11 @@
{
- if (selectEdgeOnClick) store.handleEdgeSelection(edgeId);
+ if (selectEdgeOnClick && edgeId) store.handleEdgeSelection(edgeId);
}}
{...rest}
>
diff --git a/packages/svelte/src/lib/components/EdgeReconnectAnchor/EdgeReconnectAnchor.svelte b/packages/svelte/src/lib/components/EdgeReconnectAnchor/EdgeReconnectAnchor.svelte
index 81f0ab2d..2a4975df 100644
--- a/packages/svelte/src/lib/components/EdgeReconnectAnchor/EdgeReconnectAnchor.svelte
+++ b/packages/svelte/src/lib/components/EdgeReconnectAnchor/EdgeReconnectAnchor.svelte
@@ -1,8 +1,8 @@