@apitree.cz/ts-config 0.1.0-next.313a279
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -0
- package/app.json +7 -0
- package/base.json +24 -0
- package/library.json +10 -0
- package/nextjs.json +9 -0
- package/package.json +39 -0
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<a href="https://github.com/ApiTreeCZ">
|
|
4
|
+
<img alt="ApiTree s.r.o." src="https://www.apitree.cz/static/images/logo-header.svg" width="120" />
|
|
5
|
+
</a>
|
|
6
|
+
|
|
7
|
+
# TS Config
|
|
8
|
+
|
|
9
|
+
### [TypeScript](https://typescriptlang.org) configuration for ApiTree projects
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm add --save-dev @apitree.cz/ts-config typescript
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Add one of the following configurations to your `tsconfig.json`:
|
|
22
|
+
|
|
23
|
+
### Library
|
|
24
|
+
|
|
25
|
+
Suitable for distributable `npm` packages (both Node.js and React).
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"extends": "@apitree.cz/ts-config/library",
|
|
30
|
+
"include": [".eslintrc.cjs", "**/*.js", "**/*.ts"],
|
|
31
|
+
"exclude": ["dist", "node_modules"]
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
> **Note:** If you are using React, you should also add `"**/*.tsx"` to the `include` array.
|
|
36
|
+
|
|
37
|
+
### App
|
|
38
|
+
|
|
39
|
+
Suitable for stand-alone applications (both Node.js and React).
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"extends": "@apitree.cz/ts-config/app",
|
|
44
|
+
"include": [".eslintrc.cjs", "**/*.js", "**/*.ts"],
|
|
45
|
+
"exclude": ["build", "node_modules"]
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
> **Note:** If you are using React, you should also add `"**/*.tsx"` to the `include` array.
|
|
50
|
+
|
|
51
|
+
### Next.js
|
|
52
|
+
|
|
53
|
+
Suitable for Next.js apps.
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"extends": "@apitree.cz/ts-config/next",
|
|
58
|
+
"include": [
|
|
59
|
+
".eslintrc.cjs",
|
|
60
|
+
"next-env.d.ts",
|
|
61
|
+
"**/*.js",
|
|
62
|
+
"**/*.ts",
|
|
63
|
+
"**/*.tsx"
|
|
64
|
+
],
|
|
65
|
+
"exclude": [".next", "node_modules"]
|
|
66
|
+
}
|
|
67
|
+
```
|
package/app.json
ADDED
package/base.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"allowJs": true,
|
|
5
|
+
"disableSourceOfProjectReferenceRedirect": true,
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"exactOptionalPropertyTypes": true,
|
|
8
|
+
"forceConsistentCasingInFileNames": true,
|
|
9
|
+
"incremental": true,
|
|
10
|
+
"isolatedModules": true,
|
|
11
|
+
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
12
|
+
"module": "Node16",
|
|
13
|
+
"moduleResolution": "node16",
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": false,
|
|
17
|
+
"removeComments": true,
|
|
18
|
+
"resolveJsonModule": true,
|
|
19
|
+
"skipLibCheck": true,
|
|
20
|
+
"strict": true,
|
|
21
|
+
"strictPropertyInitialization": false,
|
|
22
|
+
"target": "ESNext"
|
|
23
|
+
}
|
|
24
|
+
}
|
package/library.json
ADDED
package/nextjs.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@apitree.cz/ts-config",
|
|
3
|
+
"version": "0.1.0-next.313a279",
|
|
4
|
+
"description": "TypeScript configuration for ApiTree projects.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/ApiTreeCZ/toolbox",
|
|
8
|
+
"directory": "packages/ts-config"
|
|
9
|
+
},
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"type": "module",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./base.json",
|
|
14
|
+
"./app": "./app.json",
|
|
15
|
+
"./library": "./library.json",
|
|
16
|
+
"./nextjs": "./nextjs.json"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"app.json",
|
|
20
|
+
"base.json",
|
|
21
|
+
"library.json",
|
|
22
|
+
"nextjs.json"
|
|
23
|
+
],
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"typescript": "^5.2.2"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"typescript": "^5.2.2"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"cleanup": "rimraf .eslintcache .turbo node_modules",
|
|
32
|
+
"fix": "run-p format:fix lint:fix",
|
|
33
|
+
"format": "prettier --check \"./**/*.{json,md}\"",
|
|
34
|
+
"format:fix": "pnpm run format --write",
|
|
35
|
+
"lint": "eslint --cache .",
|
|
36
|
+
"lint:fix": "pnpm run lint --fix",
|
|
37
|
+
"qa": "pnpm run format lint"
|
|
38
|
+
}
|
|
39
|
+
}
|