Skip to content

Commit 1f748e7

Browse files
danmactoughclaude
andcommitted
Add tsconfig.json to fix VSCode TypeScript errors
Without a tsconfig.json VSCode defaulted to ESM module mode, making import X = require() invalid. Explicit module: commonjs aligns VSCode with the typecheck script, which is simplified to just tsc. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 29daf6e commit 1f748e7

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
},
5858
"scripts": {
5959
"lint": "eslint .",
60-
"typecheck": "tsc --noEmit --strict test/types.ts --lib es6 --module commonjs",
60+
"typecheck": "tsc",
6161
"pretest": "npm run lint && npm run typecheck",
6262
"test": "mocha",
6363
"version": "git changelog ; git add History.md"

tsconfig.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"compilerOptions": {
3+
"noEmit": true,
4+
"strict": true,
5+
"module": "commonjs",
6+
"lib": ["es6"]
7+
},
8+
"files": [
9+
"test/types.ts"
10+
]
11+
}

0 commit comments

Comments
 (0)