From bd953c935ed5a3413fd6810422284ca4efeef490 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 15 Sep 2023 19:19:57 +0200 Subject: [PATCH] Refactor `tsconfig.json` --- package.json | 3 +-- tsconfig.json | 19 +++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index d59e699..63ab369 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,6 @@ "remark": "^14.0.0", "remark-cli": "^11.0.0", "remark-preset-wooorm": "^9.0.0", - "rimraf": "^3.0.0", "tape": "^5.0.0", "to-vfile": "^7.0.0", "type-coverage": "^2.0.0", @@ -54,7 +53,7 @@ "xo": "^0.56.0" }, "scripts": { - "build": "rimraf \"test/**/*.d.ts\" \"*.d.ts\" && tsc && type-coverage", + "build": "tsc --build --clean && tsc --build && type-coverage", "format": "remark . -qfo --ignore-pattern test/ && prettier . -w --log-level 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 npm run test-api", diff --git a/tsconfig.json b/tsconfig.json index a93b9f9..870d82c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,16 +1,15 @@ { - "include": ["test/**/*.js", "*.js"], "compilerOptions": { - "target": "ES2020", - "lib": ["ES2020"], - "module": "ES2020", - "moduleResolution": "node", - "allowJs": true, "checkJs": true, + "customConditions": ["development"], "declaration": true, "emitDeclarationOnly": true, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "strict": true - } + "exactOptionalPropertyTypes": true, + "lib": ["es2020"], + "module": "node16", + "strict": true, + "target": "es2020" + }, + "exclude": ["coverage/", "node_modules/"], + "include": ["**/*.js"] }