@zgeoff/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/LICENSE +21 -0
- package/README.md +29 -0
- package/base.json +18 -0
- package/package.json +33 -0
- package/react.json +8 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Geoff Whatley
|
|
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,29 @@
|
|
|
1
|
+
# @zgeoff/tsconfig
|
|
2
|
+
|
|
3
|
+
Shared strict TypeScript configs for Bun repos. Both configs extend
|
|
4
|
+
[`@tsconfig/strictest`](https://github.com/tsconfig/bases) and type-check only (`noEmit`): Bun or a
|
|
5
|
+
bundler runs the TypeScript, so `module` is `Preserve` and `moduleResolution` is `bundler`.
|
|
6
|
+
|
|
7
|
+
| Config | For | Adds to the base |
|
|
8
|
+
| ------------ | -------------------- | ------------------------------------------ |
|
|
9
|
+
| `base.json` | CLIs, services, libs | — |
|
|
10
|
+
| `react.json` | React apps and libs | the DOM libs and the automatic JSX runtime |
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add -d @zgeoff/tsconfig typescript
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```jsonc
|
|
19
|
+
{
|
|
20
|
+
"extends": "@zgeoff/tsconfig/base.json",
|
|
21
|
+
"compilerOptions": {
|
|
22
|
+
"types": ["bun"],
|
|
23
|
+
},
|
|
24
|
+
"include": ["src/**/*.ts"],
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Keep `include`, `exclude`, `rootDir` and `types` in the repo's own config: TypeScript resolves those
|
|
29
|
+
paths relative to the file that sets them, so a shared config cannot set them for you.
|
package/base.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://www.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "@tsconfig/strictest/tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"target": "ES2024",
|
|
6
|
+
"lib": ["ES2024"],
|
|
7
|
+
"module": "Preserve",
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"moduleDetection": "force",
|
|
10
|
+
"verbatimModuleSyntax": true,
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"allowSyntheticDefaultImports": true,
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"allowJs": true,
|
|
15
|
+
"skipDefaultLibCheck": true,
|
|
16
|
+
"noEmit": true
|
|
17
|
+
}
|
|
18
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zgeoff/tsconfig",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Shared strict TypeScript configs for Bun repos: a bundler-mode base and a React variant",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/zgeoff/tools.git",
|
|
9
|
+
"directory": "packages/tsconfig"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"base.json",
|
|
13
|
+
"react.json"
|
|
14
|
+
],
|
|
15
|
+
"type": "module",
|
|
16
|
+
"exports": {
|
|
17
|
+
"./base.json": "./base.json",
|
|
18
|
+
"./react.json": "./react.json"
|
|
19
|
+
},
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"typecheck": "tsc"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@tsconfig/strictest": "2.0.8"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/bun": "1.3.14",
|
|
31
|
+
"typescript": "7.0.1-rc"
|
|
32
|
+
}
|
|
33
|
+
}
|