这是indexloc提供的服务,不要输入任何密码
Skip to content

chore(examples): update with-svelte dependencies #9822

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

Merged
merged 13 commits into from
Jan 27, 2025
Merged
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
13 changes: 0 additions & 13 deletions examples/with-svelte/apps/docs/.eslintignore

This file was deleted.

3 changes: 0 additions & 3 deletions examples/with-svelte/apps/docs/.eslintrc.cjs

This file was deleted.

8 changes: 8 additions & 0 deletions examples/with-svelte/apps/docs/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { config } from '@repo/eslint-config/index.js';

export default [
...config,
{
ignores: ['.svelte-kit/*']
}
];
6 changes: 2 additions & 4 deletions examples/with-svelte/apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"build": "vite build",
"preview": "vite preview",
"test": "npm run test:integration && npm run test:unit",
"check-types": "tsc --noEmit",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "eslint .",
Expand All @@ -18,14 +19,11 @@
"@repo/ui": "workspace:*"
},
"devDependencies": {
"@playwright/test": "^1.49.1",
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"eslint": "^8.57.1",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"svelte": "^4.2.19",
Expand Down
6 changes: 0 additions & 6 deletions examples/with-svelte/apps/docs/tests/test.ts

This file was deleted.

16 changes: 1 addition & 15 deletions examples/with-svelte/apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
"extends": ["@repo/typescript-config/svelte.json", "./.svelte-kit/tsconfig.json"]
}
12 changes: 2 additions & 10 deletions examples/with-svelte/apps/docs/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
import { defineConfig } from 'vite';

export default defineConfig({
plugins: [sveltekit()],
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
},
build: {
commonjsOptions: {
include: [/@repo-ui/, /node_modules/],
},
},
plugins: [sveltekit()]
});
13 changes: 0 additions & 13 deletions examples/with-svelte/apps/web/.eslintignore

This file was deleted.

3 changes: 0 additions & 3 deletions examples/with-svelte/apps/web/.eslintrc.cjs

This file was deleted.

8 changes: 8 additions & 0 deletions examples/with-svelte/apps/web/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { config } from '@repo/eslint-config/index.js';

export default [
...config,
{
ignores: ['.svelte-kit/*']
}
];
6 changes: 2 additions & 4 deletions examples/with-svelte/apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"build": "vite build",
"preview": "vite preview",
"test": "npm run test:integration && npm run test:unit",
"check-types": "tsc --noEmit",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "eslint .",
Expand All @@ -18,14 +19,11 @@
"@repo/ui": "workspace:*"
},
"devDependencies": {
"@playwright/test": "^1.49.1",
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"eslint": "^8.57.1",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"svelte": "^4.2.19",
Expand Down
6 changes: 0 additions & 6 deletions examples/with-svelte/apps/web/tests/test.ts

This file was deleted.

16 changes: 1 addition & 15 deletions examples/with-svelte/apps/web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
"extends": ["@repo/typescript-config/svelte.json", "./.svelte-kit/tsconfig.json"]
}
12 changes: 2 additions & 10 deletions examples/with-svelte/apps/web/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
import { defineConfig } from 'vite';

export default defineConfig({
plugins: [sveltekit()],
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
},
build: {
commonjsOptions: {
include: [/@repo\/ui/, /node_modules/],
},
},
plugins: [sveltekit()]
});
6 changes: 3 additions & 3 deletions examples/with-svelte/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "with-svelte",
"private": true,
"scripts": {
"build": "turbo run build",
Expand All @@ -9,11 +10,10 @@
"devDependencies": {
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"turbo": "^2.3.3"
"turbo": "^2.3.4"
},
"packageManager": "pnpm@8.15.6",
"engines": {
"node": ">=18"
},
"name": "with-svelte"
}
}
31 changes: 0 additions & 31 deletions examples/with-svelte/packages/config-eslint/index.js

This file was deleted.

14 changes: 0 additions & 14 deletions examples/with-svelte/packages/config-eslint/package.json

This file was deleted.

27 changes: 27 additions & 0 deletions examples/with-svelte/packages/eslint-config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import ts from 'typescript-eslint';

export const config = ts.config(
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs['flat/recommended'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
files: ['**/*.svelte'],
ignores: ['.svelte-kit/*'],
languageOptions: {
parserOptions: {
parser: ts.parser
}
}
}
);
17 changes: 17 additions & 0 deletions examples/with-svelte/packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "@repo/eslint-config",
"version": "0.0.0",
"type": "module",
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.19.0",
"eslint-config-prettier": "^10.0.1",
"eslint-config-turbo": "^2.3.4",
"eslint-plugin-svelte": "^2.46.1",
"globals": "^15.14.0",
"typescript-eslint": "^8.22.0"
}
}
10 changes: 10 additions & 0 deletions examples/with-svelte/packages/typescript-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "@repo/typescript-config",
"version": "0.0.0",
"private": true,
"type": "module",
"license": "MIT",
"publishConfig": {
"access": "public"
}
}
13 changes: 13 additions & 0 deletions examples/with-svelte/packages/typescript-config/svelte.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
}
}
3 changes: 0 additions & 3 deletions examples/with-svelte/packages/ui/.eslintrc.cjs

This file was deleted.

3 changes: 3 additions & 0 deletions examples/with-svelte/packages/ui/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { config } from '@repo/eslint-config/index.js';

export default config;
2 changes: 1 addition & 1 deletion examples/with-svelte/packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"svelte": "^4.2.19"
"svelte": "^5.19.3"
}
}
Loading
Loading