diff options
author | 2022-08-25 16:15:27 -0300 | |
---|---|---|
committer | 2022-08-25 15:15:27 -0400 | |
commit | 77ce6be30c9cb8054ebf69a4943b984eed90152e (patch) | |
tree | 072b174b98172818575cba8da3557336525c3f8a /examples | |
parent | fcc36ac908429733b1d9e51caddbc7590f9eeea5 (diff) | |
download | astro-77ce6be30c9cb8054ebf69a4943b984eed90152e.tar.gz astro-77ce6be30c9cb8054ebf69a4943b984eed90152e.tar.zst astro-77ce6be30c9cb8054ebf69a4943b984eed90152e.zip |
Add template tsconfigs for users to extend from (#4439)
* Add tsconfig templates to extend from
* Add changeset
* Right order for assign parameters
* Add tsconfigs to export map
Diffstat (limited to 'examples')
25 files changed, 28 insertions, 311 deletions
diff --git a/examples/basics/tsconfig.json b/examples/basics/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/basics/tsconfig.json +++ b/examples/basics/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/blog/tsconfig.json b/examples/blog/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/blog/tsconfig.json +++ b/examples/blog/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/docs/tsconfig.json b/examples/docs/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/docs/tsconfig.json +++ b/examples/docs/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/env-vars/tsconfig.json b/examples/env-vars/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/env-vars/tsconfig.json +++ b/examples/env-vars/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/framework-alpine/tsconfig.json b/examples/framework-alpine/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/framework-alpine/tsconfig.json +++ b/examples/framework-alpine/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/framework-lit/tsconfig.json b/examples/framework-lit/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/framework-lit/tsconfig.json +++ b/examples/framework-lit/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/framework-multiple/tsconfig.json b/examples/framework-multiple/tsconfig.json index 8885491e4..2d48ed5fd 100644 --- a/examples/framework-multiple/tsconfig.json +++ b/examples/framework-multiple/tsconfig.json @@ -1,17 +1,7 @@ { + "extends": "astro/tsconfigs/base", "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", // Needed for TypeScript intellisense in the template inside Vue files - "jsx": "preserve", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true + "jsx": "preserve" } } diff --git a/examples/framework-preact/tsconfig.json b/examples/framework-preact/tsconfig.json index 766e72684..bdd1b5a88 100644 --- a/examples/framework-preact/tsconfig.json +++ b/examples/framework-preact/tsconfig.json @@ -1,18 +1,8 @@ { + "extends": "astro/tsconfigs/base", "compilerOptions": { // Preact specific settings "jsx": "react-jsx", - "jsxImportSource": "preact", - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true + "jsxImportSource": "preact" } } diff --git a/examples/framework-react/tsconfig.json b/examples/framework-react/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/framework-react/tsconfig.json +++ b/examples/framework-react/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/framework-solid/tsconfig.json b/examples/framework-solid/tsconfig.json index 807b3fac7..cb2c53c66 100644 --- a/examples/framework-solid/tsconfig.json +++ b/examples/framework-solid/tsconfig.json @@ -1,18 +1,8 @@ { + "extends": "astro/tsconfigs/base", "compilerOptions": { // Solid specific settings "jsx": "preserve", "jsxImportSource": "solid-js", - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true } } diff --git a/examples/framework-svelte/tsconfig.json b/examples/framework-svelte/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/framework-svelte/tsconfig.json +++ b/examples/framework-svelte/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/framework-vue/tsconfig.json b/examples/framework-vue/tsconfig.json index 8885491e4..2d48ed5fd 100644 --- a/examples/framework-vue/tsconfig.json +++ b/examples/framework-vue/tsconfig.json @@ -1,17 +1,7 @@ { + "extends": "astro/tsconfigs/base", "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", // Needed for TypeScript intellisense in the template inside Vue files - "jsx": "preserve", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true + "jsx": "preserve" } } diff --git a/examples/minimal/tsconfig.json b/examples/minimal/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/minimal/tsconfig.json +++ b/examples/minimal/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/non-html-pages/tsconfig.json b/examples/non-html-pages/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/non-html-pages/tsconfig.json +++ b/examples/non-html-pages/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/portfolio/tsconfig.json b/examples/portfolio/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/portfolio/tsconfig.json +++ b/examples/portfolio/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/ssr/tsconfig.json b/examples/ssr/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/ssr/tsconfig.json +++ b/examples/ssr/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/subpath/tsconfig.json b/examples/subpath/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/subpath/tsconfig.json +++ b/examples/subpath/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/with-markdown-plugins/tsconfig.json b/examples/with-markdown-plugins/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/with-markdown-plugins/tsconfig.json +++ b/examples/with-markdown-plugins/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/with-markdown-shiki/tsconfig.json b/examples/with-markdown-shiki/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/with-markdown-shiki/tsconfig.json +++ b/examples/with-markdown-shiki/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/with-mdx/tsconfig.json b/examples/with-mdx/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/with-mdx/tsconfig.json +++ b/examples/with-mdx/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/with-nanostores/tsconfig.json b/examples/with-nanostores/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/with-nanostores/tsconfig.json +++ b/examples/with-nanostores/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/with-tailwindcss/tsconfig.json b/examples/with-tailwindcss/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/with-tailwindcss/tsconfig.json +++ b/examples/with-tailwindcss/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/with-vite-plugin-pwa/tsconfig.json b/examples/with-vite-plugin-pwa/tsconfig.json index e9e9245fd..d78f81ec4 100644 --- a/examples/with-vite-plugin-pwa/tsconfig.json +++ b/examples/with-vite-plugin-pwa/tsconfig.json @@ -1,15 +1,3 @@ { - "compilerOptions": { - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Astro will directly run your TypeScript code, no transpilation needed. - "noEmit": true - } + "extends": "astro/tsconfigs/base" } diff --git a/examples/with-vitest/astro.config.ts b/examples/with-vitest/astro.config.ts index ad7965b1a..882e6515a 100644 --- a/examples/with-vitest/astro.config.ts +++ b/examples/with-vitest/astro.config.ts @@ -1,4 +1,4 @@ import { defineConfig } from 'astro/config'; // https://astro.build/config -export default defineConfig(); +export default defineConfig({}); diff --git a/examples/with-vitest/tsconfig.json b/examples/with-vitest/tsconfig.json index be8e3ea96..d78f81ec4 100644 --- a/examples/with-vitest/tsconfig.json +++ b/examples/with-vitest/tsconfig.json @@ -1,18 +1,3 @@ { - "compilerOptions": { - // Preact specific settings - "jsx": "react-jsx", - "jsxImportSource": "preact", - // Enable top-level await, and other modern ESM features. - "target": "ESNext", - "module": "ESNext", - // Enable node-style module resolution, for things like npm package imports. - "moduleResolution": "node", - // Enable JSON imports. - "resolveJsonModule": true, - // Enable stricter transpilation for better output. - "isolatedModules": true, - // Add type definitions for our Astro runtime. - "types": ["astro/client"] - } + "extends": "astro/tsconfigs/base" } |