@yuu1111/tsconfig 1.0.0

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 ADDED
@@ -0,0 +1,51 @@
1
+ # @yuu1111/tsconfig
2
+
3
+ Shared TypeScript configurations.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ bun add -D @yuu1111/tsconfig
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ Extend one of the presets in your `tsconfig.json`:
14
+
15
+ ### Node.js
16
+
17
+ ```json
18
+ {
19
+ "extends": "@yuu1111/tsconfig/node.json",
20
+ "compilerOptions": {
21
+ "outDir": "dist"
22
+ }
23
+ }
24
+ ```
25
+
26
+ ### React
27
+
28
+ ```json
29
+ {
30
+ "extends": "@yuu1111/tsconfig/react.json",
31
+ "compilerOptions": {
32
+ "outDir": "dist"
33
+ }
34
+ }
35
+ ```
36
+
37
+ ### Base (custom setup)
38
+
39
+ ```json
40
+ {
41
+ "extends": "@yuu1111/tsconfig/base.json"
42
+ }
43
+ ```
44
+
45
+ ## Presets
46
+
47
+ | Preset | Use case |
48
+ |--------|----------|
49
+ | `base.json` | Strict shared base |
50
+ | `node.json` | Node.js (Node16 module resolution) |
51
+ | `react.json` | React (JSX + DOM types) |
package/base.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ "strict": true,
5
+ "target": "ESNext",
6
+ "module": "ESNext",
7
+ "moduleResolution": "bundler",
8
+ "esModuleInterop": true,
9
+ "isolatedModules": true,
10
+ "skipLibCheck": true,
11
+ "resolveJsonModule": true,
12
+ "declaration": true,
13
+ "declarationMap": true,
14
+ "sourceMap": true,
15
+ "forceConsistentCasingInFileNames": true,
16
+ "verbatimModuleSyntax": true,
17
+ "noUncheckedIndexedAccess": true,
18
+ "noFallthroughCasesInSwitch": true,
19
+ "exactOptionalPropertyTypes": true
20
+ }
21
+ }
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@yuu1111/tsconfig",
3
+ "version": "1.0.0",
4
+ "description": "Shared TypeScript configurations",
5
+ "license": "MIT",
6
+ "tsconfig": "./base.json",
7
+ "files": [
8
+ "base.json",
9
+ "node.json",
10
+ "react.json"
11
+ ],
12
+ "keywords": [
13
+ "tsconfig",
14
+ "typescript",
15
+ "config"
16
+ ]
17
+ }
package/react.json ADDED
@@ -0,0 +1,8 @@
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
+ }
8
+ }