diff --git a/packages/svelte/eslint.config.js b/packages/svelte/eslint.config.js index 64f874a..5dfa47f 100644 --- a/packages/svelte/eslint.config.js +++ b/packages/svelte/eslint.config.js @@ -1,28 +1,14 @@ -import sveltePlugin from 'eslint-plugin-svelte' -import * as svelteParser from 'svelte-eslint-parser' -import * as tsParser from '@typescript-eslint/parser' import antfu from '@antfu/eslint-config' export default await antfu( { vue: false, + svelte: true, ignores: ['.svelte-kit', 'tsconfig.json'], }, { files: ['**/*.svelte'], - plugins: { - svelte: sveltePlugin, - }, - languageOptions: { - parser: svelteParser, - parserOptions: { - extraFileExtensions: ['.svelte'], - parser: tsParser, - }, - }, rules: { - ...sveltePlugin.configs.recommended.rules, - 'import/no-mutable-exports': 'off', 'no-undef-init': 'off', }, }, diff --git a/packages/svelte/package.json b/packages/svelte/package.json index e75c71c..f14161a 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -2,7 +2,7 @@ "name": "@unlazy/svelte", "type": "module", "version": "0.10.2", - "packageManager": "pnpm@8.11.0", + "packageManager": "pnpm@8.14.0", "description": "Svelte lazy loading library for placeholder images", "author": "Johann Schopplich ", "license": "MIT", @@ -49,15 +49,15 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "peerDependencies": { - "svelte": "^3.54.0" + "svelte": "^3 || ^4" }, "dependencies": { "unlazy": "workspace:*" }, "devDependencies": { - "@sveltejs/adapter-auto": "^2.1.1", - "@sveltejs/kit": "^1.27.7", - "@sveltejs/package": "^2.2.3", + "@sveltejs/adapter-auto": "^3.0.1", + "@sveltejs/kit": "^2.0.6", + "@sveltejs/package": "^2.2.5", "eslint-plugin-svelte": "^2.35.1", "svelte": "^4.2.8", "svelte-check": "^3.6.2", diff --git a/packages/svelte/src/lib/UnLazyImage.svelte b/packages/svelte/src/lib/UnLazyImage.svelte index 266a919..c7faaac 100644 --- a/packages/svelte/src/lib/UnLazyImage.svelte +++ b/packages/svelte/src/lib/UnLazyImage.svelte @@ -1,4 +1,4 @@ - diff --git a/packages/svelte/svelte.config.js b/packages/svelte/svelte.config.js index 8fa2889..a52aed3 100644 --- a/packages/svelte/svelte.config.js +++ b/packages/svelte/svelte.config.js @@ -1,5 +1,5 @@ import adapter from '@sveltejs/adapter-auto' -import { vitePreprocess } from '@sveltejs/kit/vite' +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' /** @type {import('@sveltejs/kit').Config} */ const config = { diff --git a/packages/svelte/tsconfig.json b/packages/svelte/tsconfig.json index 5c56cee..3b58fd5 100644 --- a/packages/svelte/tsconfig.json +++ b/packages/svelte/tsconfig.json @@ -8,6 +8,8 @@ "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, - "strict": true + "strict": true, + "module": "NodeNext", + "moduleResolution": "NodeNext" } } diff --git a/packages/svelte/vite.config.ts b/packages/svelte/vite.config.ts index e704ef8..4d61ae3 100644 --- a/packages/svelte/vite.config.ts +++ b/packages/svelte/vite.config.ts @@ -5,7 +5,6 @@ import { defineConfig } from 'vite' const currentDir = new URL('.', import.meta.url).pathname export default defineConfig({ - // @ts-expect-error: Vite 5 support pending plugins: [sveltekit()], // Custom alias for unlazy until Jiti issue is resolved