Skip to content

Commit 4886849

Browse files
jbl428imdudu1
andcommitted
chore: add tsconfig build options
Co-authored-by: imdudu1 <[email protected]>
1 parent d5a6604 commit 4886849

File tree

5 files changed

+33
-24
lines changed

5 files changed

+33
-24
lines changed

.eslintrc.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ extends:
55
- standard-with-typescript
66
- plugin:@typescript-eslint/recommended
77
- plugin:prettier/recommended
8-
overrides:
9-
- files:
10-
- vitest.config.ts
11-
- global.vitest.ts
12-
parser: '@typescript-eslint/parser'
13-
parserOptions:
14-
project: tsconfig.spec.json
158
parserOptions:
169
project: tsconfig.json
1710
ecmaVersion: latest

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
"homepage": "https://github.com/r2don/nest-http-interface#readme",
2222
"main": "index.js",
2323
"scripts": {
24+
"build": "tsc --build --verbose tsconfig.build.json",
25+
"clean": "tsc --build --clean tsconfig.build.json",
2426
"test": "vitest run",
2527
"prepare": "husky install"
2628
},

tsconfig.build.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES6",
4+
"declaration": true,
5+
"outDir": "./dist",
6+
"noLib": false,
7+
"experimentalDecorators": true,
8+
"emitDecoratorMetadata": true,
9+
"module": "commonjs",
10+
"esModuleInterop": true,
11+
"forceConsistentCasingInFileNames": true,
12+
"strict": true,
13+
"strictNullChecks": true,
14+
"skipLibCheck": true,
15+
"noUnusedLocals": true
16+
},
17+
"include": [
18+
"lib/**/*"
19+
],
20+
"exclude": [
21+
"node_modules",
22+
"tests",
23+
"**/*.spec.ts"
24+
]
25+
}

tsconfig.json

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
{
2-
"compilerOptions": {
3-
"target": "ES6",
4-
"experimentalDecorators": true,
5-
"emitDecoratorMetadata": true,
6-
"module": "commonjs",
7-
"esModuleInterop": true,
8-
"forceConsistentCasingInFileNames": true,
9-
"strict": true,
10-
"strictNullChecks": true,
11-
"skipLibCheck": true
12-
},
2+
"extends": "./tsconfig.build.json",
133
"include": [
14-
"lib/**/*"
4+
"lib/**/*",
5+
"vitest.config.ts",
6+
"global.vitest.ts",
7+
"**/*.spec.ts"
158
],
169
"exclude": [
17-
"node_modules", "tests", "**/*.spec.js"
10+
"node_modules"
1811
]
1912
}

tsconfig.spec.json

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

0 commit comments

Comments
 (0)