From 223bf9869579c73639dc3b6722c274267c28a376 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 26 Jan 2023 14:26:23 +0100 Subject: [PATCH] Update `tsconfig.json` --- package.json | 6 +++--- tsconfig.json | 17 +++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index f49837f..08f35e5 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,6 @@ "rehype-stringify": "^9.0.0", "remark-cli": "^11.0.0", "remark-preset-wooorm": "^9.0.0", - "rimraf": "^3.0.0", "tape": "^5.0.0", "terser": "^5.0.0", "type-coverage": "^2.0.0", @@ -78,10 +77,11 @@ "xo": "^0.53.0" }, "scripts": { - "build": "rimraf \"dev/**/*.d.ts\" \"test/**/*.d.ts\" && tsc && type-coverage && micromark-build && esbuild . --bundle --minify | terser | gzip-size --raw", + "prepack": "npm run build && npm run format", + "build": "tsc --build --clean && tsc --build && type-coverage && micromark-build && esbuild . --bundle --minify | terser | gzip-size --raw", "format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", "test-api": "node --conditions development test/index.js", - "test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node --conditions development test/index.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 34dd6a4..432a25a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,16 +1,17 @@ { - "include": ["dev/**/*.js", "test/**/*.js"], + "include": ["**/*.js"], + "exclude": ["coverage/", "node_modules/", "lib/index.js", "index.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" } }