@codefast/typescript-config 0.5.0 → 0.6.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 +4 -0
- package/README.md +12 -6
- package/base.json +0 -1
- package/library-build.json +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# @codefast/typescript-config
|
|
2
2
|
|
|
3
|
-
Shared TypeScript configuration presets — one strict, bundler-first base plus focused variants for libraries, React, and
|
|
3
|
+
Shared TypeScript configuration presets — one strict, bundler-first base plus focused variants for libraries, React, and
|
|
4
|
+
Next.js.
|
|
4
5
|
|
|
5
|
-
[](https://www.npmjs.com/package/@codefast/typescript-config)
|
|
6
|
+
[](https://www.npmjs.com/package/@codefast/typescript-config)
|
|
7
|
+
[](https://github.com/codefastlabs/codefast/blob/main/LICENSE)
|
|
6
8
|
|
|
7
9
|
## Installation
|
|
8
10
|
|
|
@@ -10,11 +12,13 @@ Shared TypeScript configuration presets — one strict, bundler-first base plus
|
|
|
10
12
|
pnpm add -D @codefast/typescript-config
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
TypeScript >= 5.0 is a peer dependency (`moduleResolution: "bundler"` requires it). The package ships plain JSON — it
|
|
15
|
+
TypeScript >= 5.0 is a peer dependency (`moduleResolution: "bundler"` requires it). The package ships plain JSON — it
|
|
16
|
+
adds no runtime code.
|
|
14
17
|
|
|
15
18
|
## Usage
|
|
16
19
|
|
|
17
|
-
Extend the preset that matches your project in `tsconfig.json`. Keep the `.json` extension — the package export map only
|
|
20
|
+
Extend the preset that matches your project in `tsconfig.json`. Keep the `.json` extension — the package export map only
|
|
21
|
+
exposes the full file names.
|
|
18
22
|
|
|
19
23
|
A generic TypeScript project:
|
|
20
24
|
|
|
@@ -78,9 +82,11 @@ All strictness comes from `base.json`, so every preset inherits it:
|
|
|
78
82
|
|
|
79
83
|
- `strict` — the full strict family (`strictNullChecks`, `noImplicitAny`, and friends).
|
|
80
84
|
- `noUncheckedIndexedAccess` — indexed access is typed `T | undefined`, forcing explicit handling.
|
|
81
|
-
- `isolatedModules` + `moduleDetection: "force"` — every file is a module and must transpile in isolation, as bundlers
|
|
85
|
+
- `isolatedModules` + `moduleDetection: "force"` — every file is a module and must transpile in isolation, as bundlers
|
|
86
|
+
require.
|
|
82
87
|
- `module: "ESNext"` + `moduleResolution: "bundler"` — modern ESM with bundler-style `exports`/`imports` resolution.
|
|
83
|
-
- `noEmit` — presets type-check only; emitting is your bundler's job (override in a build config if `tsc` emits for
|
|
88
|
+
- `noEmit` — presets type-check only; emitting is your bundler's job (override in a build config if `tsc` emits for
|
|
89
|
+
you).
|
|
84
90
|
- `forceConsistentCasingInFileNames` — catches import-path casing mismatches before they break case-sensitive CI.
|
|
85
91
|
|
|
86
92
|
## License
|
package/base.json
CHANGED
package/library-build.json
CHANGED