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

Use Svelte 5 without migration #1283

Draft
wants to merge 17 commits into
base: develop
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions .github/workflows/develop-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
cache: 'pnpm'
cache-dependency-path: './frontend/pnpm-lock.yaml'
- run: pnpm install
- run: pnpm svelte-kit sync
- run: pnpm run -r build # We need code/types generated by the build (e.g. gql/generated)
- id: svelte_check
run: pnpm run -r --no-bail check --output machine
Expand Down
1 change: 1 addition & 0 deletions frontend/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ tasks:
sources:
- package.json
- pnpm-lock.yaml
- pnpm-workspace.yaml
cmds:
- corepack enable || true
- pnpm install
Expand Down
1 change: 1 addition & 0 deletions frontend/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ COPY . /app/
COPY src /app/src
COPY static /app/static
ENV DockerDev=true
RUN pnpm svelte-kit sync
CMD [ "pnpm", "run", "-r", "--include-workspace-root", "lexbox-dev" ]
11 changes: 7 additions & 4 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { FlatCompat } from '@eslint/eslintrc';
import { fileURLToPath } from 'url';
import {FlatCompat} from '@eslint/eslintrc';
import {fileURLToPath} from 'url';
import globals from 'globals';
import js from '@eslint/js';
import path from 'path';
import svelteParser from 'svelte-eslint-parser';
import tsParser from '@typescript-eslint/parser';
import svelteConfig from './svelte.config.js';

// mimic CommonJS variables
const __filename = fileURLToPath(import.meta.url);
Expand All @@ -29,7 +30,7 @@ export default [
// TypeScript and Svelte plugins don't seem to support the new config format yet
// So, using backwards compatibility util: https://eslint.org/blog/2022/08/new-config-system-part-2/#backwards-compatibility-utility
...compat.config({
plugins: ['@typescript-eslint'],
plugins: ['@typescript-eslint', '@stylistic'],
extends: ['plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking'],
overrides: [
{
Expand Down Expand Up @@ -83,7 +84,7 @@ export default [
'format': ['camelCase', 'PascalCase'],
}
],
'@typescript-eslint/quotes': ['error', 'single', { 'allowTemplateLiterals': true }],
'@stylistic/quotes': ['error', 'single', { 'allowTemplateLiterals': true }],
'@typescript-eslint/no-unused-vars': [
'error',
{
Expand All @@ -108,6 +109,7 @@ export default [
'svelte/no-store-async': 'error',
'svelte/require-store-reactive-access': 'error',
'svelte/mustache-spacing': 'error',
'svelte/valid-compile' : 'warn',
'func-style': ['warn', 'declaration'],
"no-restricted-imports": ["error", {
"patterns": [{
Expand All @@ -124,6 +126,7 @@ export default [
project: true,
tsconfigRootDir: __dirname,
extraFileExtensions: ['.svelte'], // Yes, TS-Parser, relax when you're fed svelte files
svelteConfig: svelteConfig,
},
globals: {
...globals.browser,
Expand Down
20 changes: 11 additions & 9 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,24 @@
"@graphql-typed-document-node/core": "^3.2.0",
"@iconify-json/mdi": "^1.1.66",
"@playwright/test": "^1.44.0",
"@sveltejs/adapter-node": "^4.0.1",
"@sveltejs/kit": "^2.5.10",
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"@sveltejs/adapter-node": "^5.2.9",
"@sveltejs/kit": "^2.8.4",
"@sveltejs/vite-plugin-svelte": "^4.0.2",
"@tailwindcss/typography": "^0.5.13",
"@types/mjml": "^4.7.4",
"@types/node": "^20.12.12",
"@types/zxcvbn": "^4.4.4",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/eslint-plugin": "catalog:",
"@stylistic/eslint-plugin": "catalog:",
"@typescript-eslint/parser": "catalog:",
"@urql/core": "^5.0.4",
"@urql/core": "^5.0.8",
"@urql/devtools": "^2.0.3",
"@urql/exchange-graphcache": "^7.1.2",
"@urql/svelte": "^4.2.1",
"@urql/svelte": "^4.2.2",
"autoprefixer": "^10.4.19",
"daisyui": "^4.11.1",
"eslint": "catalog:",
"eslint-plugin-svelte": "^2.39.0",
"eslint-plugin-svelte": "catalog:",
"globals": "^13.24.0",
"graphql": "^16.8.1",
"json5": "^2.2.3",
Expand All @@ -63,7 +64,7 @@
"rimraf": "^5.0.7",
"svelte": "catalog:",
"svelte-check": "catalog:",
"svelte-eslint-parser": "^0.33.1",
"svelte-eslint-parser": "catalog:",
"svelte-preprocess": "catalog:",
"svelte-turnstile": "^0.5.0",
"sveltekit-superforms": "^1.13.4",
Expand Down Expand Up @@ -96,11 +97,12 @@
"@vitejs/plugin-basic-ssl": "^1.1.0",
"css-tree": "^2.3.1",
"e2e-mailbox": "1.1.5",
"estree-walker": "^3.0.3",
"js-cookie": "^3.0.5",
"just-order-by": "^1.0.0",
"mjml": "^4.15.3",
"set-cookie-parser": "^2.6.0",
"svelte-exmarkdown": "^3.0.5",
"svelte-exmarkdown": "^4.0.1",
"svelte-intl-precompile": "^0.12.3",
"sveltekit-search-params": "^2.1.2",
"tus-js-client": "^4.1.0",
Expand Down
Loading
Loading