Skip to content

Commit 9c1d57e

Browse files
committed
Update tsconfig.json
1 parent fcb7823 commit 9c1d57e

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {h, s} from 'hastscript'
2222
import {zwitch} from 'zwitch'
2323
import {CssSelectorParser} from 'css-selector-parser'
2424

25-
// @ts-expect-error: hush.
2625
const compile = zwitch('type', {handlers: {selectors, ruleSet, rule}})
2726

2827
const parser = new CssSelectorParser()
@@ -47,7 +46,6 @@ export function fromSelector(selector, space) {
4746
}
4847

4948
return (
50-
// @ts-expect-error Assume one element is returned.
5149
compile(parser.parse(selector || ''), config) || build(config.space)('')
5250
)
5351
}
@@ -94,7 +92,6 @@ function rule(query, config) {
9492
}
9593
}
9694

97-
// @ts-expect-error Assume one or more elements is returned.
9895
const node = build(space)(
9996
name,
10097
Object.assign(
@@ -105,7 +102,6 @@ function rule(query, config) {
105102
!query.rule || sibling ? [] : compile(query.rule, {space})
106103
)
107104

108-
// @ts-expect-error Assume one or more elements is returned.
109105
return sibling ? [node, compile(query.rule, {space: parentSpace})] : node
110106
}
111107

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"prettier": "^2.0.0",
4747
"remark-cli": "^11.0.0",
4848
"remark-preset-wooorm": "^9.0.0",
49-
"rimraf": "^3.0.0",
5049
"tape": "^5.0.0",
5150
"type-coverage": "^2.0.0",
5251
"typescript": "^4.0.0",
@@ -55,10 +54,10 @@
5554
},
5655
"scripts": {
5756
"prepack": "npm run build && npm run format",
58-
"build": "rimraf \"*.d.ts\" && tsc && type-coverage",
57+
"build": "tsc --build --clean && tsc --build && type-coverage",
5958
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
60-
"test-api": "node test.js",
61-
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js",
59+
"test-api": "node --conditions development test.js",
60+
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
6261
"test": "npm run format && npm run test-coverage"
6362
},
6463
"prettier": {

tsconfig.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
2-
"include": ["*.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)