Skip to content

Commit

Permalink
feat(create-app): update svelte-ts template to use @tsconfig/svelte a… (
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikg committed Jun 3, 2021
1 parent dfab3ed commit 5c3b668
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
8 changes: 6 additions & 2 deletions packages/create-app/template-svelte-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview"
"serve": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.7",
"@tsconfig/svelte": "^2.0.1",
"svelte": "^3.37.0",
"svelte-check": "^2.1.0",
"svelte-preprocess": "^4.7.2",
"tslib": "^2.2.0",
"typescript": "^4.2.4",
"vite": "^2.3.5"
}
}
}
21 changes: 1 addition & 20 deletions packages/create-app/template-svelte-ts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
{
"extends": "@tsconfig/svelte/tsconfig.json",
"compilerOptions": {
"moduleResolution": "node",
"target": "esnext",
"module": "esnext",
/**
* svelte-preprocess cannot figure out whether you have
* a value or a type, so tell TypeScript to enforce using
* `import type` instead of `import` for Types.
*/
"importsNotUsedAsValues": "error",
"isolatedModules": true,
"resolveJsonModule": true,
/**
* To have warnings / errors of the Svelte compiler at the
* correct position, enable source maps by default.
*/
"sourceMap": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
/**
* Typecheck JS in `.svelte` and `.js` files by default.
Expand All @@ -29,9 +14,5 @@
"allowJs": true,
"checkJs": true
},
/**
* Use global.d.ts instead of compilerOptions.types
* to avoid limiting type declarations.
*/
"include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"]
}

0 comments on commit 5c3b668

Please sign in to comment.