Skip to content

Commit

Permalink
Improve typescript compiler options
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Jul 12, 2023
1 parent 9e4f689 commit aeed1d7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
],
"license": "MIT",
"scripts": {
"build": "tsc -d && tsc -p tsconfig.esm.json",
"build": "tsc && tsc -p tsconfig.esm.json",
"lint": "prettier --check 'index.ts' 'test/*.test.ts'",
"format": "prettier --write 'index.ts' 'test/*.test.ts'",
"test": "cd test && tsc && node hdkey.test.js"
Expand Down
12 changes: 4 additions & 8 deletions tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
{
"compilerOptions": {
"strict": true,
"target": "es2020",
"lib": ["es2020"],
"module": "es6",
"moduleResolution": "node",
"moduleResolution": "bundler",
"outDir": "lib/esm",
"baseUrl": ".",
"sourceMap": true,
"strict": true,
"allowSyntheticDefaultImports": false,
"allowUnreachableCode": false,
"esModuleInterop": false,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"useUnknownInCatchVariables": true,
},
"include": ["index.ts"],
"exclude": ["node_modules", "lib"]
Expand Down
14 changes: 5 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
{
"compilerOptions": {
"strict": true,
"target": "es2020",
"lib": ["es2020"],
"module": "commonjs",
"moduleResolution": "node",
"outDir": "lib",
"baseUrl": ".",
"declaration": true,
"sourceMap": true,
"resolveJsonModule": true,
"declaration": true,
"declarationMap": true,
"strict": true,
"allowSyntheticDefaultImports": false,
"allowUnreachableCode": false,
"esModuleInterop": false,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"useUnknownInCatchVariables": true,
},
"include": ["index.ts"],
"exclude": ["node_modules", "lib"]
Expand Down

0 comments on commit aeed1d7

Please sign in to comment.