Skip to content

Commit 360d3d6

Browse files
authored
Merge pull request #4 from TanStack/ArnaudBarre/main
fix: tsconfig updates
2 parents ee5074a + ecf1306 commit 360d3d6

File tree

8 files changed

+27
-23
lines changed

8 files changed

+27
-23
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ async function createApp(projectName: string, options: Required<Options>) {
236236

237237
// Setup tsconfig
238238
if (options.typescript) {
239-
await copyFiles(templateDirBase, ['./tsconfig.json', './tsconfig.dev.json'])
239+
await copyFiles(templateDirBase, ['./tsconfig.json'])
240240
}
241241

242242
// Setup the package.json file, optionally with typescript and tailwind

templates/base/README.md.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ With this set up you should be able to navigate to `/about` and see the about pa
6161
Of course you don't need to implement the About page in the `main.<%= jsx %>` file. You can create that component in another file and import it into the `main.<%= jsx %>` file, then use it in the `component` property of the `createRoute` call, like so:
6262
6363
```tsx
64-
import About from "./components/About";
64+
import About from "./components/About.<%= jsx %>";
6565
6666
const aboutRoute = createRoute({
6767
getParentRoute: () => rootRoute,
@@ -298,7 +298,7 @@ import { RouterProvider, createRouter } from "@tanstack/react-router";
298298
import { routeTree } from "./routeTree.gen";
299299
300300
import "./styles.css";
301-
import reportWebVitals from "./reportWebVitals";
301+
import reportWebVitals from "./reportWebVitals.<%= js %>";
302302
303303
// Create a new router instance
304304
const router = createRouter({ routeTree });

templates/base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "module",
55
"scripts": {
66
"start": "vite --port 3000",
7-
"build": "vite build && tsc --noEmit",
7+
"build": "vite build && tsc",
88
"serve": "vite preview",
99
"test": "vitest run"
1010
},

templates/base/src/App.test.tsx.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, expect, test } from "vitest";
22
import { render, screen } from "@testing-library/react";
3-
import App from "./App";
3+
import App from "./App.<%= jsx %>";
44

55
describe("App", () => {
66
test("renders", () => {

templates/base/tsconfig.dev.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

templates/base/tsconfig.json

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
{
2+
"include": ["**/*.ts", "**/*.tsx"],
23
"compilerOptions": {
3-
"strict": true,
4-
"types": ["vite/client", "node"],
5-
"esModuleInterop": true,
4+
"target": "ES2022",
65
"jsx": "react-jsx",
7-
"lib": ["DOM", "DOM.Iterable", "ES2022"],
8-
"skipLibCheck": true
6+
"module": "ESNext",
7+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
8+
"types": ["vite/client"],
9+
10+
/* Bundler mode */
11+
"moduleResolution": "bundler",
12+
"allowImportingTsExtensions": true,
13+
"verbatimModuleSyntax": true,
14+
"noEmit": true,
15+
16+
/* Linting */
17+
"skipLibCheck": true,
18+
"strict": true,
19+
"noUnusedLocals": true,
20+
"noUnusedParameters": true,
21+
"noFallthroughCasesInSwitch": true,
22+
"noUncheckedSideEffectImports": true
923
}
1024
}

templates/code-router/src/main.tsx.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import {
1010
import { TanStackRouterDevtools } from "@tanstack/router-devtools";
1111

1212
import "./styles.css";
13-
import reportWebVitals from "./reportWebVitals";
13+
import reportWebVitals from "./reportWebVitals.<%= js %>";
1414

15-
import App from "./App";
15+
import App from "./App.<%= jsx %>";
1616

1717
const rootRoute = createRootRoute({
1818
component: () => (

templates/file-router/src/main.tsx.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { RouterProvider, createRouter } from "@tanstack/react-router";
66
import { routeTree } from "./routeTree.gen";
77

88
import "./styles.css";
9-
import reportWebVitals from "./reportWebVitals";
9+
import reportWebVitals from "./reportWebVitals.<%= js %>";
1010

1111
// Create a new router instance
1212
const router = createRouter({ routeTree });

0 commit comments

Comments
 (0)