Skip to content

Commit fda996a

Browse files
committed
Use static tsconfig, add @ts-expect-error for problem files
1 parent 952b936 commit fda996a

File tree

7 files changed

+23
-17
lines changed

7 files changed

+23
-17
lines changed

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default [
88
languageOptions: {
99
parserOptions: {
1010
projectService: false,
11-
project: './tsconfig.eslint.json',
11+
project: './tsconfig.json',
1212
tsconfigRootDir: import.meta.dirname,
1313
},
1414
},

exercises/01.primitive-types/01.problem.numbers-and-strings/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@
1212
// 💰 Use backticks ` and ${variable} syntax
1313

1414
// ✅ These console.logs will verify your work
15+
// @ts-expect-error - 💣 remove this comment
1516
console.log('Price:', price)
17+
// @ts-expect-error - 💣 remove this comment
1618
console.log('Product:', productName)
19+
// @ts-expect-error - 💣 remove this comment
1720
console.log('Quantity:', quantity)
21+
// @ts-expect-error - 💣 remove this comment
1822
console.log('Description:', description)
1923

2024
// 🦺 This line ensures TypeScript treats this as a module

exercises/01.primitive-types/02.problem.booleans-and-comparisons/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ const stockCount: number = 100
1515
// 💰 Use the && operator
1616

1717
// ✅ Verification
18+
// @ts-expect-error - 💣 remove this comment
1819
console.log('Is Available:', isAvailable)
20+
// @ts-expect-error - 💣 remove this comment
1921
console.log('Is On Sale:', isOnSale)
22+
// @ts-expect-error - 💣 remove this comment
2023
console.log('Has Discount:', hasDiscount)
24+
// @ts-expect-error - 💣 remove this comment
2125
console.log('Can Purchase:', canPurchase)
2226

2327
export {}

exercises/02.variables/01.problem.let-and-const/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const laptopPrice = 999.99
2020
// 🐨 Try uncommenting the line below - what happens?
2121
// TAX_RATE = 0.10
2222

23+
// @ts-expect-error - 💣 remove this comment
2324
console.log('Cart subtotal:', cartTotal)
2425
// console.log('Tax:', cartTotal * TAX_RATE)
2526
// console.log('Final total:', finalTotal)

exercises/05.void-and-never/02.problem.never-type/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ type Status = 'pending' | 'success' | 'error'
1616

1717
// 🐨 Complete this function to handle all cases
1818
// The default case should use the never exhaustiveness pattern
19+
// @ts-expect-error - 💣 remove this comment
1920
function getStatusMessage(status: Status): string {
2021
switch (status) {
2122
case 'pending':

tsconfig.eslint.json

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

tsconfig.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
{
2-
"files": [],
3-
"exclude": ["node_modules"],
4-
"references": []
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "ESNext",
5+
"moduleResolution": "bundler",
6+
"esModuleInterop": true,
7+
"strict": true,
8+
"skipLibCheck": true,
9+
"noEmit": true,
10+
"allowImportingTsExtensions": true
11+
},
12+
"include": ["**/*.ts", "**/*.tsx"],
13+
"exclude": ["node_modules", "**/node_modules"]
514
}

0 commit comments

Comments
 (0)