Skip to content

Commit ac01554

Browse files
committed
Update tsconfig.json
1 parent 82bf438 commit ac01554

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* @typedef {Record<string, unknown> & EmbeddedHastFields} Data
2020
* unist data with embedded hast fields.
2121
*
22-
* @typedef {MdastNode & {data?: Data}} NodeWithData
22+
* @typedef {MdastNode & {data?: Data | null | undefined}} NodeWithData
2323
* unist node with embedded hast data.
2424
*
2525
* @typedef PositionLike

package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,17 @@
5555
"prettier": "^2.0.0",
5656
"remark-cli": "^11.0.0",
5757
"remark-preset-wooorm": "^9.0.0",
58-
"rimraf": "^3.0.0",
5958
"tape": "^5.0.0",
6059
"type-coverage": "^2.0.0",
6160
"typescript": "^4.0.0",
6261
"xo": "^0.53.0"
6362
},
6463
"scripts": {
6564
"prepack": "npm run build && npm run format",
66-
"build": "rimraf \"{lib/**/**,test/**}*.d.ts\" \"index.d.ts\" && tsc && type-coverage",
67-
"format": "remark . -qfo && prettier -w . --loglevel warn && xo --fix",
68-
"test-api": "node test/index.js",
69-
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test/index.js",
65+
"build": "tsc --build --clean && tsc --build && type-coverage",
66+
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
67+
"test-api": "node --conditions development test/index.js",
68+
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
7069
"test": "npm run build && npm run format && npm run test-coverage"
7170
},
7271
"prettier": {

tsconfig.json

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
{
2-
"include": ["lib/**/*.js", "test/**/*.js", "index.js"],
2+
"include": ["**/*.js", "complex-types.d.ts"],
3+
"exclude": ["coverage/", "node_modules/"],
34
"compilerOptions": {
4-
"target": "ES2020",
5-
"lib": ["ES2020"],
6-
"module": "Node16",
7-
"allowJs": true,
85
"checkJs": true,
96
"declaration": true,
107
"emitDeclarationOnly": true,
8+
"exactOptionalPropertyTypes": true,
9+
"forceConsistentCasingInFileNames": true,
10+
"lib": ["es2020"],
11+
"module": "node16",
12+
"newLine": "lf",
1113
"skipLibCheck": true,
12-
"strict": true
14+
"strict": true,
15+
"target": "es2020"
1316
}
1417
}

0 commit comments

Comments
 (0)