@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 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
@@ -1,3 +1,5 @@
1
+ [日本語](README.ja.md)
2
+
1
3
  # @yuu1111/tsconfig
2
4
 
3
5
  Shared TypeScript configurations.
package/base.json CHANGED
@@ -1,21 +1,23 @@
1
1
  {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "compilerOptions": {
4
- "strict": true,
5
- "lib": ["ESNext"],
6
- "target": "ESNext",
7
- "module": "Preserve",
8
- "moduleDetection": "force",
9
- "moduleResolution": "bundler",
10
- "esModuleInterop": true,
11
- "noEmit": true,
12
- "isolatedModules": true,
13
- "skipLibCheck": true,
14
- "resolveJsonModule": true,
15
- "forceConsistentCasingInFileNames": true,
16
- "verbatimModuleSyntax": true,
17
- "noUncheckedIndexedAccess": true,
18
- "noFallthroughCasesInSwitch": true,
19
- "exactOptionalPropertyTypes": true
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
@@ -2,6 +2,8 @@
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "extends": "./base.json",
4
4
  "compilerOptions": {
5
- "types": ["bun"]
5
+ "types": [
6
+ "bun"
7
+ ]
6
8
  }
7
9
  }
package/library.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
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
- }
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.4",
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
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "extends": "./base.json",
4
- "compilerOptions": {
5
- "lib": ["ESNext", "DOM", "DOM.Iterable"],
6
- "jsx": "react-jsx"
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
  }