Skip to content

Commit e0e7b13

Browse files
committed
Sync with sv create
1 parent 7b92687 commit e0e7b13

File tree

5 files changed

+31
-4
lines changed

5 files changed

+31
-4
lines changed

eslint.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ export default ts.config(
2323
...globals.node,
2424
},
2525
},
26-
rules: { 'no-undef': 'off' },
26+
rules: {
27+
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
28+
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
29+
'no-undef': 'off',
30+
},
2731
},
2832
{
2933
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
"dev": "vite dev",
88
"build": "vite build",
99
"preview": "vite preview",
10-
"test": "pnpm run test:unit && pnpm run test:e2e",
10+
"prepare": "svelte-kit sync || echo ''",
1111
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
1212
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
1313
"lint": "prettier --check . && eslint .",
1414
"format": "prettier --write .",
15+
"test": "npm run test:unit -- --run && npm run test:e2e",
1516
"test:e2e": "playwright test",
1617
"test:unit": "vitest"
1718
},
@@ -61,6 +62,7 @@
6162
"typescript-eslint": "^8.35.1",
6263
"ua-parser-js": "2.0.4",
6364
"vaul-svelte": "1.0.0-next.7",
65+
"vite-plugin-devtools-json": "^0.2.0",
6466
"vite-plugin-mkcert": "^1.17.8",
6567
"vitest": "^3.2.4"
6668
},

pnpm-lock.yaml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"strict": true,
1313
"moduleResolution": "bundler"
1414
}
15-
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
15+
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
16+
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
1617
//
1718
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
1819
// from the referenced tsconfig.json - TypeScript does not merge them in

vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import tailwindcss from '@tailwindcss/vite';
33
import dns from 'dns/promises';
44
import { env } from 'process';
55
import { defineConfig, loadEnv } from 'vite';
6+
import devtoolsJson from 'vite-plugin-devtools-json';
67
import mkcert from 'vite-plugin-mkcert';
78

89
function printColor(message: string, colorCode: string) {
@@ -67,7 +68,7 @@ export default defineConfig(async ({ command, mode, isPreview }) => {
6768
build: {
6869
target: 'es2022',
6970
},
70-
plugins: [...(useLocalRedirect ? [mkcert()] : []), sveltekit(), tailwindcss()],
71+
plugins: [...(useLocalRedirect ? [mkcert()] : []), sveltekit(), tailwindcss(), devtoolsJson()],
7172
server: await getServerConfig(mode, useLocalRedirect),
7273
test: { include: ['src/**/*.{test,spec}.{js,ts}'] },
7374
});

0 commit comments

Comments
 (0)