Skip to content

Commit 1be88c6

Browse files
chore(examples): update with-svelte dependencies (#9822)
### Description Updating `with-svelte` dependencies and aligning source code. One note is that yes, I am dropping the tests on purpose in the interest of keeping things minimal. ### How to test npx create-turbo@latest -e https://github.com/vercel/turborepo/tree/update-svelte-dependencies/examples/with-svelte --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 80a9d6f commit 1be88c6

26 files changed

+1979
-1931
lines changed

examples/with-svelte/apps/docs/.eslintignore

-13
This file was deleted.

examples/with-svelte/apps/docs/.eslintrc.cjs

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { config } from '@repo/eslint-config/index.js';
2+
3+
export default [
4+
...config,
5+
{
6+
ignores: ['.svelte-kit/*']
7+
}
8+
];

examples/with-svelte/apps/docs/package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"build": "vite build",
99
"preview": "vite preview",
1010
"test": "npm run test:integration && npm run test:unit",
11+
"check-types": "tsc --noEmit",
1112
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
1213
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
1314
"lint": "eslint .",
@@ -18,14 +19,11 @@
1819
"@repo/ui": "workspace:*"
1920
},
2021
"devDependencies": {
21-
"@playwright/test": "^1.49.1",
2222
"@repo/eslint-config": "workspace:*",
23+
"@repo/typescript-config": "workspace:*",
2324
"@sveltejs/adapter-auto": "^3.3.1",
2425
"@sveltejs/kit": "^2.16.0",
2526
"@sveltejs/vite-plugin-svelte": "^3.1.2",
26-
"@typescript-eslint/eslint-plugin": "^7.18.0",
27-
"@typescript-eslint/parser": "^7.18.0",
28-
"eslint": "^8.57.1",
2927
"prettier": "^3.4.2",
3028
"prettier-plugin-svelte": "^3.3.3",
3129
"svelte": "^4.2.19",

examples/with-svelte/apps/docs/tests/test.ts

-6
This file was deleted.
+1-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
11
{
2-
"extends": "./.svelte-kit/tsconfig.json",
3-
"compilerOptions": {
4-
"allowJs": true,
5-
"checkJs": true,
6-
"esModuleInterop": true,
7-
"forceConsistentCasingInFileNames": true,
8-
"resolveJsonModule": true,
9-
"skipLibCheck": true,
10-
"sourceMap": true,
11-
"strict": true
12-
}
13-
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
14-
//
15-
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
16-
// from the referenced tsconfig.json - TypeScript does not merge them in
2+
"extends": ["@repo/typescript-config/svelte.json", "./.svelte-kit/tsconfig.json"]
173
}
+2-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
import { sveltekit } from '@sveltejs/kit/vite';
2-
import { defineConfig } from 'vitest/config';
2+
import { defineConfig } from 'vite';
33

44
export default defineConfig({
5-
plugins: [sveltekit()],
6-
test: {
7-
include: ['src/**/*.{test,spec}.{js,ts}']
8-
},
9-
build: {
10-
commonjsOptions: {
11-
include: [/@repo-ui/, /node_modules/],
12-
},
13-
},
5+
plugins: [sveltekit()]
146
});

examples/with-svelte/apps/web/.eslintignore

-13
This file was deleted.

examples/with-svelte/apps/web/.eslintrc.cjs

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { config } from '@repo/eslint-config/index.js';
2+
3+
export default [
4+
...config,
5+
{
6+
ignores: ['.svelte-kit/*']
7+
}
8+
];

examples/with-svelte/apps/web/package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"build": "vite build",
99
"preview": "vite preview",
1010
"test": "npm run test:integration && npm run test:unit",
11+
"check-types": "tsc --noEmit",
1112
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
1213
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
1314
"lint": "eslint .",
@@ -18,14 +19,11 @@
1819
"@repo/ui": "workspace:*"
1920
},
2021
"devDependencies": {
21-
"@playwright/test": "^1.49.1",
2222
"@repo/eslint-config": "workspace:*",
23+
"@repo/typescript-config": "workspace:*",
2324
"@sveltejs/adapter-auto": "^3.3.1",
2425
"@sveltejs/kit": "^2.16.0",
2526
"@sveltejs/vite-plugin-svelte": "^3.1.2",
26-
"@typescript-eslint/eslint-plugin": "^7.18.0",
27-
"@typescript-eslint/parser": "^7.18.0",
28-
"eslint": "^8.57.1",
2927
"prettier": "^3.4.2",
3028
"prettier-plugin-svelte": "^3.3.3",
3129
"svelte": "^4.2.19",

examples/with-svelte/apps/web/tests/test.ts

-6
This file was deleted.
+1-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
11
{
2-
"extends": "./.svelte-kit/tsconfig.json",
3-
"compilerOptions": {
4-
"allowJs": true,
5-
"checkJs": true,
6-
"esModuleInterop": true,
7-
"forceConsistentCasingInFileNames": true,
8-
"resolveJsonModule": true,
9-
"skipLibCheck": true,
10-
"sourceMap": true,
11-
"strict": true
12-
}
13-
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
14-
//
15-
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
16-
// from the referenced tsconfig.json - TypeScript does not merge them in
2+
"extends": ["@repo/typescript-config/svelte.json", "./.svelte-kit/tsconfig.json"]
173
}
+2-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
import { sveltekit } from '@sveltejs/kit/vite';
2-
import { defineConfig } from 'vitest/config';
2+
import { defineConfig } from 'vite';
33

44
export default defineConfig({
5-
plugins: [sveltekit()],
6-
test: {
7-
include: ['src/**/*.{test,spec}.{js,ts}']
8-
},
9-
build: {
10-
commonjsOptions: {
11-
include: [/@repo\/ui/, /node_modules/],
12-
},
13-
},
5+
plugins: [sveltekit()]
146
});

examples/with-svelte/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"name": "with-svelte",
23
"private": true,
34
"scripts": {
45
"build": "turbo run build",
@@ -9,11 +10,10 @@
910
"devDependencies": {
1011
"prettier": "^3.4.2",
1112
"prettier-plugin-svelte": "^3.3.3",
12-
"turbo": "^2.3.3"
13+
"turbo": "^2.3.4"
1314
},
1415
"packageManager": "[email protected]",
1516
"engines": {
1617
"node": ">=18"
17-
},
18-
"name": "with-svelte"
18+
}
1919
}

