Skip to content

Commit 85d1e6d

Browse files
committed
02/04: add solution, proper ts configs
1 parent 34e0710 commit 85d1e6d

39 files changed

+450
-110
lines changed
Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
11
{
2+
"extends": "./tsconfig.base.json",
23
"compilerOptions": {
34
"target": "ES2020",
4-
"useDefineForClassFields": true,
5-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
6-
"module": "ESNext",
7-
"skipLibCheck": true,
8-
9-
/* Bundler mode */
10-
"moduleResolution": "bundler",
11-
"allowImportingTsExtensions": true,
12-
"isolatedModules": true,
13-
"moduleDetection": "force",
14-
"noEmit": true,
15-
"jsx": "react-jsx",
16-
"verbatimModuleSyntax": true,
17-
18-
/* Linting */
19-
"strict": true,
20-
"noUnusedLocals": true,
21-
"noUnusedParameters": true,
22-
"noFallthroughCasesInSwitch": true,
23-
"noUncheckedSideEffectImports": true
5+
"module": "ESNext"
246
},
25-
"include": ["src"]
7+
"include": ["src"],
8+
"exclude": ["**/*.test.ts*"]
269
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"compilerOptions": {
3+
"useDefineForClassFields": true,
4+
"skipLibCheck": true,
5+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
6+
7+
/* Bundler mode */
8+
"moduleResolution": "bundler",
9+
"allowImportingTsExtensions": true,
10+
"isolatedModules": true,
11+
"moduleDetection": "force",
12+
"noEmit": true,
13+
"jsx": "react-jsx",
14+
"verbatimModuleSyntax": true,
15+
16+
/* Linting */
17+
"strict": true,
18+
"noUnusedLocals": true,
19+
"noUnusedParameters": true,
20+
"noFallthroughCasesInSwitch": true,
21+
"noUncheckedSideEffectImports": true
22+
}
23+
}

exercises/01.sunsetting-jsdom/01.problem.break-jsdom/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"files": [],
33
"references": [
44
{ "path": "./tsconfig.app.json" },
5-
{ "path": "./tsconfig.node.json" }
5+
{ "path": "./tsconfig.node.json" },
6+
{ "path": "./tsconfig.test.json" }
67
]
78
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"include": ["vite.config.ts", "**/*.test.ts*"],
4+
"compilerOptions": {
5+
"target": "esnext",
6+
"module": "preserve",
7+
"types": ["@vitest/browser/providers/playwright"]
8+
}
9+
}
Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
11
{
2+
"extends": "./tsconfig.base.json",
23
"compilerOptions": {
34
"target": "ES2020",
4-
"useDefineForClassFields": true,
5-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
6-
"module": "ESNext",
7-
"skipLibCheck": true,
8-
9-
/* Bundler mode */
10-
"moduleResolution": "bundler",
11-
"allowImportingTsExtensions": true,
12-
"isolatedModules": true,
13-
"moduleDetection": "force",
14-
"noEmit": true,
15-
"jsx": "react-jsx",
16-
"verbatimModuleSyntax": true,
17-
18-
/* Linting */
19-
"strict": true,
20-
"noUnusedLocals": true,
21-
"noUnusedParameters": true,
22-
"noFallthroughCasesInSwitch": true,
23-
"noUncheckedSideEffectImports": true
5+
"module": "ESNext"
246
},
25-
"include": ["src"]
7+
"include": ["src"],
8+
"exclude": ["**/*.test.ts*"]
269
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"compilerOptions": {
3+
"useDefineForClassFields": true,
4+
"skipLibCheck": true,
5+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
6+
7+
/* Bundler mode */
8+
"moduleResolution": "bundler",
9+
"allowImportingTsExtensions": true,
10+
"isolatedModules": true,
11+
"moduleDetection": "force",
12+
"noEmit": true,
13+
"jsx": "react-jsx",
14+
"verbatimModuleSyntax": true,
15+
16+
/* Linting */
17+
"strict": true,
18+
"noUnusedLocals": true,
19+
"noUnusedParameters": true,
20+
"noFallthroughCasesInSwitch": true,
21+
"noUncheckedSideEffectImports": true
22+
}
23+
}

exercises/01.sunsetting-jsdom/01.solution.break-jsdom/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"files": [],
33
"references": [
44
{ "path": "./tsconfig.app.json" },
5-
{ "path": "./tsconfig.node.json" }
5+
{ "path": "./tsconfig.node.json" },
6+
{ "path": "./tsconfig.test.json" }
67
]
78
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"include": ["vite.config.ts", "**/*.test.ts*"],
4+
"compilerOptions": {
5+
"target": "esnext",
6+
"module": "preserve",
7+
"types": ["@vitest/browser/providers/playwright"]
8+
}
9+
}
Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
11
{
2+
"extends": "./tsconfig.base.json",
23
"compilerOptions": {
34
"target": "ES2020",
4-
"useDefineForClassFields": true,
5-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
6-
"module": "ESNext",
7-
"skipLibCheck": true,
8-
9-
/* Bundler mode */
10-
"moduleResolution": "bundler",
11-
"allowImportingTsExtensions": true,
12-
"isolatedModules": true,
13-
"moduleDetection": "force",
14-
"noEmit": true,
15-
"jsx": "react-jsx",
16-
"verbatimModuleSyntax": true,
17-
18-
/* Linting */
19-
"strict": true,
20-
"noUnusedLocals": true,
21-
"noUnusedParameters": true,
22-
"noFallthroughCasesInSwitch": true,
23-
"noUncheckedSideEffectImports": true
5+
"module": "ESNext"
246
},
25-
"include": ["src"]
7+
"include": ["src"],
8+
"exclude": ["**/*.test.ts*"]
269
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"compilerOptions": {
3+
"useDefineForClassFields": true,
4+
"skipLibCheck": true,
5+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
6+
7+
/* Bundler mode */
8+
"moduleResolution": "bundler",
9+
"allowImportingTsExtensions": true,
10+
"isolatedModules": true,
11+
"moduleDetection": "force",
12+
"noEmit": true,
13+
"jsx": "react-jsx",
14+
"verbatimModuleSyntax": true,
15+
16+
/* Linting */
17+
"strict": true,
18+
"noUnusedLocals": true,
19+
"noUnusedParameters": true,
20+
"noFallthroughCasesInSwitch": true,
21+
"noUncheckedSideEffectImports": true
22+
}
23+
}

0 commit comments

Comments
 (0)