Skip to content

Commit 6e2ae7e

Browse files
authored
Merge pull request #127 from canonical/chore/tsconfig_extend
use ds25 provided TS configuration and extend from it
2 parents c369a7a + 2ac85ba commit 6e2ae7e

File tree

5 files changed

+1144
-2218
lines changed

5 files changed

+1144
-2218
lines changed

auto-imports.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// @ts-nocheck
44
// noinspection JSUnusedGlobalSymbols
55
// Generated by unplugin-auto-import
6+
// biome-ignore lint: disable
67
export {}
78
declare global {
89
const Link: typeof import('react-router-dom')['Link']

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"zustand": "4.5.6"
2929
},
3030
"devDependencies": {
31+
"@canonical/typescript-config-react": "0.4.0-experimental.0",
3132
"@playwright/test": "1.50.1",
3233
"@testing-library/jest-dom": "5.16.5",
3334
"@testing-library/react": "14.0.0",
@@ -82,4 +83,4 @@
8283
"optionalDependencies": {
8384
"@rollup/rollup-linux-x64-gnu": "4.34.1"
8485
}
85-
}
86+
}

static/client/main.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe("main", () => {
1111
});
1212

1313
it("renders the app in the root element", async () => {
14-
await act(() => import("./main"));
14+
await act(() => import("./main.js"));
1515
const container = document.getElementById("root") as HTMLElement;
1616
await waitFor(() => expect(container.querySelector(".l-application")).toBeInTheDocument());
1717
});

tsconfig.json

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,10 @@
22
"compilerOptions": {
33
"baseUrl": "static/client",
44
"paths": { "@/*": ["./*"] },
5-
"target": "ESNext",
6-
"useDefineForClassFields": true,
7-
"lib": ["DOM", "DOM.Iterable", "ESNext"],
8-
"allowJs": false,
9-
"skipLibCheck": true,
10-
"esModuleInterop": false,
11-
"allowSyntheticDefaultImports": true,
12-
"strict": true,
13-
"forceConsistentCasingInFileNames": true,
14-
"module": "ESNext",
15-
"moduleResolution": "Node",
16-
"resolveJsonModule": true,
17-
"isolatedModules": true,
185
"noEmit": true,
19-
"jsx": "react-jsx"
6+
"skipLibCheck": true
207
},
8+
"extends": "@canonical/typescript-config-react",
219
"include": ["static/client"],
2210
"exclude": ["dist", "public", "node_modules"],
2311
"references": [{ "path": "./tsconfig.node.json" }]

0 commit comments

Comments
 (0)