From 5e529b7a76ddb8a0394a8d44a8842e95429fa265 Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Sat, 16 Nov 2024 23:07:43 -0500 Subject: [PATCH] chore: use @total-typescript/tsconfig/bundler/dom/app for examples Signed-off-by: Logan McAnsh --- examples/basic/package.json | 1 + examples/basic/tsconfig.json | 12 ++---------- examples/playground/package.json | 1 + examples/playground/tsconfig.json | 15 +++------------ examples/react-router/package.json | 1 + examples/react-router/tsconfig.json | 11 +---------- pnpm-lock.yaml | 15 ++++++++++++--- 7 files changed, 21 insertions(+), 35 deletions(-) diff --git a/examples/basic/package.json b/examples/basic/package.json index 6e0710f4..572b0d95 100644 --- a/examples/basic/package.json +++ b/examples/basic/package.json @@ -29,6 +29,7 @@ "devDependencies": { "@remix-run/dev": "*", "@remix-run/eslint-config": "*", + "@total-typescript/tsconfig": "^1.0.4", "@types/react": "^18.3.11", "@types/react-dom": "^18.3.1", "chokidar": "^4.0.1", diff --git a/examples/basic/tsconfig.json b/examples/basic/tsconfig.json index 28cce918..1102cb76 100644 --- a/examples/basic/tsconfig.json +++ b/examples/basic/tsconfig.json @@ -1,22 +1,14 @@ { "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"], + "extends": "@total-typescript/tsconfig/bundler/dom/app", "compilerOptions": { - "lib": ["DOM", "DOM.Iterable", "ES2022"], - "isolatedModules": true, - "esModuleInterop": true, + "types": ["@react-router/node", "vite/client"], "jsx": "react-jsx", - "moduleResolution": "Bundler", - "resolveJsonModule": true, - "target": "ES2022", - "strict": true, - "allowJs": true, "forceConsistentCasingInFileNames": true, "baseUrl": ".", "paths": { "~/*": ["./app/*"] }, - - // Remix takes care of building everything in `remix build`. "noEmit": true } } diff --git a/examples/playground/package.json b/examples/playground/package.json index 010b0556..ba21265c 100644 --- a/examples/playground/package.json +++ b/examples/playground/package.json @@ -32,6 +32,7 @@ "@remix-run/dev": "*", "@remix-run/eslint-config": "*", "@tailwindcss/vite": "4.0.0-alpha.28", + "@total-typescript/tsconfig": "^1.0.4", "@types/react": "npm:types-react@19.0.0-rc.1", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1", "chokidar": "^4.0.1", diff --git a/examples/playground/tsconfig.json b/examples/playground/tsconfig.json index 5a115b9c..fbb89af5 100644 --- a/examples/playground/tsconfig.json +++ b/examples/playground/tsconfig.json @@ -1,31 +1,22 @@ { + "extends": "@total-typescript/tsconfig/bundler/dom/app", "include": [ "**/*.ts", "**/*.tsx", "**/.server/**/*.ts", "**/.server/**/*.tsx", "**/.client/**/*.ts", - "**/.client/**/*.tsx" + "**/.client/**/*.tsx", + ".react-router/types/**/*" ], "compilerOptions": { - "lib": ["DOM", "DOM.Iterable", "ES2022"], "types": ["@remix-run/node", "vite/client"], - "isolatedModules": true, - "esModuleInterop": true, "jsx": "react-jsx", - "moduleResolution": "Bundler", - "resolveJsonModule": true, - "target": "ES2022", - "skipLibCheck": true, - "strict": true, - "allowJs": true, "forceConsistentCasingInFileNames": true, "baseUrl": ".", "paths": { "~/*": ["./app/*"] }, - - // Remix takes care of building everything in `remix build`. "noEmit": true } } diff --git a/examples/react-router/package.json b/examples/react-router/package.json index c8f04916..afcede09 100644 --- a/examples/react-router/package.json +++ b/examples/react-router/package.json @@ -25,6 +25,7 @@ }, "devDependencies": { "@react-router/dev": "7.0.0-pre.4", + "@total-typescript/tsconfig": "^1.0.4", "@types/react": "^18.3.9", "@types/react-dom": "^18.3.0", "autoprefixer": "^10.4.20", diff --git a/examples/react-router/tsconfig.json b/examples/react-router/tsconfig.json index 29b23163..51f4efc8 100644 --- a/examples/react-router/tsconfig.json +++ b/examples/react-router/tsconfig.json @@ -1,4 +1,5 @@ { + "extends": "@total-typescript/tsconfig/bundler/dom/app", "include": [ "**/*.ts", "**/*.tsx", @@ -9,18 +10,8 @@ ".react-router/types/**/*" ], "compilerOptions": { - "lib": ["DOM", "DOM.Iterable", "ES2022"], "types": ["@react-router/node", "vite/client"], - "isolatedModules": true, - "esModuleInterop": true, "jsx": "react-jsx", - "module": "ESNext", - "moduleResolution": "Bundler", - "resolveJsonModule": true, - "target": "ES2022", - "strict": true, - "allowJs": true, - "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "baseUrl": ".", "paths": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c19a0e7e..350a47f3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -131,6 +131,9 @@ importers: '@remix-run/eslint-config': specifier: '*' version: 2.9.0(eslint@8.57.0)(react@18.3.1)(typescript@5.6.3) + '@total-typescript/tsconfig': + specifier: ^1.0.4 + version: 1.0.4 '@types/react': specifier: ^18.3.11 version: 18.3.11 @@ -198,6 +201,9 @@ importers: '@tailwindcss/vite': specifier: 4.0.0-alpha.28 version: 4.0.0-alpha.28(vite@5.4.9(@types/node@22.7.7)(lightningcss@1.26.0)) + '@total-typescript/tsconfig': + specifier: ^1.0.4 + version: 1.0.4 '@types/react': specifier: npm:types-react@19.0.0-rc.1 version: types-react@19.0.0-rc.1 @@ -280,6 +286,9 @@ importers: '@react-router/dev': specifier: 7.0.0-pre.4 version: 7.0.0-pre.4(@react-router/serve@7.0.0-pre.4(react-router@7.0.0-pre.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.6.3))(@types/node@22.7.7)(lightningcss@1.26.0)(react-router@7.0.0-pre.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.7)(lightningcss@1.26.0)) + '@total-typescript/tsconfig': + specifier: ^1.0.4 + version: 1.0.4 '@types/react': specifier: ^18.3.9 version: 18.3.11 @@ -8211,7 +8220,7 @@ snapshots: eslint: 8.57.0 eslint-import-resolver-node: 0.3.7 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jest: 26.9.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)(typescript@5.6.3) eslint-plugin-jest-dom: 4.0.3(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) @@ -10129,7 +10138,7 @@ snapshots: enhanced-resolve: 5.17.1 eslint: 8.57.0 eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.8.1 is-core-module: 2.15.1 @@ -10254,7 +10263,7 @@ snapshots: eslint-utils: 2.1.0 regexpp: 3.2.0 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5