Skip to content

Commit 58a81f0

Browse files
committed
cleanup TypeScript config
1 parent 73c5aed commit 58a81f0

File tree

11 files changed

+110
-86
lines changed

11 files changed

+110
-86
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,5 @@ playground/compiler.js
9696

9797
rewatch/target/
9898
rewatch/rewatch
99+
100+
*.tsbuildinfo

jscomp/gentype_tests/typescript-react-example/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ test:
44
npm install
55
npm run lint
66
npm run build
7-
npm run tsc
7+
npm run typecheck
88
@git diff --quiet src/ \
99
|| { echo; echo "Please review the Gentype outputs too!"; echo; false; } \
1010
|| exit 1

jscomp/gentype_tests/typescript-react-example/package-lock.json

Lines changed: 15 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/gentype_tests/typescript-react-example/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"start": "rescript build -w",
77
"build": "rescript",
88
"clean": "rescript clean",
9-
"tsc": "tsc -p tsconfig.json",
9+
"typecheck": "tsc",
1010
"lint": "biome check src"
1111
},
1212
"dependencies": {
@@ -16,9 +16,9 @@
1616
},
1717
"devDependencies": {
1818
"@biomejs/biome": "1.8.3",
19-
"@types/node": "^18.15.12",
20-
"@types/react-dom": "^18.0.11",
19+
"@types/react": "^18.3.3",
20+
"@types/react-dom": "^18.3.0",
2121
"rescript": "file:../../..",
22-
"typescript": "^5.2.2"
22+
"typescript": "5.5.3"
2323
}
2424
}
Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,19 @@
11
{
22
"compilerOptions": {
3-
"outDir": "build/dist",
4-
"module": "esnext",
5-
"target": "es5",
6-
"lib": ["dom", "dom.iterable", "esnext"],
7-
"sourceMap": true,
8-
"allowJs": true,
3+
"module": "ESNext",
4+
"moduleResolution": "Node",
5+
"lib": ["DOM", "DOM.Iterable", "ESNext"],
96
"jsx": "react-jsx",
10-
"skipLibCheck": true,
11-
"moduleResolution": "node",
12-
"rootDir": ".",
13-
"forceConsistentCasingInFileNames": true,
14-
"noImplicitReturns": true,
15-
"noImplicitThis": true,
16-
"noImplicitAny": true,
17-
"strictNullChecks": true,
18-
"noUnusedLocals": true,
19-
"strictPropertyInitialization": true,
207
"esModuleInterop": true,
218
"allowSyntheticDefaultImports": true,
9+
"allowJs": true,
2210
"strict": true,
23-
"resolveJsonModule": true,
24-
"isolatedModules": true,
11+
"strictNullChecks": true,
12+
"skipLibCheck": true,
2513
"noEmit": true,
26-
"noFallthroughCasesInSwitch": true
14+
"composite": true,
15+
"incremental": true
2716
},
2817
"include": ["src"],
29-
"exclude": [
30-
"node_modules",
31-
"build",
32-
"scripts",
33-
"acceptance-tests",
34-
"webpack",
35-
"jest",
36-
"src/setupTests.ts",
37-
"src/AutoAnnotate.bs.js"
38-
]
18+
"exclude": ["src/setupTests.ts", "src/AutoAnnotate.bs.js"]
3919
}

jscomp/gentype_tests/typescript-react-example/tsconfig.prod.json

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

jscomp/gentype_tests/typescript-react-example/tsconfig.test.json

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

jsconfig.json

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

package-lock.json

Lines changed: 52 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
"version": "12.0.0-alpha.1",
44
"devDependencies": {
55
"@biomejs/biome": "1.8.3",
6+
"@types/node": "^20.14.9",
67
"mocha": "10.1.0",
7-
"nyc": "15.0.0"
8+
"nyc": "15.0.0",
9+
"typescript": "5.5.3"
810
},
911
"engines": {
1012
"node": ">=18"
@@ -24,7 +26,8 @@
2426
"format:all": "biome format --write .",
2527
"checkFormat": "biome format --changed --no-errors-on-unmatched .",
2628
"checkFormat:all": "biome format .",
27-
"coverage": "nyc --timeout=3000 --reporter=html mocha jscomp/test/*test.js && open ./coverage/index.html"
29+
"coverage": "nyc --timeout=3000 --reporter=html mocha jscomp/test/*test.js && open ./coverage/index.html",
30+
"typecheck": "tsc"
2831
},
2932
"description": "ReScript toolchain",
3033
"files": [

tsconfig.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "NodeNext",
5+
"moduleResolution": "NodeNext",
6+
"allowJs": true,
7+
"resolveJsonModule": true,
8+
"strict": true,
9+
"strictNullChecks": true,
10+
"noImplicitAny": true,
11+
"noEmit": true,
12+
"skipLibCheck": true,
13+
"composite": true,
14+
"incremental": true
15+
},
16+
"include": ["./cli/*", "./scripts/*", "./package.json"],
17+
"exclude": [
18+
"node_modules",
19+
"./jscomp/test/**/*",
20+
"./jscomp/gentype_tests/**/*"
21+
]
22+
}

0 commit comments

Comments
 (0)