@sicoti/tsconfig 1.0.0 → 2.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/CHANGELOG.md +69 -0
- package/LICENSE +21 -21
- package/README.md +381 -331
- package/base.json +90 -89
- package/bun.json +49 -39
- package/nestjs.json +55 -47
- package/nextjs.json +53 -47
- package/node.json +49 -0
- package/package.json +6 -6
- package/react-library.json +48 -42
package/react-library.json
CHANGED
|
@@ -1,42 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/tsconfig.json",
|
|
3
|
-
"display": "React Library Configuration",
|
|
4
|
-
"extends": "./base.json",
|
|
5
|
-
|
|
6
|
-
/* ═══════════════════════════════════════════════════════════════════════════════════
|
|
7
|
-
* @sicoti/tsconfig - React Library Preset
|
|
8
|
-
* ═══════════════════════════════════════════════════════════════════════════════════
|
|
9
|
-
*
|
|
10
|
-
* Optimized for React component libraries
|
|
11
|
-
*
|
|
12
|
-
* Key characteristics:
|
|
13
|
-
* - Browser APIs (DOM libs) for component development
|
|
14
|
-
* - React 17+ JSX runtime (automatic import)
|
|
15
|
-
* -
|
|
16
|
-
* -
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig.json",
|
|
3
|
+
"display": "React Library Configuration",
|
|
4
|
+
"extends": "./base.json",
|
|
5
|
+
|
|
6
|
+
/* ═══════════════════════════════════════════════════════════════════════════════════
|
|
7
|
+
* @sicoti/tsconfig - React Library Preset
|
|
8
|
+
* ═══════════════════════════════════════════════════════════════════════════════════
|
|
9
|
+
*
|
|
10
|
+
* Optimized for React component libraries bundled before publication.
|
|
11
|
+
*
|
|
12
|
+
* Key characteristics:
|
|
13
|
+
* - Browser APIs (DOM libs) for component development
|
|
14
|
+
* - React 17+ JSX runtime (automatic import)
|
|
15
|
+
* - Bundler-native module resolution for source code
|
|
16
|
+
* - No tsc emit; the library build tool owns JavaScript/declaration output
|
|
17
|
+
* - Relaxed unused checks for flexible component exports
|
|
18
|
+
*
|
|
19
|
+
* ═══════════════════════════════════════════════════════════════════════════════════ */
|
|
20
|
+
|
|
21
|
+
"compilerOptions": {
|
|
22
|
+
/* ─── Runtime Environment ───────────────────────────────────────────────────── */
|
|
23
|
+
"lib": ["DOM", "DOM.Iterable", "ESNext"], // Browser APIs + Modern JavaScript
|
|
24
|
+
"target": "ESNext", // Modern bundlers handle transpilation
|
|
25
|
+
|
|
26
|
+
/* ─── Bundled Library Module Host ──────────────────────────────────────────── */
|
|
27
|
+
"module": "Preserve", // Preserve source module syntax for the library bundler
|
|
28
|
+
"moduleResolution": "bundler", // Model the bundler that creates the published artifact
|
|
29
|
+
"moduleDetection": "force",
|
|
30
|
+
|
|
31
|
+
/* ─── JSX Handling ──────────────────────────────────────────────────────────── */
|
|
32
|
+
"jsx": "react-jsx", // New React 17+ JSX transform
|
|
33
|
+
|
|
34
|
+
/* ─── Output Settings ───────────────────────────────────────────────────── */
|
|
35
|
+
"noEmit": true, // tsdown/another build tool owns JS and declaration generation
|
|
36
|
+
"skipLibCheck": true, // Skip .d.ts checking for performance
|
|
37
|
+
"incremental": true, // Faster rebuilds
|
|
38
|
+
"tsBuildInfoFile": "./.cache/tsconfig.tsbuildinfo", // Keep build artifacts out of root
|
|
39
|
+
|
|
40
|
+
/* ─── Relaxed Checks for Component Libraries ────────────────────────── */
|
|
41
|
+
// Libraries may export components that appear unused locally
|
|
42
|
+
"noUnusedLocals": false,
|
|
43
|
+
"noUnusedParameters": false,
|
|
44
|
+
// React component props with optional fields and third-party UI libraries
|
|
45
|
+
// don't handle exact optional properties well
|
|
46
|
+
"exactOptionalPropertyTypes": false
|
|
47
|
+
}
|
|
48
|
+
}
|