@carbonid1/tsconfig 0.1.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/README.md +34 -0
- package/base.json +20 -0
- package/electron.json +11 -0
- package/nextjs.json +11 -0
- package/package.json +18 -0
- package/react-library.json +10 -0
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# @carbonid1/tsconfig
|
|
2
|
+
|
|
3
|
+
Shared TypeScript configurations.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Install:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
pnpm add -D @carbonid1/tsconfig
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Extend in your `tsconfig.json`:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"extends": "@carbonid1/tsconfig/nextjs.json",
|
|
18
|
+
"compilerOptions": {
|
|
19
|
+
"paths": { "@/*": ["./src/*"] }
|
|
20
|
+
},
|
|
21
|
+
"include": ["**/*.ts", "**/*.tsx"]
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Available configs
|
|
26
|
+
|
|
27
|
+
| Config | Use for |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| `base.json` | Strict defaults only; no framework assumptions |
|
|
30
|
+
| `nextjs.json` | Next.js apps (JSX preserve, Next plugin, `noEmit`) |
|
|
31
|
+
| `react-library.json` | React libraries (emits `.d.ts` with maps) |
|
|
32
|
+
| `electron.json` | Electron main/preload processes (CommonJS, Node resolution) |
|
|
33
|
+
|
|
34
|
+
Each config extends `base.json`. Add project-specific options (paths, includes, excludes) in your own `tsconfig.json`.
|
package/base.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"display": "Base",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"target": "ES2017",
|
|
6
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
7
|
+
"module": "esnext",
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"strict": true,
|
|
10
|
+
"noUnusedLocals": true,
|
|
11
|
+
"noUnusedParameters": true,
|
|
12
|
+
"noUncheckedIndexedAccess": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"esModuleInterop": true,
|
|
15
|
+
"forceConsistentCasingInFileNames": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"resolveJsonModule": true,
|
|
18
|
+
"incremental": true
|
|
19
|
+
}
|
|
20
|
+
}
|
package/electron.json
ADDED
package/nextjs.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@carbonid1/tsconfig",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shared TypeScript configurations",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/carbonid1/packages",
|
|
8
|
+
"directory": "packages/tsconfig"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"author": "Andrew Korin",
|
|
12
|
+
"files": [
|
|
13
|
+
"*.json"
|
|
14
|
+
],
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
}
|
|
18
|
+
}
|