Skip to content

Commit c78b3c5

Browse files
committed
Add basic tsconfig.json setup
1 parent 0898758 commit c78b3c5

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.DS_Store
2+
*.d.ts.map
3+
*.d.ts
24
*.log
35
build/
46
data/

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@
9090
"stylelint-config-standard": "^36.0.0",
9191
"to-vfile": "^8.0.0",
9292
"trough": "^2.0.0",
93+
"type-coverage": "^2.0.0",
94+
"typescript": "^5.0.0",
9395
"unified": "^11.0.0",
9496
"unist-util-visit": "^5.0.0",
9597
"vfile-matter": "^5.0.0",
@@ -99,6 +101,7 @@
99101
"xo": "^0.58.0"
100102
},
101103
"scripts": {
104+
"build": "tsc --build --clean && tsc --build && type-coverage",
102105
"start": "budo --dir build",
103106
"format": "remark . -qo && prettier . -w --log-level warn && stylelint \"**/*.css\" --fix && xo --fix",
104107
"crawl:sponsors": "mkdir -p data; node crawl/sponsors",

tsconfig.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"compilerOptions": {
3+
"checkJs": true,
4+
"customConditions": ["development"],
5+
"declaration": true,
6+
"declarationMap": true,
7+
"emitDeclarationOnly": true,
8+
// To do: uncomment.
9+
// "exactOptionalPropertyTypes": true,
10+
// To do: no `dom`.
11+
"lib": ["dom", "es2022"],
12+
"module": "node16",
13+
// To do: remove.
14+
"skipLibCheck": true,
15+
// To do: uncomment.
16+
// "strict": true,
17+
"target": "es2022"
18+
},
19+
"exclude": ["coverage/", "node_modules/"],
20+
"include": ["**/*.js"]
21+
}

0 commit comments

Comments
 (0)