Skip to content

Commit 510ba68

Browse files
committed
build: better typechecking
1 parent 36ae9dd commit 510ba68

File tree

5 files changed

+19
-24
lines changed

5 files changed

+19
-24
lines changed

example/gauge/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"build": "cross-env DEBUG=false npx rollup -c",
8+
"typecheck": "tsc --noEmit",
89
"dev": "cross-env DEBUG=false npx rollup -c && cross-env DEBUG=true npx rollup -cw",
910
"lint": "eslint . --ext .ts,.tsx"
1011
},
@@ -31,4 +32,4 @@
3132
"@navigraph/msfs-navigation-data-interface": "*",
3233
"navigraph": "1.2.35"
3334
}
34-
}
35+
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"example/*"
66
],
77
"scripts": {
8-
"lint": "bun run --filter \"*\" lint"
8+
"lint": "bun run --filter \"*\" lint",
9+
"typecheck": "bun run --filter \"*\" typecheck"
910
},
1011
"devDependencies": {
1112
"@eslint/js": "^9.23.0",
@@ -20,4 +21,4 @@
2021
"peerDependencies": {
2122
"typescript": "^5.0.0"
2223
}
23-
}
24+
}

src/ts/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
],
2121
"scripts": {
2222
"build": "tsup",
23-
"lint": "eslint . --ext .ts"
23+
"lint": "eslint . --ext .ts",
24+
"typecheck": "tsc --noEmit"
2425
},
2526
"devDependencies": {
2627
"@microsoft/msfs-types": "^1.14.6",

src/ts/tsconfig.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
"resolveJsonModule": true,
88
"declaration": true,
99
"noEmit": true,
10-
"strictNullChecks": true
10+
"strictNullChecks": true,
11+
"skipLibCheck": true,
12+
"noUncheckedIndexedAccess": true,
13+
"noImplicitAny": true
1114
},
12-
"include": ["**/*.ts"],
13-
"exclude": ["**/node_modules"]
15+
"include": ["**/*.ts"]
1416
}

tsconfig.json

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
11
{
22
"compilerOptions": {
3-
// Environment setup & latest features
4-
"lib": [
5-
"ESNext"
6-
],
3+
"lib": ["ESNext"],
74
"target": "ESNext",
85
"module": "ESNext",
9-
"moduleDetection": "force",
10-
"jsx": "react-jsx",
11-
"allowJs": true,
12-
// Bundler mode
13-
"moduleResolution": "bundler",
14-
"allowImportingTsExtensions": true,
15-
"verbatimModuleSyntax": true,
16-
"noEmit": true,
17-
// Best practices
6+
187
"strict": true,
198
"skipLibCheck": true,
209
"noFallthroughCasesInSwitch": true,
2110
"noUncheckedIndexedAccess": true,
22-
// Some stricter flags (disabled by default)
11+
"noImplicitAny": true,
12+
2313
"noUnusedLocals": false,
2414
"noUnusedParameters": false,
25-
"noPropertyAccessFromIndexSignature": false,
26-
},
27-
}
15+
"noPropertyAccessFromIndexSignature": false
16+
}
17+
}

0 commit comments

Comments
 (0)