@syntopica/quality-config 0.11.1 → 0.12.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/PUBLIC_API.md CHANGED
@@ -56,9 +56,9 @@ file plus a runner rather than as a factory: the config is read in place, never
56
56
  copied into the consuming repo.
57
57
 
58
58
  `baseline-type-coverage` takes the directories to search and `--at-least <n>`, a
59
- repo-local floor for a project still climbing toward the shared threshold. It
60
- refuses a value above that threshold, so it can only lower the bar where one is
61
- needed, never raise or restate it.
59
+ repo-local bar: below the shared threshold for a project still climbing toward
60
+ it, above it to pin a project that has passed it (up to 100). It refuses a value
61
+ equal to the shared threshold, which would only restate it.
62
62
 
63
63
  `--also-ignore <patterns>` adds ignore patterns **on top of** the shared list.
64
64
  jscpd's own `--ignore` replaces that list instead, so without this a project
package/README.md CHANGED
@@ -7,7 +7,7 @@ files/exports/dependencies (knip), module boundaries and dependency cycles
7
7
 
8
8
  - **Public API (semver):** see [PUBLIC_API.md](./PUBLIC_API.md).
9
9
  - **Platform decisions:**
10
- [engineering-baseline/docs/platform-decisions.md](https://github.com/BusiRocket/engineering-baseline/blob/main/docs/platform-decisions.md).
10
+ [engineering-baseline/docs/platform-decisions.md](https://github.com/syntopica/codeality/blob/main/docs/platform-decisions.md).
11
11
 
12
12
  ## Requirements
13
13
 
@@ -12,12 +12,14 @@
12
12
  // to `any` is the point. `--strict` is on, so an `any` reached through a
13
13
  // generic argument counts as uncovered.
14
14
  //
15
- // `--at-least <n>` lowers the bar for one repo. It exists for adoption: a
16
- // codebase below the shared threshold cannot wire this gate at all otherwise,
17
- // so the choice is an unenforced gate or none. Freezing at the measured value
18
- // makes coverage a ratchet - it cannot fall - and the number in package.json
19
- // is the debt, visible in every diff that changes it. Raise it as the `any`s
20
- // go; never lower it to get green.
15
+ // `--at-least <n>` sets the bar for one repo. Below the shared threshold it
16
+ // exists for adoption: a codebase under it cannot wire this gate at all
17
+ // otherwise, so the choice is an unenforced gate or none. Freezing at the
18
+ // measured value makes coverage a ratchet - it cannot fall - and the number in
19
+ // package.json is the debt, visible in every diff that changes it. Raise it as
20
+ // the `any`s go; never lower it to get green. Above the shared threshold it
21
+ // pins a repo that has already climbed past it (to 100, say), so its coverage
22
+ // cannot slide back to the shared floor unnoticed.
21
23
  //
22
24
  // `--ignore-files <glob>` adds to the two exclusions above. Repeatable. It is
23
25
  // for generated or vendored code the project already excludes elsewhere -
@@ -27,6 +29,7 @@
27
29
  // baseline-type-coverage # every workspace under the cwd
28
30
  // baseline-type-coverage packages apps # only under these directories
29
31
  // baseline-type-coverage --at-least 97 # freeze below the shared bar
32
+ // baseline-type-coverage --at-least 100 # pin above it
30
33
  // baseline-type-coverage --ignore-files 'migrations/**'
31
34
  import { spawnSync } from 'node:child_process'
32
35
  import { existsSync, readdirSync, readFileSync } from 'node:fs'
@@ -74,10 +77,16 @@ if (atLeastIndex !== -1 && !/^\d+(?:\.\d+)?$/.test(override ?? '')) {
74
77
  )
75
78
  exit(1)
76
79
  }
77
- if (override !== undefined && Number(override) > Number(declared[1])) {
80
+ if (override !== undefined && Number(override) > 100) {
78
81
  console.error(
79
- `baseline-type-coverage: --at-least ${override} is above the shared ` +
80
- `threshold of ${declared[1]}. Drop the flag rather than restating it.`,
82
+ `baseline-type-coverage: --at-least ${override} is above 100 percent.`,
83
+ )
84
+ exit(1)
85
+ }
86
+ if (override !== undefined && Number(override) === Number(declared[1])) {
87
+ console.error(
88
+ `baseline-type-coverage: --at-least ${override} restates the shared ` +
89
+ `threshold. Drop the flag.`,
81
90
  )
82
91
  exit(1)
83
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syntopica/quality-config",
3
- "version": "0.11.1",
3
+ "version": "0.12.0",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "Shared configuration for cross-file quality gates: knip, dependency-cruiser, type-coverage, jscpd, lefthook",
@@ -73,11 +73,11 @@
73
73
  "devDependencies": {
74
74
  "@arethetypeswrong/cli": "^0.18.5",
75
75
  "@syntopica/eslint-config": "0.8.0",
76
- "@types/node": "^26.6.2",
77
- "dependency-cruiser": "^18.4.0",
76
+ "@types/node": "^26.6.3",
77
+ "dependency-cruiser": "^18.5.0",
78
78
  "eslint": "^10.11.0",
79
79
  "eslint-plugin-regexp": "^3.3.1",
80
- "knip": "^6.37.0",
80
+ "knip": "^6.39.0",
81
81
  "publint": "^0.3.24",
82
82
  "typescript": "npm:@typescript/typescript6@^6.0.2"
83
83
  },
package/src/knip.ts CHANGED
@@ -35,7 +35,7 @@ import { FRAMEWORK_ENTRIES, type KnipFramework } from './knip-framework'
35
35
  // `type-coverage`, `baseline-deps-graph` spawns `depcruise`. A project that
36
36
  // wires the runner into its scripts never names the underlying tool anywhere
37
37
  // knip can see, so knip reports a real dependency as unused. Found in
38
- // busirocket the moment its `type-coverage` script became
38
+ // a consumer the moment its `type-coverage` script became
39
39
  // `baseline-type-coverage`.
40
40
  //
41
41
  // `dependency-cruiser` is on the list even though a project calling