From 69cbec670079d80168c3f42302c60052d4f1cebc Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 24 Jan 2023 14:46:43 +0100 Subject: [PATCH] Update `tsconfig.json` --- package.json | 7 +++---- tsconfig.json | 16 +++++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 466beac..54d3d3f 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,6 @@ "prettier": "^2.0.0", "remark-cli": "^11.0.0", "remark-preset-wooorm": "^9.0.0", - "rimraf": "^3.0.0", "tape": "^5.0.0", "tsd": "^0.25.0", "type-coverage": "^2.0.0", @@ -70,10 +69,10 @@ }, "scripts": { "prepack": "npm run build && npm run format", - "build": "rimraf \"{index,test}.d.ts\" && tsc && tsd && type-coverage", + "build": "tsc --build --clean && tsc --build && tsd && type-coverage", "format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", - "test-api": "node test.js", - "test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js", + "test-api": "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 0abbaea..da782de 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,17 @@ { - "include": ["index.js", "test.js"], + "include": ["**/*.js", "complex-types.d.ts"], + "exclude": ["coverage/", "node_modules/"], "compilerOptions": { - "target": "ES2020", - "lib": ["ES2020"], - "module": "Node16", - "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" } }