@kyh/tsconfig 1.1.13 → 1.2.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 ADDED
@@ -0,0 +1,31 @@
1
+ # @kyh/tsconfig
2
+
3
+ Shared TypeScript configs.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add -D @kyh/tsconfig
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```jsonc
14
+ // tsconfig.json
15
+ {
16
+ "extends": "@kyh/tsconfig/base.json",
17
+ "include": ["src"]
18
+ }
19
+ ```
20
+
21
+ Configs:
22
+
23
+ - `base.json` — strict, `noUncheckedIndexedAccess`, bundler resolution, `noEmit`
24
+
25
+ `base.json` is the only config, and it's for **workspace packages and apps**. Point their
26
+ `exports` straight at source (`"." : "./src/index.ts"`) and give them no build step: tsserver
27
+ and the bundler both follow `exports` and read the `.ts`, so emitting `.d.ts` for them produces
28
+ artifacts nothing resolves.
29
+
30
+ Packages **published to npm** should not extend this at all — they inline their own tsconfig so
31
+ they build without depending on a shared workspace config.
package/base.json CHANGED
@@ -3,8 +3,8 @@
3
3
  "compilerOptions": {
4
4
  "esModuleInterop": true,
5
5
  "skipLibCheck": true,
6
- "target": "ES2022",
7
- "lib": ["ES2022"],
6
+ "target": "ES2023",
7
+ "lib": ["ES2023"],
8
8
  "allowJs": true,
9
9
  "resolveJsonModule": true,
10
10
  "moduleDetection": "force",
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@kyh/tsconfig",
3
- "version": "1.1.13",
4
- "publishConfig": {
5
- "access": "public"
6
- },
3
+ "version": "1.2.0",
7
4
  "files": [
8
5
  "*.json"
9
- ]
6
+ ],
7
+ "publishConfig": {
8
+ "access": "public"
9
+ }
10
10
  }
@@ -1,11 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "extends": "./base.json",
4
- "compilerOptions": {
5
- "declaration": true,
6
- "declarationMap": true,
7
- "emitDeclarationOnly": true,
8
- "noEmit": false,
9
- "outDir": "${configDir}/dist"
10
- }
11
- }