Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Commit e081fda

Browse files
committed
Update tsconfig.json
1 parent 6915d98 commit e081fda

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

lib/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,13 @@
3737
import {html, svg, find, hastToReact} from 'property-information'
3838
import {stringify as spaces} from 'space-separated-tokens'
3939
import {stringify as commas} from 'comma-separated-tokens'
40-
import style from 'style-to-object'
40+
// @ts-expect-error: typed incorrectly
41+
import styleToObject from 'style-to-object'
4142
import {webNamespaces} from 'web-namespaces'
4243

44+
/** @type {(value: string, replacer: ((key: string, value: string) => void)) => void} */
45+
const style = styleToObject
46+
4347
const toReact = /** @type {Record<string, string>} */ (hastToReact)
4448

4549
const own = {}.hasOwnProperty

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
"rehype": "^12.0.0",
6464
"remark-cli": "^11.0.0",
6565
"remark-preset-wooorm": "^9.0.0",
66-
"rimraf": "^3.0.0",
6766
"tape": "^5.0.0",
6867
"type-coverage": "^2.0.0",
6968
"typescript": "^4.0.0",
@@ -77,7 +76,7 @@
7776
},
7877
"scripts": {
7978
"prepack": "npm run build && npm run format",
80-
"build": "rimraf \"lib/**/*.d.ts\" \"*.d.ts\" && tsc && type-coverage",
79+
"build": "tsc --build --clean && tsc --build && type-coverage",
8180
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
8281
"test-api": "node --conditions development test.js",
8382
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",

tsconfig.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
2-
"include": ["lib/**/*.js", "*.js"],
2+
"include": ["**/**.js"],
3+
"exclude": ["coverage/", "node_modules/"],
34
"compilerOptions": {
4-
"target": "ES2020",
5-
"lib": ["ES2020"],
6-
"module": "ES2020",
7-
"moduleResolution": "node",
8-
"allowJs": true,
95
"checkJs": true,
106
"declaration": true,
117
"emitDeclarationOnly": true,
12-
"allowSyntheticDefaultImports": true,
8+
"exactOptionalPropertyTypes": true,
9+
"forceConsistentCasingInFileNames": true,
10+
"lib": ["es2020"],
11+
"module": "node16",
12+
"newLine": "lf",
1313
"skipLibCheck": true,
14-
"strict": true
14+
"strict": true,
15+
"target": "es2020"
1516
}
1617
}

0 commit comments

Comments
 (0)