Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(svelte5): upgrade to Svelte 5 #337

Merged
merged 9 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .eslintignore

This file was deleted.

30 changes: 0 additions & 30 deletions .eslintrc.cjs

This file was deleted.

70 changes: 70 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import parser from 'svelte-eslint-parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [
{
ignores: [
'**/*.cjs',
'**/.DS_Store',
'**/node_modules',
'build',
'.svelte-kit',
'package',
'**/.env',
'**/.env.*',
'!**/.env.example',
'**/pnpm-lock.yaml',
'**/package-lock.json',
'**/yarn.lock'
]
},
...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:svelte/recommended'
),
{
plugins: {
'@typescript-eslint': typescriptEslint
},

languageOptions: {
globals: {
...globals.browser,
...globals.node
},

parser: tsParser,
ecmaVersion: 2020,
sourceType: 'module'
}
},
{
files: ['**/*.svelte'],

languageOptions: {
parser: parser,
ecmaVersion: 5,
sourceType: 'script',

parserOptions: {
parser: '@typescript-eslint/parser'
}
}
}
];
17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,45 @@
"format": "prettier --plugin prettier-plugin-svelte --write ."
},
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.13.0",
"@iconify-json/akar-icons": "^1.2.1",
"@iconify-json/eos-icons": "^1.2.1",
"@iconify-json/ic": "^1.2.1",
"@iconify-json/material-symbols": "^1.2.5",
"@iconify-json/ph": "^1.2.1",
"@iconify-json/solar": "^1.2.1",
"@iconify/iconify": "^3.1.1",
"@iconify/tailwind": "^1.1.3",
"@iconify/utils": "^2.1.33",
"@sveltejs/adapter-auto": "^3.2.5",
"@sveltejs/adapter-node": "^5.2.8",
"@sveltejs/adapter-static": "^3.0.5",
"@sveltejs/adapter-vercel": "^5.4.5",
"@sveltejs/kit": "^2.7.2",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@tailwindcss/typography": "^0.5.15",
"@types/dompurify": "^3.0.5",
"@types/jsdom": "^21.1.7",
"@types/katex": "^0.16.7",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.11.0",
"@typescript-eslint/parser": "^8.11.0",
"@vite-pwa/sveltekit": "^0.6.6",
"autoprefixer": "^10.4.20",
"daisyui": "^4.12.13",
"dayjs": "^1.11.13",
"dompurify": "^3.1.7",
"eslint": "^8.57.0",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.46.0",
"fuse.js": "^7.0.0",
"globals": "^15.11.0",
"katex": "^0.16.11",
"marked": "^10.0.0",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.2.7",
"shiki": "^1.22.0",
"svelte": "^4.2.19",
"svelte": "^5.1.3",
"svelte-check": "^4.0.5",
"svelte-local-storage-store": "^0.6.4",
"tailwindcss": "^3.4.14",
Expand All @@ -56,6 +59,6 @@
"typescript": "^5.6.3",
"vite": "^5.4.9"
},
"packageManager": "pnpm@9.0.5",
"packageManager": "pnpm@9.12.2",
"type": "module"
}
Loading
Loading