From 8db5c5017d4add1be3396f773f55bf272d67583b Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Sat, 23 Dec 2023 17:31:52 +0000 Subject: [PATCH] Refactor tsconfig: use inheritance --- package.json | 2 +- tsconfig.esm.json | 11 ++++++----- tsconfig.json | 22 ++++------------------ 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 9d4ddb9..0e74f28 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "homepage": "https://paulmillr.com/noble/#scure", "repository": { "type": "git", - "url": "https://github.com/paulmillr/scure-bip32.git" + "url": "git+https://github.com/paulmillr/scure-bip32.git" }, "contributors": [ { diff --git a/tsconfig.esm.json b/tsconfig.esm.json index 7516d5b..4ca6e3b 100644 --- a/tsconfig.esm.json +++ b/tsconfig.esm.json @@ -2,12 +2,8 @@ "compilerOptions": { "target": "es2020", "lib": ["es2020"], - "module": "es6", - "moduleResolution": "bundler", - "outDir": "lib/esm", - "baseUrl": ".", - "sourceMap": true, "strict": true, + "sourceMap": false, "allowSyntheticDefaultImports": false, "allowUnreachableCode": false, "esModuleInterop": false, @@ -16,6 +12,11 @@ "noUncheckedIndexedAccess": true, "noUnusedLocals": true, "noUnusedParameters": true, + "baseUrl": ".", + + "module": "es2020", + "outDir": "lib/esm", + "moduleResolution": "bundler" }, "include": ["index.ts"], "exclude": ["node_modules", "lib"] diff --git a/tsconfig.json b/tsconfig.json index f5ee1c6..8243dc7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,24 +1,10 @@ { + "extends": "./tsconfig.esm.json", "compilerOptions": { - "target": "es2020", - "lib": ["es2020"], "module": "commonjs", + "moduleResolution": "node10", "outDir": "lib", - "baseUrl": ".", - "sourceMap": true, - "resolveJsonModule": true, "declaration": true, - "declarationMap": true, - "strict": true, - "allowSyntheticDefaultImports": false, - "allowUnreachableCode": false, - "esModuleInterop": false, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "noUncheckedIndexedAccess": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - }, - "include": ["index.ts"], - "exclude": ["node_modules", "lib"] + "declarationMap": true + } }