Skip to content

Commit 508f021

Browse files
authored
docs(ts-config): simplify defaults
1 parent bbdeb82 commit 508f021

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

packages/ts-config/README.md

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ Suitable for React SPAs.
4646
```json
4747
{
4848
"extends": "@apitree.cz/ts-config/app",
49-
"include": ["**/*.js", "**/*.ts", "**/*.tsx"],
50-
"exclude": ["build", "node_modules"],
51-
"references": []
49+
"exclude": ["build", "node_modules"]
5250
}
5351
```
5452

@@ -59,9 +57,7 @@ Suitable for distributable `npm` packages (framework-agnostic).
5957
```json
6058
{
6159
"extends": "@apitree.cz/ts-config/library",
62-
"include": ["**/*.js", "**/*.ts", "**/*.tsx"],
63-
"exclude": ["dist", "node_modules"],
64-
"references": []
60+
"exclude": ["dist", "node_modules"]
6561
}
6662
```
6763

@@ -74,9 +70,7 @@ In order for WebStorm to correctly resolve paths for internal libraries in monor
7470
```json
7571
{
7672
"extends": "@apitree.cz/ts-config/library",
77-
"include": ["**/*.js", "**/*.ts", "**/*.tsx"],
78-
"exclude": ["dist", "node_modules"],
79-
"references": []
73+
"exclude": ["dist", "node_modules"]
8074
}
8175
```
8276

@@ -89,9 +83,6 @@ In order for WebStorm to correctly resolve paths for internal libraries in monor
8983
"rootDir": "./src",
9084
"outDir": "./dist"
9185
},
92-
"include": ["./src"],
93-
"files": [],
94-
"references": []
9586
}
9687
```
9788

@@ -103,8 +94,6 @@ In order for WebStorm to correctly resolve paths for internal libraries in monor
10394
{
10495
"extends": "./tsconfig.json",
10596
"compilerOptions": { "noEmit": false },
106-
"files": [],
107-
"references": []
10897
}
10998
```
11099

@@ -121,18 +110,14 @@ If your package also contains other non-src directories (e.g. `tests`, `scripts`
121110

122111
This is necessary for both WebStorm and CLI `typescript-eslint` to correctly type-check and lint all files in your package.
123112

124-
> ⚠️ Non-src root files, such as `vitest.config.ts`, should be explicitly included in `files` array of `tsconfig.json`. When emitting build, omit them using `files: []` in `tsconfig.build.json`.
125-
126113
### Node.js
127114

128115
Suitable for Node.js services and apps.
129116

130117
```json
131118
{
132119
"extends": "@apitree.cz/ts-config/nodejs",
133-
"include": ["**/*.js", "**/*.ts", "**/*.tsx"],
134120
"exclude": ["build", "node_modules"],
135-
"references": []
136121
}
137122
```
138123

@@ -143,7 +128,7 @@ Suitable for Next.js apps.
143128
```json
144129
{
145130
"extends": "@apitree.cz/ts-config/nextjs",
146-
"include": [".next/types/**/*.ts", "**/*.js", "**/*.ts", "**/*.tsx"],
131+
"include": [".next/types/**/*.ts", "**/*"],
147132
"exclude": [".next/**/*.js", "node_modules"],
148133
"references": []
149134
}
@@ -156,7 +141,6 @@ Suitable for Nest.js apps.
156141
```json
157142
{
158143
"extends": "@apitree.cz/ts-config/nestjs",
159-
"include": ["**/*.js", "**/*.ts"],
160144
"exclude": ["build", "node_modules"],
161145
"references": []
162146
}

0 commit comments

Comments
 (0)