diff --git a/index.js b/index.js index 6e471c9..44f637c 100644 --- a/index.js +++ b/index.js @@ -9,9 +9,9 @@ * @typedef {import('mdast-util-to-markdown/lib/types.js').Handle} ToMarkdownHandle * @typedef {import('mdast-util-to-markdown').State} State * @typedef {import('mdast-util-to-markdown/lib/types.js').Options} ToMarkdownExtension - * @typedef {import('./complex-types').ContainerDirective} ContainerDirective - * @typedef {import('./complex-types').LeafDirective} LeafDirective - * @typedef {import('./complex-types').TextDirective} TextDirective + * @typedef {import('./complex-types.js').ContainerDirective} ContainerDirective + * @typedef {import('./complex-types.js').LeafDirective} LeafDirective + * @typedef {import('./complex-types.js').TextDirective} TextDirective * @typedef {ContainerDirective|LeafDirective|TextDirective} Directive */ @@ -451,7 +451,7 @@ function fence(node) { return ':'.repeat(size) - /** @type {import('unist-util-visit-parents/complex-types').BuildVisitor} */ + /** @type {import('unist-util-visit-parents').BuildVisitor} */ function onvisit(_, parents) { let index = parents.length let nesting = 0 diff --git a/package.json b/package.json index 6d07001..5e74af7 100644 --- a/package.json +++ b/package.json @@ -38,10 +38,10 @@ "dependencies": { "@types/mdast": "^3.0.0", "@types/unist": "^2.0.0", - "mdast-util-to-markdown": "^1.3.0", + "mdast-util-to-markdown": "^1.5.0", "parse-entities": "^4.0.0", "stringify-entities": "^4.0.0", - "unist-util-visit-parents": "^5.0.0" + "unist-util-visit-parents": "^5.1.3" }, "devDependencies": { "@types/tape": "^4.0.0", @@ -51,7 +51,6 @@ "prettier": "^2.0.0", "remark-cli": "^11.0.0", "remark-preset-wooorm": "^9.0.0", - "rimraf": "^3.0.0", "tape": "^5.0.0", "type-coverage": "^2.0.0", "typescript": "^4.0.0", @@ -59,10 +58,10 @@ "xo": "^0.53.0" }, "scripts": { - "build": "rimraf \"{index,test}.d.ts\" && tsc && type-coverage", + "build": "tsc --build --clean && tsc --build && type-coverage", "format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", "test-api": "node --conditions development test.js", - "test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node --conditions development test.js", + "test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api", "test": "npm run build && npm run format && npm run test-coverage" }, "prettier": { diff --git a/tsconfig.json b/tsconfig.json index e31adf8..0e7be28 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,16 +1,16 @@ { "include": ["*.js"], "compilerOptions": { - "target": "ES2020", - "lib": ["ES2020"], - "module": "ES2020", - "moduleResolution": "node", - "allowJs": true, "checkJs": true, "declaration": true, "emitDeclarationOnly": true, - "allowSyntheticDefaultImports": true, + "exactOptionalPropertyTypes": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es2020"], + "module": "node16", + "newLine": "lf", "skipLibCheck": true, - "strict": true + "strict": true, + "target": "es2020" } }