examples/with-svelte/packages/config-eslint/index.js

-31
This file was deleted.

examples/with-svelte/packages/config-eslint/package.json

-14
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import js from '@eslint/js';
2+
import svelte from 'eslint-plugin-svelte';
3+
import globals from 'globals';
4+
import ts from 'typescript-eslint';
5+
6+
export const config = ts.config(
7+
js.configs.recommended,
8+
...ts.configs.recommended,
9+
...svelte.configs['flat/recommended'],
10+
{
11+
languageOptions: {
12+
globals: {
13+
...globals.browser,
14+
...globals.node
15+
}
16+
}
17+
},
18+
{
19+
files: ['**/*.svelte'],
20+
ignores: ['.svelte-kit/*'],
21+
languageOptions: {
22+
parserOptions: {
23+
parser: ts.parser
24+
}
25+
}
26+
}
27+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "@repo/eslint-config",
3+
"version": "0.0.0",
4+
"type": "module",
5+
"publishConfig": {
6+
"access": "public"
7+
},
8+
"devDependencies": {
9+
"@eslint/eslintrc": "^3.2.0",
10+
"@eslint/js": "^9.19.0",
11+
"eslint-config-prettier": "^10.0.1",
12+
"eslint-config-turbo": "^2.3.4",
13+
"eslint-plugin-svelte": "^2.46.1",
14+
"globals": "^15.14.0",
15+
"typescript-eslint": "^8.22.0"
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "@repo/typescript-config",
3+
"version": "0.0.0",
4+
"private": true,
5+
"type": "module",
6+
"license": "MIT",
7+
"publishConfig": {
8+
"access": "public"
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compilerOptions": {
3+
"allowJs": true,
4+
"checkJs": true,
5+
"esModuleInterop": true,
6+
"forceConsistentCasingInFileNames": true,
7+
"resolveJsonModule": true,
8+
"skipLibCheck": true,
9+
"sourceMap": true,
10+
"strict": true,
11+
"moduleResolution": "bundler"
12+
}
13+
}

examples/with-svelte/packages/ui/.eslintrc.cjs

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { config } from '@repo/eslint-config/index.js';
2+
3+
export default config;

examples/with-svelte/packages/ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
},
1616
"devDependencies": {
1717
"@repo/eslint-config": "workspace:*",
18-
"svelte": "^4.2.19"
18+
"svelte": "^5.19.3"
1919
}
2020
}

0 commit comments

Comments
 (0)