Skip to content

Commit

Permalink
Add template tsconfigs for users to extend from (#4439)
Browse files Browse the repository at this point in the history
* Add tsconfig templates to extend from

* Add changeset

* Right order for assign parameters

* Add tsconfigs to export map
  • Loading branch information
Princesseuh committed Aug 25, 2022
1 parent fcc36ac commit 77ce6be
Show file tree
Hide file tree
Showing 33 changed files with 119 additions and 343 deletions.
6 changes: 6 additions & 0 deletions .changeset/healthy-kangaroos-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'astro': patch
'create-astro': patch
---

Add tsconfig templates for users to extend from
14 changes: 1 addition & 13 deletions examples/basics/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 1 addition & 13 deletions examples/blog/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 1 addition & 13 deletions examples/docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 1 addition & 13 deletions examples/env-vars/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 1 addition & 13 deletions examples/framework-alpine/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 1 addition & 13 deletions examples/framework-lit/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 2 additions & 12 deletions examples/framework-multiple/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
14 changes: 2 additions & 12 deletions examples/framework-preact/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
14 changes: 1 addition & 13 deletions examples/framework-react/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
12 changes: 1 addition & 11 deletions examples/framework-solid/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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
}
}
14 changes: 1 addition & 13 deletions examples/framework-svelte/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 2 additions & 12 deletions examples/framework-vue/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
14 changes: 1 addition & 13 deletions examples/minimal/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 1 addition & 13 deletions examples/non-html-pages/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 1 addition & 13 deletions examples/portfolio/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 1 addition & 13 deletions examples/ssr/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 1 addition & 13 deletions examples/subpath/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 1 addition & 13 deletions examples/with-markdown-plugins/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 1 addition & 13 deletions examples/with-markdown-shiki/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 1 addition & 13 deletions examples/with-mdx/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 1 addition & 13 deletions examples/with-nanostores/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 1 addition & 13 deletions examples/with-tailwindcss/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit 77ce6be

Please sign in to comment.