Skip to content

Commit d48140f

Browse files
committed
chore: improve tsconfig files
This changes were first suggested by matt pock on: github.com/supermacro/pull/567/ The only difference is that we are not including the `strict: true` for now
1 parent 0ed7472 commit d48140f

File tree

5 files changed

+41
-56
lines changed

5 files changed

+41
-56
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
dist/
22
tmp/
33
node_modules/
4-
publish.sh
4+
publish.sh
5+
tsconfig.tsbuildinfo

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020
],
2121
"scripts": {
2222
"local-ci": "pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run format && pnpm run build",
23-
"test": "vitest run && pnpm run test-types",
24-
"test-types": "tsc --noEmit -p ./tests/tsconfig.tests.json",
23+
"test": "vitest run",
2524
"lint": "eslint",
2625
"format": "prettier --write 'src/**/*.ts' && eslint --fix",
27-
"typecheck": "tsc --noEmit",
26+
"typecheck": "tsc -b",
2827
"clean": "rm -rf ./dist ./tmp",
2928
"build": "pnpm run clean && tsdown --format cjs --format esm src/index.ts && attw --pack .",
3029
"prepublishOnly": "pnpm run build"

tests/tsconfig.tests.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

tsconfig.json

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,25 @@
11
{
22
"compilerOptions": {
3-
"target": "es2015",
4-
"module": "ESNext",
5-
"moduleResolution": "Node",
6-
"strict": false,
7-
"noImplicitAny": true,
8-
"sourceMap": false,
9-
"noUnusedLocals": true,
10-
"noUnusedParameters": true,
11-
"strictNullChecks": true,
12-
"strictFunctionTypes": true,
13-
"declaration": true,
14-
"baseUrl": "./src",
15-
"lib": [
16-
"dom",
17-
"es2016",
18-
"es2017.object"
19-
],
20-
"outDir": "dist",
21-
"skipLibCheck": true,
22-
"esModuleInterop": true
3+
"target": "ES2015",
4+
"module": "ESNext",
5+
"moduleResolution": "Node",
6+
"noUnusedLocals": true,
7+
"noUnusedParameters": true,
8+
"lib": [
9+
"ES2016",
10+
"ES2017.Object"
11+
],
12+
"skipLibCheck": true,
13+
"esModuleInterop": true,
14+
"noEmit": true
2315
},
2416
"include": [
25-
"src/**/*.ts"
17+
"src/**/*.ts",
2618
],
27-
"exclude": [
28-
"node_modules",
29-
"**/*.spec.ts"
19+
"exclude": [],
20+
"references": [
21+
{
22+
"path": "./tsconfig.tests.json"
23+
}
3024
]
31-
}
25+
}

tsconfig.tests.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"noUnusedLocals": false,
5+
"noUnusedParameters": false,
6+
"declaration": true,
7+
"composite": true,
8+
"outDir": "./tests/dist",
9+
"noEmit": false
10+
},
11+
"include": [
12+
"./src/**/*.ts",
13+
"./tests/**/*.ts",
14+
],
15+
"exclude": [
16+
"./tests/dist"
17+
]
18+
}

0 commit comments

Comments
 (0)