Upgrade SvelteKit

This commit is contained in:
Emmanuel 2023-05-19 14:26:43 +02:00
parent 4d12eab0c3
commit 84eec84be5
6 changed files with 966 additions and 567 deletions

View file

@ -7,18 +7,24 @@ module.exports = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:svelte/recommended",
"prettier",
],
ignorePatterns: ["*.cjs"],
overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }],
overrides: [
{
files: ["*.svelte"],
parser: "svelte-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
},
},
],
parser: "@typescript-eslint/parser",
parserOptions: {
sourceType: "module",
ecmaVersion: 2020,
extraFileExtensions: [".svelte"],
sourceType: "module",
},
plugins: ["svelte3", "@typescript-eslint"],
plugins: ["@typescript-eslint"],
root: true,
settings: {
"svelte3/typescript": () => require("typescript"),
},
}

1
.npmrc
View file

@ -1 +1,2 @@
engine-strict=true
resolution-mode=highest

1483
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -64,7 +64,7 @@
"dotenv": "^16.0.1",
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-svelte3": "^4.0.0",
"eslint-plugin-svelte": "^2.28.0",
"fast-xml-parser": "^4.0.9",
"fs-extra": "^11.1.0",
"he": "^1.2.0",
@ -77,7 +77,7 @@
"postgres": "^3.2.4",
"prettier": "^2.6.2",
"prettier-plugin-svelte": "^2.7.0",
"prettier-plugin-tailwindcss": "^0.2.2",
"prettier-plugin-tailwindcss": "^0.3.0",
"sade": "^1.8.1",
"svelte-check": "^3.0.3",
"svelte2tsx": "^0.6.0",
@ -89,7 +89,7 @@
"zx": "^7.1.1"
},
"peerDependencies": {
"@sveltejs/kit": "^1.15.5",
"@sveltejs/kit": "^1.18.0",
"svelte": "^3.56.0"
}
}

15
src/app.d.ts vendored
View file

@ -1,9 +1,12 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
// and what to do when importing types
declare namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}
}
export {}

View file

@ -1,6 +1,6 @@
import { sveltekit } from "@sveltejs/kit/vite"
import morgan from "morgan"
import type { UserConfig } from "vite"
import { defineConfig } from "vite"
const middlewaresPlugin = {
name: "tricoteuses-middlewares",
@ -9,8 +9,6 @@ const middlewaresPlugin = {
},
}
const config: UserConfig = {
export default defineConfig({
plugins: [sveltekit(), middlewaresPlugin],
}
export default config
})