@homeflare/config 0.2.1 → 0.3.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 CHANGED
@@ -9,18 +9,22 @@ bun add -D @homeflare/config
9
9
 
10
10
  ## What it gives you
11
11
 
12
- | file | how to use it |
13
- | -------------------- | --------------------------------------- |
14
- | `tsconfig.base.json` | `extends` — apps and Workers |
15
- | `tsconfig.lib.json` | `extends` — packages that publish types |
16
- | `oxlintrc.json` | `extends` — 36 rules, 6 plugins |
17
- | `oxfmtrc.json` | copy to `.oxfmtrc.json` |
18
- | `bunfig.toml` | copy to `bunfig.toml` |
12
+ | file | how to use it |
13
+ | -------------------- | ------------------------------------------------ |
14
+ | `tsconfig.base.json` | `extends` — owned code, full strictness |
15
+ | `tsconfig.app.json` | `extends` — Worker apps (source-publishing deps) |
16
+ | `tsconfig.lib.json` | `extends` — packages that publish types |
17
+ | `oxlintrc.json` | `extends` — 36 rules, 6 plugins |
18
+ | `oxfmtrc.json` | copy to `.oxfmtrc.json` |
19
+ | `bunfig.toml` | copy to `bunfig.toml` |
19
20
 
20
21
  ## tsconfig
21
22
 
22
23
  ```jsonc
23
- // an app or a Worker
24
+ // a Worker or app that imports packages publishing .ts (not .d.ts)
25
+ { "extends": "@homeflare/config/tsconfig.app.json" }
26
+
27
+ // owned library code — the full baseline
24
28
  { "extends": "@homeflare/config/tsconfig.base.json" }
25
29
 
26
30
  // a package that publishes types
@@ -34,6 +38,12 @@ The base turns on `strict` plus the flags that catch the most runtime bugs:
34
38
  `noUncheckedIndexedAccess` (`arr[0]` is `T | undefined`), `exactOptionalPropertyTypes`,
35
39
  and `noFallthroughCasesInSwitch`.
36
40
 
41
+ ⚠️ **`tsconfig.app.json` turns three of those off.** `skipLibCheck` only skips `.d.ts`.
42
+ Measured 2026-09-16: `@cloudflare/ci@0.2.0` ships `"types": "./src/index.ts"`, and Better
43
+ Auth plugin types do the same. Those files typecheck under _your_ flags, so the strict
44
+ baseline fails the consumer. Use the app preset there; keep `base` / `lib` for code you
45
+ own. Override the flags back on in a project that does not import source-publishing deps.
46
+
37
47
  ## oxlint
38
48
 
39
49
  ```json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homeflare/config",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Shared tsconfig, oxlint and oxfmt configuration for HomeFlare projects.",
5
5
  "license": "MIT",
6
6
  "author": "Timothy Schneider",
@@ -14,6 +14,7 @@
14
14
  "src",
15
15
  "tsconfig.base.json",
16
16
  "tsconfig.lib.json",
17
+ "tsconfig.app.json",
17
18
  "oxlintrc.json",
18
19
  "oxfmtrc.json",
19
20
  "bunfig.toml",
@@ -24,6 +25,7 @@
24
25
  "exports": {
25
26
  "./tsconfig.base.json": "./tsconfig.base.json",
26
27
  "./tsconfig.lib.json": "./tsconfig.lib.json",
28
+ "./tsconfig.app.json": "./tsconfig.app.json",
27
29
  "./oxlintrc.json": "./oxlintrc.json",
28
30
  "./oxfmtrc.json": "./oxfmtrc.json",
29
31
  "./bunfig.toml": "./bunfig.toml",
@@ -0,0 +1,22 @@
1
+ {
2
+ // For a Worker or app that IMPORTS packages which publish TypeScript source.
3
+ //
4
+ // { "extends": "@homeflare/config/tsconfig.app.json" }
5
+ //
6
+ // ★ THE STRICT BASELINE STAYS. tsconfig.base.json and tsconfig.lib.json keep
7
+ // exactOptionalPropertyTypes, noImplicitOverride and noUncheckedIndexedAccess —
8
+ // they catch real bugs in code you own.
9
+ //
10
+ // ⛔ skipLibCheck CANNOT HELP HERE. It only skips .d.ts. Measured 2026-09-16:
11
+ // @cloudflare/ci@0.2.0 ships `"types": "./src/index.ts"`, and Better Auth plugin
12
+ // types do the same via a `dev-source` condition. Those files typecheck under
13
+ // THIS project's flags, so the three below fail the consumer, not the library.
14
+ //
15
+ // Override them back on in a project that does not import source-publishing deps.
16
+ "extends": "./tsconfig.base.json",
17
+ "compilerOptions": {
18
+ "exactOptionalPropertyTypes": false,
19
+ "noImplicitOverride": false,
20
+ "noUncheckedIndexedAccess": false
21
+ }
22
+ }