@codefast/typescript-config 0.3.6 → 0.3.7-canary.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @codefast/typescript-config
2
2
 
3
+ ## 0.3.7-canary.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`345eb36`](https://github.com/codefastlabs/codefast/commit/345eb368a1e44051e215c0e74a255bb8bf7cca76) Thanks [@thevuong](https://github.com/thevuong)! - chore(cli): implement CLI framework with initial commands and adapters
8
+
9
+ - [`d5d8343`](https://github.com/codefastlabs/codefast/commit/d5d83431d97f433f9dd5d1c745bd35f163573ad2) Thanks [@thevuong](https://github.com/thevuong)! - chore(ui): replace `tw-animate-css` with `@tailwindcss/typography` for improved styling capabilities
10
+
11
+ - [`0c0ae47`](https://github.com/codefastlabs/codefast/commit/0c0ae47e822ca82609d5e2dfe55629387ec88df1) Thanks [@thevuong](https://github.com/thevuong)! - chore(ui): update animations and dependencies for improved consistency
12
+
13
+ ## 0.3.7-canary.0
14
+
15
+ ### Patch Changes
16
+
17
+ - [`e66e9ac`](https://github.com/codefastlabs/codefast/commit/e66e9ac1186a94cb30d83d7125d4991ee91c7a41) Thanks [@thevuong](https://github.com/thevuong)! - refactor: improve readability and naming consistency across multiple packages
18
+
19
+ - [`c98a4f3`](https://github.com/codefastlabs/codefast/commit/c98a4f3c821039557205fdb0fc4b5a55d8b81944) Thanks [@thevuong](https://github.com/thevuong)! - chore(dependencies): update multiple dependencies to latest versions
20
+
21
+ - [`161717d`](https://github.com/codefastlabs/codefast/commit/161717db82457444b793bad252099084ef490085) Thanks [@thevuong](https://github.com/thevuong)! - feat(eslint-config): strengthen unicorn and TypeScript rule configurations
22
+
23
+ - [`dea11de`](https://github.com/codefastlabs/codefast/commit/dea11deef4cab04a9ed2cd411251f6ad939acba6) Thanks [@thevuong](https://github.com/thevuong)! - chore(ui): integrate `tw-animate-css` and enhance animation easing consistency
24
+
25
+ - [`2f0fd79`](https://github.com/codefastlabs/codefast/commit/2f0fd791d1505279a9c8570f8f3fddcf058d64ee) Thanks [@thevuong](https://github.com/thevuong)! - chore: reorder imports for consistency and clarity
26
+
27
+ - [`728b150`](https://github.com/codefastlabs/codefast/commit/728b1503583d1f130c2f0abd503343dd8c802ee6) Thanks [@thevuong](https://github.com/thevuong)! - chore(tests): remove obsolete test files for core use cases and adapters
28
+
3
29
  ## 0.3.6
4
30
 
5
31
  ### Patch Changes
@@ -846,7 +872,7 @@
846
872
 
847
873
  - [#37](https://github.com/codefastlabs/codefast/pull/37) [`76aa08d`](https://github.com/codefastlabs/codefast/commit/76aa08dd12f143223d88d30c72e7b8677e9808fc) Thanks [@thevuong](https://github.com/thevuong)! - feat(day-picker): support start and end month constraints
848
874
 
849
- - [#37](https://github.com/codefastlabs/codefast/pull/37) [`abde741`](https://github.com/codefastlabs/codefast/commit/abde741acf18523884da7fd98ed3e8a6379bcac4) Thanks [@thevuong](https://github.com/thevuong)! - fix(day-picker): update role query from 'cell' to 'gridcell'
875
+ - [#37](https://github.com/codefastlabs/codefast/pull/37) [`abde741`](https://github.com/codefastlabs/codefast/commit/abde741acf18523884da7fd98ed3e8a6379bcac4) Thanks [@thevuong](https://github.com/thevuong)! - fix(day-picker): update role query from "cell" to "gridcell"
850
876
 
851
877
  - [#37](https://github.com/codefastlabs/codefast/pull/37) [`00167ec`](https://github.com/codefastlabs/codefast/commit/00167ec8ca7c04911d3c8844c5172f1765aede9f) Thanks [@thevuong](https://github.com/thevuong)! - refactor(style): improve CSS variable formatting
852
878
 
@@ -1160,7 +1186,7 @@
1160
1186
 
1161
1187
  ### Patch Changes
1162
1188
 
1163
- - Remove 'use client' directive from components
1189
+ - Remove "use client" directive from components
1164
1190
 
1165
1191
  ## 0.1.15
1166
1192
 
package/README.md CHANGED
@@ -1,337 +1,273 @@
1
- # @codefast/typescript-config
1
+ # TypeScript Config
2
2
 
3
- Shared TypeScript configuration presets for the CodeFast monorepo, providing consistent and optimized TypeScript settings across different project types including libraries, React applications, and Next.js projects.
3
+ Shared TypeScript configuration presets for the CodeFast monorepo, providing standardized TypeScript settings for different project types including React applications, Next.js projects, libraries, and base configurations.
4
4
 
5
- ## Features
6
-
7
- - 🎯 **Multiple Presets** - Tailored configurations for different project types
8
- - 🏗️ **Extensible Base** - Common base configuration with specialized extensions
9
- - ⚡ **Modern Standards** - Latest TypeScript features and best practices
10
- - 🔧 **Strict Configuration** - Enhanced type safety and code quality
11
- - 📦 **Monorepo Optimized** - Designed for monorepo development workflows
12
- - 🚀 **Performance Focused** - Optimized compiler options for fast builds
13
-
14
- ## Available Configurations
15
-
16
- ### Base Configuration (`base.json`)
17
-
18
- Foundational TypeScript configuration with strict settings and modern ES features:
19
-
20
- - ES2022 target with ESNext modules
21
- - Strict type checking enabled
22
- - Declaration files and source maps
23
- - Optimized for development and production builds
24
-
25
- ### Library Configuration (`library.json`)
26
-
27
- Extends base configuration for library development:
28
-
29
- - Composite builds support
30
- - Incremental compilation
31
- - Source maps and declaration maps
32
- - Internal type stripping for clean APIs
33
-
34
- ### React Configuration (`react.json`)
35
-
36
- Optimized for React components and applications:
37
-
38
- - React JSX transform (`react-jsx`)
39
- - React as JSX import source
40
- - ES2020 target for modern React features
41
- - Source maps for debugging
42
-
43
- ### Next.js Configuration (`next.json`)
44
-
45
- Tailored for Next.js applications:
46
-
47
- - Next.js plugin integration
48
- - JSX preserve mode
49
- - JavaScript file support
50
- - ES2018 target for Next.js compatibility
51
- - No emit (Next.js handles compilation)
5
+ ![NPM Version](https://img.shields.io/npm/v/@codefast/typescript-config.svg)
52
6
 
53
7
  ## Installation
54
8
 
9
+ Install the package via pnpm (recommended):
10
+
55
11
  ```bash
56
- # Using pnpm (recommended)
57
12
  pnpm add -D @codefast/typescript-config
13
+ ```
58
14
 
59
- # Using npm
60
- npm install --save-dev @codefast/typescript-config
15
+ Or using npm:
61
16
 
62
- # Using yarn
63
- yarn add -D @codefast/typescript-config
17
+ ```bash
18
+ npm install --save-dev @codefast/typescript-config
64
19
  ```
65
20
 
66
- ## Usage
21
+ **Requirements**:
67
22
 
68
- ### For Libraries
23
+ - Node.js version 20.0.0 or higher
24
+ - TypeScript version 5.0.0 or higher
69
25
 
70
- Create a `tsconfig.json` in your library package:
26
+ ## Quick Start
27
+
28
+ Create a `tsconfig.json` file in your project and extend from the appropriate configuration:
71
29
 
72
30
  ```json
73
31
  {
74
- "extends": "@codefast/typescript-config/library.json",
75
- "compilerOptions": {
76
- "outDir": "./dist",
77
- "rootDir": "./src"
78
- },
79
- "include": ["src/**/*"],
80
- "exclude": ["dist", "node_modules", "**/*.test.ts", "**/*.spec.ts"]
32
+ "extends": "@codefast/typescript-config/base.json"
81
33
  }
82
34
  ```
83
35
 
84
- ### For React Applications
36
+ ## Usage
37
+
38
+ ### Base Configuration
85
39
 
86
- Create a `tsconfig.json` for React projects:
40
+ Basic configuration for all TypeScript projects:
87
41
 
88
42
  ```json
89
43
  {
90
- "extends": "@codefast/typescript-config/react.json",
44
+ "extends": "@codefast/typescript-config/base.json",
91
45
  "compilerOptions": {
92
- "paths": {
93
- "@/*": ["./src/*"]
94
- }
46
+ "outDir": "./dist"
95
47
  },
96
48
  "include": ["src/**/*"],
97
- "exclude": ["node_modules", "dist", "build"]
49
+ "exclude": ["node_modules", "dist"]
98
50
  }
99
51
  ```
100
52
 
101
- ### For Next.js Applications
53
+ ### Library Configuration
102
54
 
103
- Create a `tsconfig.json` for Next.js projects:
55
+ For developing libraries and packages:
104
56
 
105
57
  ```json
106
58
  {
107
- "extends": "@codefast/typescript-config/next.json",
59
+ "extends": "@codefast/typescript-config/library.json",
108
60
  "compilerOptions": {
109
- "paths": {
110
- "@/*": ["./src/*"]
111
- }
61
+ "outDir": "./dist",
62
+ "declarationDir": "./dist/types"
112
63
  },
113
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
114
- "exclude": ["node_modules"]
64
+ "include": ["src/**/*"],
65
+ "exclude": ["node_modules", "dist", "**/*.test.ts"]
115
66
  }
116
67
  ```
117
68
 
118
- ### For Custom Configurations
69
+ ### React Configuration
119
70
 
120
- You can extend the base configuration and customize it:
71
+ For React components and applications:
121
72
 
122
73
  ```json
123
74
  {
124
- "extends": "@codefast/typescript-config/base.json",
75
+ "extends": "@codefast/typescript-config/react.json",
125
76
  "compilerOptions": {
126
- "outDir": "./build",
127
- "rootDir": "./src",
128
- "paths": {
129
- "@/*": ["./src/*"],
130
- "@components/*": ["./src/components/*"]
131
- }
77
+ "outDir": "./dist"
132
78
  },
133
79
  "include": ["src/**/*"],
134
- "exclude": ["node_modules", "build", "**/*.test.ts"]
80
+ "exclude": ["node_modules", "dist"]
135
81
  }
136
82
  ```
137
83
 
138
- ## Build Configuration
84
+ ### Next.js Configuration
139
85
 
140
- For build-specific configurations, create a separate `tsconfig.build.json`:
86
+ For Next.js applications:
141
87
 
142
88
  ```json
143
89
  {
144
- "extends": "./tsconfig.json",
145
- "compilerOptions": {
146
- "noEmit": false,
147
- "declaration": true,
148
- "declarationMap": true,
149
- "sourceMap": true
150
- },
151
- "exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts", "**/*.stories.ts"]
90
+ "extends": "@codefast/typescript-config/next.json",
91
+ "include": [
92
+ "next-env.d.ts",
93
+ "**/*.ts",
94
+ "**/*.tsx",
95
+ ".next/types/**/*.ts"
96
+ ],
97
+ "exclude": ["node_modules"]
152
98
  }
153
99
  ```
154
100
 
155
- ## Configuration Details
156
-
157
- ### Compiler Options Explained
158
-
159
- This section explains the meaning and purpose of each TypeScript compiler option used across our configurations.
160
-
161
- #### Base Configuration Options (`base.json`)
162
-
163
- **Module and Import Settings:**
164
-
165
- - `allowImportingTsExtensions: false` - Prevents importing TypeScript files with `.ts` extensions, enforcing proper module resolution
166
- - `allowSyntheticDefaultImports: true` - Allows default imports from modules without default exports (e.g., `import React from 'react'`)
167
- - `esModuleInterop: true` - Enables interoperability between CommonJS and ES modules, making imports more intuitive
168
- - `module: "ESNext"` - Uses the latest ECMAScript module system for modern bundlers
169
- - `moduleDetection: "force"` - Forces TypeScript to treat all files as modules, preventing global scope pollution
170
- - `moduleResolution: "node"` - Uses Node.js-style module resolution for better compatibility with Node.js and npm packages
171
- - `resolveJsonModule: true` - Allows importing JSON files as modules with type safety
172
-
173
- **Type Checking and Safety:**
174
-
175
- - `strict: true` - Enables all strict type checking options for maximum type safety
176
- - `noImplicitReturns: true` - Ensures all code paths in functions return a value when a return type is specified
177
- - `noImplicitOverride: true` - Requires explicit `override` keyword when overriding base class methods
178
- - `noFallthroughCasesInSwitch: true` - Prevents accidental fallthrough in switch statements
179
- - `noUnusedLocals: true` - Reports errors for unused local variables
180
- - `noUnusedParameters: true` - Reports errors for unused function parameters
181
- - `forceConsistentCasingInFileNames: true` - Ensures consistent file name casing across different operating systems
182
-
183
- **Output and Declaration:**
184
-
185
- - `declaration: true` - Generates `.d.ts` declaration files for type definitions
186
- - `declarationMap: true` - Creates source maps for declaration files, enabling "Go to Definition" in editors
187
- - `incremental: false` - Disables incremental compilation in base config (overridden in specific configs)
188
- - `noEmitOnError: true` - Prevents emitting JavaScript files when TypeScript errors are present
101
+ ## Configurations
189
102
 
190
- **Language Features:**
103
+ ### Available Configurations
191
104
 
192
- - `target: "ES2022"` - Compiles to ES2022, supporting modern JavaScript features
193
- - `lib: ["DOM", "DOM.Iterable", "ESNext"]` - Includes type definitions for DOM APIs and latest ECMAScript features
194
- - `isolatedModules: true` - Ensures each file can be transpiled independently (required for tools like Babel)
195
- - `useDefineForClassFields: true` - Uses ECMAScript standard behavior for class field declarations
196
- - `verbatimModuleSyntax: false` - Allows TypeScript to transform import/export syntax for better compatibility
105
+ | Configuration | Description | Use Case |
106
+ |---------------|-------------|----------|
107
+ | `base.json` | Basic configuration with strict settings | Base for all projects |
108
+ | `library.json` | Extends base, adds library-specific options | NPM packages, shared libraries |
109
+ | `react.json` | Extends base, adds React JSX support | React components and apps |
110
+ | `next.json` | Extends base, optimized for Next.js | Next.js applications |
197
111
 
198
- **Performance and Optimization:**
112
+ ### Base Configuration Features
199
113
 
200
- - `skipLibCheck: true` - Skips type checking of declaration files for faster compilation
114
+ - **Strict Type Checking**: Enables all strict options
115
+ - **Modern JavaScript**: Targets ESNext with full ESNext lib support
116
+ - **Module Resolution**: Node-style resolution with ESNext modules
117
+ - **Developer Experience**: Force consistent casing, no unused variables/parameters
118
+ - **JSON Support**: Resolve JSON modules
119
+ - **Isolated Modules**: Transpile each file separately
201
120
 
202
- #### Library Configuration Options (`library.json`)
121
+ ### Library Configuration Features
203
122
 
204
- **Build System:**
123
+ - **Declaration Generation**: Automatically generates `.d.ts` files
124
+ - **Source Maps**: Generate source maps for debugging
125
+ - **Strip Internal**: Remove internal declarations from output
126
+ - **ESNext Only**: Does not include DOM libs
205
127
 
206
- - `composite: true` - Enables TypeScript project references for monorepo builds and incremental compilation
207
- - `incremental: true` - Enables incremental compilation for faster subsequent builds
208
- - `sourceMap: true` - Generates source maps for debugging compiled JavaScript
128
+ ### React Configuration Features
209
129
 
210
- **Output Control:**
130
+ - **Modern JSX Transform**: Uses `react-jsx` transform
131
+ - **React Import Source**: Automatically import React when needed
132
+ - **DOM Support**: Full DOM and DOM.Iterable libs
211
133
 
212
- - `noEmit: false` - Allows emitting JavaScript files (overrides base config for library builds)
213
- - `removeComments: false` - Preserves comments in output for better debugging experience
214
- - `stripInternal: true` - Removes types marked with `@internal` from declaration files, creating cleaner public APIs
134
+ ### Next.js Configuration Features
215
135
 
216
- **Library-Specific:**
136
+ - **JavaScript Support**: Allow `.js` files
137
+ - **Incremental Compilation**: Faster subsequent builds
138
+ - **JSX Preserve**: Let Next.js handle JSX transform
139
+ - **Bundler Resolution**: Optimized for bundler
140
+ - **No Emit**: Next.js handles compilation
141
+ - **Next.js Plugin**: TypeScript plugin support
217
142
 
218
- - `lib: ["ESNext"]` - Only includes ESNext types (removes DOM types for Node.js libraries)
143
+ ## API Reference
219
144
 
220
- #### React Configuration Options (`react.json`)
145
+ ### Configuration Files
221
146
 
222
- **JSX Processing:**
147
+ #### `base.json`
223
148
 
224
- - `jsx: "react-jsx"` - Uses the modern React JSX transform (no need to import React in every file)
225
- - `jsxImportSource: "react"` - Specifies React as the source for JSX runtime functions
149
+ Base configuration with essential compiler options:
226
150
 
227
- **Build Settings:**
228
-
229
- - `target: "ES2020"` - Targets ES2020 for modern React applications
230
- - `moduleResolution: "node"` - Uses Node.js-style module resolution for better compatibility with npm packages
231
- - `noEmit: false` - Allows emitting files for React builds
232
- - `sourceMap: true` - Enables source maps for debugging React components
233
-
234
- #### Next.js Configuration Options (`next.json`)
235
-
236
- **Next.js Integration:**
237
-
238
- - `allowJs: true` - Allows JavaScript files alongside TypeScript in Next.js projects
239
- - `jsx: "preserve"` - Preserves JSX syntax for Next.js to handle during its compilation process
240
- - `plugins: [{"name": "next"}]` - Integrates Next.js TypeScript plugin for enhanced IDE support
241
- - `noEmit: true` - Prevents TypeScript from emitting files (Next.js handles compilation)
242
-
243
- **Compatibility:**
244
-
245
- - `target: "ES2018"` - Targets ES2018 for broader browser compatibility in Next.js apps
246
- - `moduleResolution: "node"` - Uses Node.js-style module resolution for better compatibility with npm packages
247
- - `incremental: true` - Enables incremental compilation for faster Next.js development builds
248
-
249
- ### Configuration Inheritance
151
+ ```typescript
152
+ interface BaseConfig {
153
+ compilerOptions: {
154
+ allowSyntheticDefaultImports: true;
155
+ declaration: true;
156
+ esModuleInterop: true;
157
+ forceConsistentCasingInFileNames: true;
158
+ isolatedModules: true;
159
+ lib: ["DOM", "DOM.Iterable", "ESNext"];
160
+ module: "ESNext";
161
+ moduleDetection: "force";
162
+ moduleResolution: "node";
163
+ noEmitOnError: true;
164
+ noFallthroughCasesInSwitch: true;
165
+ noImplicitOverride: true;
166
+ noImplicitReturns: true;
167
+ noUnusedLocals: true;
168
+ noUnusedParameters: true;
169
+ resolveJsonModule: true;
170
+ skipLibCheck: true;
171
+ strict: true;
172
+ target: "ESNext";
173
+ useDefineForClassFields: true;
174
+ };
175
+ }
176
+ ```
250
177
 
251
- Each configuration extends the base configuration and overrides specific options:
178
+ #### `library.json`
252
179
 
253
- - **Library** extends base + adds composite builds, source maps, and library-specific optimizations
254
- - **React** extends base + adds JSX support and React-specific settings
255
- - **Next.js** extends base + adds Next.js plugin integration and framework-specific optimizations
180
+ Library-specific configuration extending base:
256
181
 
257
- ## Best Practices
182
+ ```typescript
183
+ interface LibraryConfig extends BaseConfig {
184
+ compilerOptions: BaseConfig["compilerOptions"] & {
185
+ declaration: true;
186
+ lib: ["ESNext"];
187
+ sourceMap: true;
188
+ stripInternal: true;
189
+ };
190
+ }
191
+ ```
258
192
 
259
- ### Monorepo Setup
193
+ #### `react.json`
260
194
 
261
- For monorepo packages, use project references in your root `tsconfig.json`:
195
+ React-specific configuration:
262
196
 
263
- ```json
264
- {
265
- "files": [],
266
- "references": [
267
- {
268
- "path": "./packages/ui"
269
- },
270
- {
271
- "path": "./packages/hooks"
272
- },
273
- {
274
- "path": "./apps/docs"
275
- }
276
- ]
197
+ ```typescript
198
+ interface ReactConfig extends BaseConfig {
199
+ compilerOptions: BaseConfig["compilerOptions"] & {
200
+ jsx: "react-jsx";
201
+ jsxImportSource: "react";
202
+ };
277
203
  }
278
204
  ```
279
205
 
280
- ### Path Mapping
206
+ #### `next.json`
281
207
 
282
- Configure consistent path mapping across your projects:
208
+ Next.js-specific configuration:
283
209
 
284
- ```json
285
- {
286
- "compilerOptions": {
287
- "paths": {
288
- "@/*": ["./src/*"],
289
- "@/components/*": ["./src/components/*"],
290
- "@/utils/*": ["./src/utils/*"],
291
- "@/types/*": ["./src/types/*"]
292
- }
293
- }
210
+ ```typescript
211
+ interface NextConfig extends BaseConfig {
212
+ compilerOptions: BaseConfig["compilerOptions"] & {
213
+ allowJs: true;
214
+ incremental: true;
215
+ jsx: "preserve";
216
+ moduleResolution: "bundler";
217
+ noEmit: true;
218
+ plugins: [{ name: "next" }];
219
+ };
294
220
  }
295
221
  ```
296
222
 
297
- ### Development vs Production
223
+ ## Contributing
298
224
 
299
- Use different configurations for development and production builds:
225
+ We welcome all contributions! To start developing:
300
226
 
301
- ```json5
302
- // tsconfig.dev.json
303
- {
304
- extends: "./tsconfig.json",
305
- compilerOptions: {
306
- incremental: true,
307
- tsBuildInfoFile: ".tsbuildinfo",
308
- },
309
- }
310
- ```
227
+ ### Environment Setup
311
228
 
312
- ## Troubleshooting
229
+ 1. Fork this repository.
230
+ 2. Clone to your machine: `git clone <your-fork-url>`
231
+ 3. Install dependencies: `pnpm install`
232
+ 4. Create a new branch: `git checkout -b feature/feature-name`
313
233
 
314
- ### Common Issues
234
+ ### Development Workflow
315
235
 
316
- 1. **Module Resolution Errors**: Ensure `moduleResolution` is set to `"node"` for better npm package compatibility
317
- 2. **JSX Errors**: Use the appropriate preset (`react.json` or `next.json`) for JSX projects
318
- 3. **Declaration Errors**: Check that `declaration` is enabled for library builds
319
- 4. **Path Mapping**: Verify `baseUrl` and `paths` are correctly configured
236
+ ```bash
237
+ # Build all packages
238
+ pnpm build:packages
320
239
 
321
- ### Performance Tips
240
+ # Development mode for typescript-config
241
+ pnpm dev --filter=@codefast/typescript-config
322
242
 
323
- - Use `incremental: true` for faster subsequent builds
324
- - Enable `composite: true` for project references in monorepos
325
- - Use `skipLibCheck: true` to skip type checking of declaration files
243
+ # Run tests
244
+ pnpm test --filter=@codefast/typescript-config
326
245
 
327
- ## Contributing
246
+ # Lint and format
247
+ pnpm lint:fix
248
+ pnpm format
249
+ ```
250
+
251
+ 5. Commit and submit pull request.
328
252
 
329
- This package is part of the CodeFast monorepo. For contributions, please refer to the main repository guidelines.
253
+ See details at [CONTRIBUTING.md](../../CONTRIBUTING.md).
330
254
 
331
255
  ## License
332
256
 
333
- MIT License - see the [LICENSE](../../LICENSE) file for details.
257
+ Distributed under the MIT License. See [LICENSE](../../LICENSE) for more information.
258
+
259
+ ## Contact
260
+
261
+ - npm: [@codefast/typescript-config](https://www.npmjs.com/package/@codefast/typescript-config)
262
+ - GitHub: [codefastlabs/codefast](https://github.com/codefastlabs/codefast)
263
+ - Issues: [GitHub Issues](https://github.com/codefastlabs/codefast/issues)
264
+ - Documentation: [TypeScript Config Docs](https://github.com/codefastlabs/codefast/tree/main/packages/typescript-config)
265
+
266
+ ## Compatibility
334
267
 
335
- ---
268
+ This package is compatible with:
336
269
 
337
- **@codefast/typescript-config** provides the foundation for consistent TypeScript development across the CodeFast ecosystem.
270
+ - **TypeScript**: 5.0.0+
271
+ - **Node.js**: 20.0.0+
272
+ - **React**: 18.0.0+ (when using react.json)
273
+ - **Next.js**: 14.0.0+ (when using next.json)
package/base.json CHANGED
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "compilerOptions": {
4
- "allowImportingTsExtensions": false,
5
4
  "allowSyntheticDefaultImports": true,
6
5
  "declaration": true,
7
- "declarationMap": true,
8
6
  "esModuleInterop": true,
9
7
  "forceConsistentCasingInFileNames": true,
10
- "incremental": false,
11
8
  "isolatedModules": true,
12
9
  "lib": ["DOM", "DOM.Iterable", "ESNext"],
13
10
  "module": "ESNext",
@@ -22,9 +19,8 @@
22
19
  "resolveJsonModule": true,
23
20
  "skipLibCheck": true,
24
21
  "strict": true,
25
- "target": "ES2022",
26
- "useDefineForClassFields": true,
27
- "verbatimModuleSyntax": false
22
+ "target": "ESNext",
23
+ "useDefineForClassFields": true
28
24
  },
29
25
  "display": "Base configuration for monorepo packages"
30
26
  }
package/library.json CHANGED
@@ -1,13 +1,8 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "compilerOptions": {
4
- "composite": true,
5
4
  "declaration": true,
6
- "declarationMap": true,
7
- "incremental": true,
8
5
  "lib": ["ESNext"],
9
- "noEmit": false,
10
- "removeComments": false,
11
6
  "sourceMap": true,
12
7
  "stripInternal": true
13
8
  },
package/next.json CHANGED
@@ -4,17 +4,13 @@
4
4
  "allowJs": true,
5
5
  "incremental": true,
6
6
  "jsx": "preserve",
7
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
8
- "module": "ESNext",
9
- "moduleResolution": "node",
7
+ "moduleResolution": "bundler",
10
8
  "noEmit": true,
11
9
  "plugins": [
12
10
  {
13
11
  "name": "next"
14
12
  }
15
- ],
16
- "resolveJsonModule": true,
17
- "target": "ES2018"
13
+ ]
18
14
  },
19
15
  "display": "Next.js application configuration",
20
16
  "extends": "./base.json"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefast/typescript-config",
3
- "version": "0.3.6",
3
+ "version": "0.3.7-canary.1",
4
4
  "description": "Shared TypeScript configuration for the monorepo",
5
5
  "keywords": [
6
6
  "typescript",
@@ -24,7 +24,6 @@
24
24
  },
25
25
  "license": "MIT",
26
26
  "author": "Vuong Phan <mr.thevuong@gmail.com>",
27
- "sideEffects": false,
28
27
  "exports": {
29
28
  "./base.json": "./base.json",
30
29
  "./library.json": "./library.json",
package/react.json CHANGED
@@ -2,12 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "compilerOptions": {
4
4
  "jsx": "react-jsx",
5
- "jsxImportSource": "react",
6
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
7
- "moduleResolution": "node",
8
- "noEmit": false,
9
- "sourceMap": true,
10
- "target": "ES2020"
5
+ "jsxImportSource": "react"
11
6
  },
12
7
  "display": "React component and application configuration",
13
8
  "extends": "./base.json"