@yuu1111/tsconfig 1.0.4 → 1.0.5
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.ja.md +82 -0
- package/README.md +2 -0
- package/base.json +21 -19
- package/bun.json +3 -1
- package/library.json +8 -8
- package/package.json +7 -1
- package/react.json +10 -6
package/README.ja.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
[English](README.md)
|
|
2
|
+
|
|
3
|
+
# @yuu1111/tsconfig
|
|
4
|
+
|
|
5
|
+
共有のTypeScript設定
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
bun add -D @yuu1111/tsconfig
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
`tsconfig.json` でpresetの1つをextendsする
|
|
16
|
+
|
|
17
|
+
### Base
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"extends": "@yuu1111/tsconfig/base.json"
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Bun
|
|
26
|
+
|
|
27
|
+
利用Projectで `@types/bun` をinstallしてからBun presetをextendsする
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"extends": "@yuu1111/tsconfig/bun.json"
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Library
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"extends": "@yuu1111/tsconfig/library.json",
|
|
40
|
+
"compilerOptions": {
|
|
41
|
+
"rootDir": "src",
|
|
42
|
+
"outDir": "dist"
|
|
43
|
+
},
|
|
44
|
+
"include": ["src/**/*.ts"]
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Declaration-only library
|
|
49
|
+
|
|
50
|
+
bundlerがJavaScriptを出し、TypeScriptはdeclaration fileだけを出す場合にこのpresetを使う
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"extends": "@yuu1111/tsconfig/declaration-only.json",
|
|
55
|
+
"compilerOptions": {
|
|
56
|
+
"rootDir": "src",
|
|
57
|
+
"outDir": "dist"
|
|
58
|
+
},
|
|
59
|
+
"include": ["src/**/*.ts"]
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### React
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"extends": "@yuu1111/tsconfig/react.json",
|
|
68
|
+
"compilerOptions": {
|
|
69
|
+
"outDir": "dist"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Presets
|
|
75
|
+
|
|
76
|
+
| Preset | Use case |
|
|
77
|
+
|--------|----------|
|
|
78
|
+
| `base.json` | 厳格な共有base |
|
|
79
|
+
| `bun.json` | Bun project |
|
|
80
|
+
| `declaration-only.json` | declarationだけを出すlibrary build |
|
|
81
|
+
| `library.json` | declarationとsource mapを出すlibrary build |
|
|
82
|
+
| `react.json` | React(JSX + DOM型) |
|
package/README.md
CHANGED
package/base.json
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"strict": true,
|
|
5
|
+
"lib": [
|
|
6
|
+
"ESNext"
|
|
7
|
+
],
|
|
8
|
+
"target": "ESNext",
|
|
9
|
+
"module": "Preserve",
|
|
10
|
+
"moduleDetection": "force",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"isolatedModules": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"forceConsistentCasingInFileNames": true,
|
|
18
|
+
"verbatimModuleSyntax": true,
|
|
19
|
+
"noUncheckedIndexedAccess": true,
|
|
20
|
+
"noFallthroughCasesInSwitch": true,
|
|
21
|
+
"exactOptionalPropertyTypes": true
|
|
22
|
+
}
|
|
21
23
|
}
|
package/bun.json
CHANGED
package/library.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"noEmit": false,
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"sourceMap": true
|
|
9
|
+
}
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuu1111/tsconfig",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Shared TypeScript configurations",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/yuu1111/configs.git",
|
|
9
|
+
"directory": "packages/tsconfig"
|
|
10
|
+
},
|
|
6
11
|
"tsconfig": "./base.json",
|
|
7
12
|
"files": [
|
|
13
|
+
"README.ja.md",
|
|
8
14
|
"base.json",
|
|
9
15
|
"bun.json",
|
|
10
16
|
"declaration-only.json",
|
package/react.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"lib": [
|
|
6
|
+
"ESNext",
|
|
7
|
+
"DOM",
|
|
8
|
+
"DOM.Iterable"
|
|
9
|
+
],
|
|
10
|
+
"jsx": "react-jsx"
|
|
11
|
+
}
|
|
8
12
|
}
|