@chuli-dev/typescript-config 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 chuli-dev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,88 @@
1
+ # @chuli-dev/typescript-config
2
+
3
+ Strict TypeScript configuration presets optimized for modern ESM development.
4
+
5
+ ## ✨ Features
6
+
7
+ - **ESM-first** - Optimized for native ES Modules
8
+ - **Strict by default** - All TypeScript validations enabled
9
+ - **Multi-platform** - Configurations for Node.js, Web, React, and libraries
10
+ - **Zero-config** - Sensible defaults that work out of the box
11
+
12
+ ## 📦 Installation
13
+
14
+ ```bash
15
+ npm install --save-dev @chuli-dev/typescript-config typescript
16
+ ```
17
+
18
+ ## 🚀 Quick Start
19
+
20
+ Choose the configuration that matches your project:
21
+
22
+ ### Node.js Application
23
+
24
+ ```json
25
+ {
26
+ "extends": "@chuli-dev/typescript-config/node",
27
+ "compilerOptions": {
28
+ "outDir": "./dist"
29
+ }
30
+ }
31
+ ```
32
+
33
+ ### Web/Browser Application
34
+
35
+ ```json
36
+ {
37
+ "extends": "@chuli-dev/typescript-config/web",
38
+ "compilerOptions": {
39
+ "outDir": "./dist"
40
+ }
41
+ }
42
+ ```
43
+
44
+ ### React Application
45
+
46
+ ```json
47
+ {
48
+ "extends": "@chuli-dev/typescript-config/react",
49
+ "compilerOptions": {
50
+ "outDir": "./dist"
51
+ }
52
+ }
53
+ ```
54
+
55
+ ### Library (npm package)
56
+
57
+ ```json
58
+ {
59
+ "extends": "@chuli-dev/typescript-config/lib",
60
+ "compilerOptions": {
61
+ "outDir": "./dist"
62
+ }
63
+ }
64
+ ```
65
+
66
+ ## 📋 Available Configurations
67
+
68
+ | Configuration | Description | Use Case |
69
+ | -------------- | ------------------------------------- | ----------------------- |
70
+ | **`base`** | Minimal setup with strict validations | Custom setups |
71
+ | **`lib`** | Library with declaration generation | Publishing npm packages |
72
+ | **`node`** | Node.js with ES modules | Server applications |
73
+ | **`node.lib`** | Node.js library optimized | Node.js packages |
74
+ | **`web`** | Browser environment | Web applications |
75
+ | **`react`** | React with JSX support | React applications |
76
+
77
+ ## 🔧 Requirements
78
+
79
+ - **TypeScript** `>=5.0.0`
80
+ - **Node.js** `>=20.0.0`
81
+
82
+ ## 📄 License
83
+
84
+ MIT - see the [LICENSE](../../LICENSE) file for details.
85
+
86
+ ## 👤 Author
87
+
88
+ **chuli-dev** - [@TomasAntunez](https://github.com/TomasAntunez)
package/base.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ "target": "ES2022",
5
+ "lib": ["ES2022"],
6
+
7
+ "module": "ESNext",
8
+ "moduleResolution": "Bundler",
9
+ "moduleDetection": "force",
10
+ "verbatimModuleSyntax": true,
11
+ "isolatedModules": true,
12
+
13
+ "strict": true,
14
+ "noUncheckedIndexedAccess": true,
15
+ "exactOptionalPropertyTypes": true,
16
+ "useUnknownInCatchVariables": true,
17
+ "noImplicitOverride": true,
18
+ "noPropertyAccessFromIndexSignature": true,
19
+
20
+ "noImplicitReturns": true,
21
+ "noFallthroughCasesInSwitch": true,
22
+ "noUnusedLocals": true,
23
+ "noUnusedParameters": true,
24
+
25
+ "forceConsistentCasingInFileNames": true,
26
+
27
+ "esModuleInterop": true,
28
+ "allowSyntheticDefaultImports": true,
29
+ "resolveJsonModule": true,
30
+
31
+ "skipLibCheck": true
32
+ }
33
+ }
package/lib.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json",
4
+ "compilerOptions": {
5
+ "types": [],
6
+
7
+ "composite": true,
8
+ "declaration": true,
9
+ "declarationMap": true,
10
+ "emitDeclarationOnly": true,
11
+
12
+ "outDir": "dist",
13
+ "tsBuildInfoFile": "dist/.tsbuildinfo.lib"
14
+ },
15
+ "include": ["src/**/*.ts"],
16
+ "exclude": ["dist", "node_modules", "**/*.test.ts", "**/*.spec.ts"]
17
+ }
package/node.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json",
4
+ "compilerOptions": {
5
+ "lib": ["ES2022"],
6
+ "module": "NodeNext",
7
+ "moduleResolution": "NodeNext",
8
+ "types": ["node"]
9
+ }
10
+ }
package/node.lib.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./node.json",
4
+ "compilerOptions": {
5
+ "composite": true,
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "emitDeclarationOnly": true,
9
+
10
+ "outDir": "dist",
11
+ "tsBuildInfoFile": "dist/.tsbuildinfo.node.lib"
12
+ },
13
+ "include": ["src/**/*.ts"],
14
+ "exclude": ["dist", "node_modules", "**/*.test.ts", "**/*.spec.ts"]
15
+ }
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@chuli-dev/typescript-config",
3
+ "version": "1.0.0",
4
+ "description": "TypeScript base configuration for libraries and applications",
5
+ "keywords": [
6
+ "typescript",
7
+ "tsconfig",
8
+ "config"
9
+ ],
10
+ "author": "chuli-dev",
11
+ "license": "MIT",
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "files": [
16
+ "base.json",
17
+ "lib.json",
18
+ "node.json",
19
+ "node.lib.json",
20
+ "web.json",
21
+ "react.json",
22
+ "README.md",
23
+ "LICENSE"
24
+ ],
25
+ "exports": {
26
+ "./base": "./base.json",
27
+ "./lib": "./lib.json",
28
+ "./node": "./node.json",
29
+ "./node.lib": "./node.lib.json",
30
+ "./web": "./web.json",
31
+ "./react": "./react.json"
32
+ },
33
+ "peerDependencies": {
34
+ "typescript": ">=5"
35
+ },
36
+ "sideEffects": false
37
+ }
package/react.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./web.json",
4
+ "compilerOptions": {
5
+ "jsx": "react-jsx"
6
+ }
7
+ }
package/web.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json",
4
+ "compilerOptions": {
5
+ "lib": ["ES2022", "DOM", "DOM.Iterable"]
6
+ }
7
+ }