ts-builds 3.3.0 → 3.4.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/.prettierignore CHANGED
@@ -6,6 +6,9 @@ dist
6
6
  lib
7
7
  coverage
8
8
 
9
+ # ts-builds lint sidecars (machine-generated JSON; no trailing-newline contract)
10
+ .ts-builds
11
+
9
12
  # Lock files
10
13
  pnpm-lock.yaml
11
14
  package-lock.json
package/README.md CHANGED
@@ -61,6 +61,7 @@ npx ts-builds format # Format with Prettier
61
61
  npx ts-builds format:check # Check formatting only
62
62
  npx ts-builds lint # Lint with ESLint (--fix)
63
63
  npx ts-builds lint:check # Check lint only
64
+ npx ts-builds lint:summary # Aggregate per-package lint totals (monorepo)
64
65
  npx ts-builds typecheck # TypeScript type checking
65
66
  npx ts-builds test # Run tests once
66
67
  npx ts-builds test:watch # Watch mode
@@ -201,6 +202,39 @@ npx ts-builds validate:core
201
202
  npx ts-builds validate:landing
202
203
  ```
203
204
 
205
+ ### Aggregating lint results across a monorepo
206
+
207
+ Under a task runner, `ts-builds` runs per-package, so each package's ESLint output
208
+ scrolls past and the repo-wide total is lost. Every `ts-builds lint` / `lint:check`
209
+ run writes a machine-readable sidecar at `.ts-builds/lint-report.json`;
210
+ `ts-builds lint:summary` reads those sidecars and prints one grand total with a
211
+ CI-gating exit code (nonzero if any package has errors or crashed). It **re-runs
212
+ nothing** — pure file reads of the last lint.
213
+
214
+ ```bash
215
+ turbo run lint --continue # lint every package (see --continue note below)
216
+ ts-builds lint:summary # print the aggregate total at the repo root
217
+ ```
218
+
219
+ Wire-up:
220
+
221
+ - **Declare the sidecar as a Turbo output** so cache hits still restore it and totals
222
+ stay correct without re-linting:
223
+ ```jsonc
224
+ // turbo.json
225
+ { "tasks": { "lint": { "outputs": [".ts-builds/**"] } } }
226
+ ```
227
+ - **Use `--continue`** for a full sweep. Turbo's default (`--continue=never`) cancels
228
+ all remaining tasks on the first failure, so without it a single failing package
229
+ hides every downstream package's issues. The exit code is still the max across tasks.
230
+ - **Gitignore `.ts-builds/`** in consuming repos.
231
+ - Packages configured with `lint.useProjectEslint: true` run through the consumer's
232
+ own ESLint and do **not** emit a sidecar, so they don't appear in the summary.
233
+
234
+ `ts-builds lint:summary [dir]` defaults to the current directory; pass a path to
235
+ aggregate a different root. Finding zero sidecars exits nonzero — an empty sweep
236
+ must not silently pass CI.
237
+
204
238
  ## Extendable Configs
205
239
 
206
240
  ts-builds exports base configurations you can extend:
package/dist/cli.js CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-builds",
3
- "version": "3.3.0",
3
+ "version": "3.4.1",
4
4
  "description": "Shared TypeScript configuration files for library templates. Provides standardized ESLint, Prettier, Vitest, TypeScript, and build configs.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -72,7 +72,7 @@
72
72
  "vitest": "^4.1.10"
73
73
  },
74
74
  "devDependencies": {
75
- "@types/node": "~26.1.2",
75
+ "@types/node": "~26.2.0",
76
76
  "rimraf": "^6.1.3",
77
77
  "tsdown": "^0.22.14"
78
78
  },