@syntopica/create-baseline 0.10.5 → 0.10.6

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
@@ -1,13 +1,14 @@
1
1
  # @syntopica/create-baseline
2
2
 
3
- Small CLI to print install commands and verify that your project lists the
4
- `@syntopica` baseline config packages (`eslint-config`, `prettier-config`,
5
- `tsconfig`, `quality-config`) and optionally checks for a flat ESLint config
6
- file and the quality-gate config files (`knip.config.ts`/`.js`, `lefthook.yml`,
7
- `renovate.json`).
3
+ CLI that adopts and audits the `@syntopica` quality baseline in a project. It
4
+ prints the install line for missing baseline packages, scaffolds the missing
5
+ quality-gate wiring (`--write`), and checks that every gate is actually wired
6
+ into what CI runs (`--check`, `--fix`).
8
7
 
9
- This CLI does not scaffold or copy files. It reports what's missing; you (or the
10
- closest template under `templates/*`) provide the file.
8
+ It does not create your ESLint, Prettier or TypeScript setup, and it never
9
+ touches source code. The generated scripts call the project's existing `lint`,
10
+ `type-check`, `format` and `test` scripts, so those must exist; copy them from
11
+ the closest template under `templates/*` if they do not.
11
12
 
12
13
  ## Requirements
13
14
 
@@ -18,30 +19,38 @@ closest template under `templates/*`) provide the file.
18
19
  Use via `pnpm dlx` / `npx` (no need to add as a dependency for one-off checks):
19
20
 
20
21
  ```bash
21
- pnpm dlx @syntopica/create-baseline@^0.1.0 --soft
22
+ pnpm dlx @syntopica/create-baseline --soft
22
23
  ```
23
24
 
24
25
  ## Usage
25
26
 
26
- | Flag | Behavior |
27
- | --------- | ----------------------------------------------------------------------------------------------------------------------- |
28
- | `--soft` | Print recommended `pnpm` / `npm` install lines (default if no other flag); also advises on missing config files |
29
- | `--check` | Exit non-zero if baseline packages are missing from `package.json` |
30
- | `--hard` | Like `--check`, and require `eslint.config.*` plus `knip.config.ts`/`.js`, `lefthook.yml`, and `renovate.json` to exist |
31
- | `--write` | Scaffold the quality-gate wiring this project is missing, then print what is still to install |
27
+ | Flag | Behavior |
28
+ | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29
+ | `--soft` | Print recommended `pnpm` / `npm` install lines (default if no other flag); also advises on missing config files |
30
+ | `--check` | Exit non-zero if baseline packages are missing, or if the gates are not wired: `--max-warnings 0`, every gate reachable from CI, a workflow on push, SHA-pinned actions, coverage thresholds, installed hooks, dependency ranges, tsconfig coverage |
31
+ | `--fix` | `--check`, then repair the mechanical findings it can |
32
+ | `--hard` | Like `--check`, and require `eslint.config.*` plus `knip.config.ts`/`.js`, `lefthook.yml`, and `renovate.json` to exist |
33
+ | `--write` | Scaffold the quality-gate wiring this project is missing, then print what is still to install |
32
34
 
33
- ### `--write`
35
+ A `--check` finding can be waived by id in `baseline.exceptions.json` with a
36
+ `reason` and an optional `expires` date, which is enforced. See the
37
+ [existing-repo guide](../../docs/adoption/existing-repo.md) for the full list.
34
38
 
35
- Writes `knip.config.ts`, `lefthook.yml`, `renovate.json` and
36
- `.dependency-cruiser.cjs` when they are absent, and adds the baseline scripts
37
- `package.json` does not already define. The knip preset is read off the
38
- project's dependencies, so a Tauri app gets `tauri` and a Nest service gets
39
- `nestjs`.
39
+ ### `--write`
40
40
 
41
- **Nothing that exists is overwritten.** A file already in the repo is the
42
- project's, however it got there, and a tuned knip config is exactly what an
43
- adopter spends time on; the same goes for a `lint` script scoped to `src`.
44
- Re-running is a no-op.
41
+ Writes `knip.config.ts`, `lefthook.yml`, `.oxlintrc.json`, `renovate.json`,
42
+ `.dependency-cruiser.cjs` and `.github/workflows/ci.yml` (running `check:ci`,
43
+ `check:quality` and `check:security`) when they are absent, and adds the
44
+ baseline scripts `package.json` does not already define. The workflow is not
45
+ added beside unrelated existing workflows; `--check` then reports what the
46
+ existing pipeline is missing. The knip preset is read off the project's
47
+ dependencies, so a Tauri app gets `tauri` and a Nest service gets `nestjs`.
48
+
49
+ **No existing file or script value is overwritten.** Missing scripts are added
50
+ to `package.json`, which rewrites that file's formatting; every other file
51
+ already in the repo is the project's, however it got there, and a tuned knip
52
+ config is exactly what an adopter spends time on; the same goes for a `lint`
53
+ script scoped to `src`. Re-running is a no-op.
45
54
 
46
55
  Two things the generated wiring cannot know and you should review before
47
56
  committing: `deps:graph` scopes itself to `src`, and a project with e2e specs or
@@ -1,9 +1,9 @@
1
1
  {
2
- "@syntopica/eslint-config": "^0.9.0",
2
+ "@syntopica/eslint-config": "^0.10.0",
3
3
  "@syntopica/prettier-config": "^0.3.0",
4
4
  "@syntopica/tsconfig": "^0.3.1",
5
- "@syntopica/quality-config": "^0.13.2",
6
- "eslint-plugin-code-policy": "^0.8.0",
5
+ "@syntopica/quality-config": "^0.14.0",
6
+ "eslint-plugin-code-policy": "^0.9.0",
7
7
  "dependency-cruiser": "^18.1.1",
8
8
  "jiti": "^2.7.0",
9
9
  "jscpd": "^5.0.14",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syntopica/create-baseline",
3
- "version": "0.10.5",
3
+ "version": "0.10.6",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "CLI to verify and adopt @syntopica baseline config packages",
@@ -39,7 +39,7 @@
39
39
  ],
40
40
  "devDependencies": {
41
41
  "@arethetypeswrong/cli": "^0.18.5",
42
- "@syntopica/eslint-config": "0.9.0",
42
+ "@syntopica/eslint-config": "0.10.0",
43
43
  "@vitest/coverage-v8": "^5.0.3",
44
44
  "eslint": "^10.12.0",
45
45
  "eslint-plugin-regexp": "^3.3.1",