Skip to content

Svelte v5 migrate #17

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

Draft
wants to merge 13 commits into
base: main
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
24 changes: 0 additions & 24 deletions .eslintrc.json

This file was deleted.

3 changes: 0 additions & 3 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run hooks:pre-push
49 changes: 49 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// eslint.config.js
import js from "@eslint/js";
import svelte from "eslint-plugin-svelte";
import globals from "globals";
import ts from "typescript-eslint";
import svelteConfig from "./svelte.config.js";

export default ts.config(
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
files: ["**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"],
// See more details at: https://typescript-eslint.io/packages/parser/
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: [".svelte"], // Add support for additional file extensions, such as .svelte
parser: ts.parser,
// Specify a parser for each language, if needed:
// parser: {
// ts: ts.parser,
// js: espree, // Use espree for .js files (add: import espree from 'espree')
// typescript: ts.parser
// },

// We recommend importing and specifying svelte.config.js.
// By doing so, some rules in eslint-plugin-svelte will automatically read the configuration and adjust their behavior accordingly.
// While certain Svelte settings may be statically loaded from svelte.config.js even if you don’t specify it,
// explicitly specifying it ensures better compatibility and functionality.
svelteConfig,
},
},
},
{
rules: {
// Override or add rule settings here, such as:
// 'svelte/rule-name': 'error'
},
},
);
54 changes: 28 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,37 @@
"hooks:pre-push": "run-s lint:commit"
},
"devDependencies": {
"@commitlint/cli": "^17.0.2",
"@commitlint/config-conventional": "^17.0.2",
"@prettier/plugin-xml": "^2.2.0",
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.47",
"@tsconfig/svelte": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^5.27.1",
"@typescript-eslint/parser": "^5.27.1",
"commitizen": "^4.2.4",
"@commitlint/cli": "^19.8.1",
"@commitlint/config-conventional": "^19.8.1",
"@prettier/plugin-xml": "^3.4.1",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@tsconfig/svelte": "^5.0.4",
"@typescript-eslint/eslint-plugin": "^8.32.1",
"@typescript-eslint/parser": "^8.32.1",
"commitizen": "^4.3.1",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.17.0",
"eslint-plugin-svelte3": "^4.0.0",
"husky": "^8.0.1",
"lint-staged": "^13.0.0",
"eslint": "^9.26.0",
"eslint-plugin-svelte": "^3.6.0",
"globals": "^16.1.0",
"husky": "^9.1.7",
"lint-staged": "^16.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.6.2",
"prettier-plugin-properties": "^0.1.0",
"prettier-plugin-svelte": "^2.7.0",
"pretty-quick": "^3.1.3",
"svelte": "^3.48.0",
"svelte-check": "^2.7.2",
"svelte-preprocess": "^4.10.7",
"tslib": "^2.4.0",
"typescript": "^4.7.3",
"vite": "^2.9.10"
"prettier": "^3.5.3",
"prettier-plugin-properties": "^0.3.0",
"prettier-plugin-svelte": "^3.4.0",
"pretty-quick": "^4.1.1",
"svelte": "^5.30.1",
"svelte-check": "^4.2.1",
"svelte-preprocess": "^6.0.3",
"tslib": "^2.8.1",
"typescript": "^5.8.3",
"typescript-eslint": "^8.32.1",
"vite": "^6.3.5"
},
"dependencies": {
"@ui5/webcomponents": "^2.2.0",
"@ui5/webcomponents-base": "^2.2.0",
"@ui5/webcomponents-fiori": "^2.2.0",
"@ui5/webcomponents-icons": "^2.2.0"
"@ui5/webcomponents": "^2.10.0",
"@ui5/webcomponents-base": "^2.10.0",
"@ui5/webcomponents-fiori": "^2.10.0",
"@ui5/webcomponents-icons": "^2.10.0"
}
}
Loading