ts-builds 3.2.5 → 3.4.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/.prettierignore +3 -0
- package/README.md +39 -0
- package/dist/cli.js +0 -0
- package/package.json +2 -2
package/.prettierignore
CHANGED
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:
|
|
@@ -252,6 +286,11 @@ export default baseConfig
|
|
|
252
286
|
}
|
|
253
287
|
```
|
|
254
288
|
|
|
289
|
+
Opting in explicitly is still worth doing — it makes the style visible to your editor and to a
|
|
290
|
+
bare `prettier` run. But it is no longer required for `ts-builds format`: if the CLI finds no
|
|
291
|
+
prettier config in your project or any parent directory, it passes its own bundled config. A
|
|
292
|
+
config you do have always wins, including one inherited from a monorepo root.
|
|
293
|
+
|
|
255
294
|
### Vite (for SPAs)
|
|
256
295
|
|
|
257
296
|
```typescript
|
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
|
+
"version": "3.4.0",
|
|
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.
|
|
75
|
+
"@types/node": "~26.2.0",
|
|
76
76
|
"rimraf": "^6.1.3",
|
|
77
77
|
"tsdown": "^0.22.14"
|
|
78
78
|
},
|