@shivaedev/quality 0.66.0 → 0.67.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.
Files changed (162) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +6 -4
  3. package/dist/adapters/asymmetricMatcher.d.ts +3 -0
  4. package/dist/adapters/asymmetricMatcher.d.ts.map +1 -0
  5. package/dist/adapters/asymmetricMatcher.js +27 -0
  6. package/dist/adapters/asymmetricMatcher.js.map +1 -0
  7. package/dist/adapters/knip/configuration.d.ts.map +1 -1
  8. package/dist/adapters/knip/configuration.js +2 -1
  9. package/dist/adapters/knip/configuration.js.map +1 -1
  10. package/dist/adapters/pureReader.d.ts +3 -0
  11. package/dist/adapters/pureReader.d.ts.map +1 -0
  12. package/dist/adapters/pureReader.js +52 -0
  13. package/dist/adapters/pureReader.js.map +1 -0
  14. package/dist/adapters/readConfig.js +1 -1
  15. package/dist/adapters/readConfig.js.map +1 -1
  16. package/dist/adapters/scriptPaths.d.ts +2 -0
  17. package/dist/adapters/scriptPaths.d.ts.map +1 -0
  18. package/dist/adapters/scriptPaths.js +5 -0
  19. package/dist/adapters/scriptPaths.js.map +1 -0
  20. package/dist/adapters/specReaderSources.d.ts +7 -0
  21. package/dist/adapters/specReaderSources.d.ts.map +1 -0
  22. package/dist/adapters/specReaderSources.js +73 -0
  23. package/dist/adapters/specReaderSources.js.map +1 -0
  24. package/dist/cli/args.js +2 -2
  25. package/dist/cli/args.js.map +1 -1
  26. package/dist/cli/fix.d.ts +0 -1
  27. package/dist/cli/fix.d.ts.map +1 -1
  28. package/dist/cli/fix.js +1 -1
  29. package/dist/cli/fix.js.map +1 -1
  30. package/dist/cli/limits.d.ts +2 -0
  31. package/dist/cli/limits.d.ts.map +1 -0
  32. package/dist/cli/limits.js +2 -0
  33. package/dist/cli/limits.js.map +1 -0
  34. package/dist/cli/{options.d.ts → misplaced.d.ts} +1 -1
  35. package/dist/cli/misplaced.d.ts.map +1 -0
  36. package/dist/cli/{options.js → misplaced.js} +1 -1
  37. package/dist/cli/misplaced.js.map +1 -0
  38. package/dist/cli/program.js +1 -1
  39. package/dist/cli/program.js.map +1 -1
  40. package/dist/cli/subcommands.d.ts +2 -0
  41. package/dist/cli/subcommands.d.ts.map +1 -0
  42. package/dist/cli/subcommands.js +6 -0
  43. package/dist/cli/subcommands.js.map +1 -0
  44. package/dist/cli/{messages.d.ts → usage.d.ts} +1 -2
  45. package/dist/cli/usage.d.ts.map +1 -0
  46. package/{src/cli/messages.ts → dist/cli/usage.js} +1 -6
  47. package/dist/cli/usage.js.map +1 -0
  48. package/dist/config/defaultExtensions.d.ts +2 -0
  49. package/dist/config/defaultExtensions.d.ts.map +1 -0
  50. package/{src/config/constants.ts → dist/config/defaultExtensions.js} +1 -2
  51. package/dist/config/defaultExtensions.js.map +1 -0
  52. package/dist/config/file.d.ts +2 -0
  53. package/dist/config/file.d.ts.map +1 -0
  54. package/dist/config/file.js +2 -0
  55. package/dist/config/file.js.map +1 -0
  56. package/dist/config/load.js +1 -1
  57. package/dist/config/load.js.map +1 -1
  58. package/dist/hooks/install.js +1 -1
  59. package/dist/hooks/install.js.map +1 -1
  60. package/dist/imports/testComposition.d.ts +4 -0
  61. package/dist/imports/testComposition.d.ts.map +1 -0
  62. package/dist/imports/testComposition.js +38 -0
  63. package/dist/imports/testComposition.js.map +1 -0
  64. package/dist/naming/adapters/plainData.d.ts +5 -0
  65. package/dist/naming/adapters/plainData.d.ts.map +1 -0
  66. package/dist/naming/adapters/plainData.js +77 -0
  67. package/dist/naming/adapters/plainData.js.map +1 -0
  68. package/dist/naming/constantModule.d.ts +3 -0
  69. package/dist/naming/constantModule.d.ts.map +1 -0
  70. package/dist/naming/constantModule.js +25 -0
  71. package/dist/naming/constantModule.js.map +1 -0
  72. package/dist/naming/{migrationFile.d.ts → isMigrationFile.d.ts} +1 -1
  73. package/dist/naming/isMigrationFile.d.ts.map +1 -0
  74. package/dist/naming/{migrationFile.js → isMigrationFile.js} +1 -1
  75. package/dist/naming/isMigrationFile.js.map +1 -0
  76. package/dist/naming/ownExports.d.ts +0 -1
  77. package/dist/naming/ownExports.d.ts.map +1 -1
  78. package/dist/naming/ownExports.js +11 -25
  79. package/dist/naming/ownExports.js.map +1 -1
  80. package/dist/naming/packageTests.d.ts +7 -0
  81. package/dist/naming/packageTests.d.ts.map +1 -0
  82. package/dist/naming/packageTests.js +21 -0
  83. package/dist/naming/packageTests.js.map +1 -0
  84. package/dist/naming/testCode.d.ts +4 -0
  85. package/dist/naming/testCode.d.ts.map +1 -0
  86. package/dist/naming/testCode.js +46 -0
  87. package/dist/naming/testCode.js.map +1 -0
  88. package/dist/rules/comments/kinds.js +1 -1
  89. package/dist/rules/comments/kinds.js.map +1 -1
  90. package/dist/rules/files/namedAfterExport.d.ts.map +1 -1
  91. package/dist/rules/files/namedAfterExport.js +23 -11
  92. package/dist/rules/files/namedAfterExport.js.map +1 -1
  93. package/dist/rules/imports/manifest.d.ts.map +1 -1
  94. package/dist/rules/imports/manifest.js +9 -11
  95. package/dist/rules/imports/manifest.js.map +1 -1
  96. package/dist/rules/imports/noTestCode.d.ts.map +1 -1
  97. package/dist/rules/imports/noTestCode.js +13 -9
  98. package/dist/rules/imports/noTestCode.js.map +1 -1
  99. package/dist/rules/maxLines.d.ts.map +1 -1
  100. package/dist/rules/maxLines.js +7 -2
  101. package/dist/rules/maxLines.js.map +1 -1
  102. package/dist/rules/stories/specHelpers.d.ts.map +1 -1
  103. package/dist/rules/stories/specHelpers.js +8 -4
  104. package/dist/rules/stories/specHelpers.js.map +1 -1
  105. package/dist/rules/suppressions/{directives.d.ts → in.d.ts} +1 -1
  106. package/dist/rules/suppressions/in.d.ts.map +1 -0
  107. package/dist/rules/suppressions/{directives.js → in.js} +1 -1
  108. package/dist/rules/suppressions/in.js.map +1 -0
  109. package/dist/rules/suppressions/noInline.js +1 -1
  110. package/dist/rules/suppressions/noInline.js.map +1 -1
  111. package/dist/rules/test-names/colocated.d.ts.map +1 -1
  112. package/dist/rules/test-names/colocated.js +7 -4
  113. package/dist/rules/test-names/colocated.js.map +1 -1
  114. package/dist/rules/test-names/follow.d.ts.map +1 -1
  115. package/dist/rules/test-names/follow.js +13 -6
  116. package/dist/rules/test-names/follow.js.map +1 -1
  117. package/package.json +3 -3
  118. package/src/adapters/asymmetricMatcher.ts +33 -0
  119. package/src/adapters/knip/configuration.ts +2 -5
  120. package/src/adapters/pureReader.ts +56 -0
  121. package/src/adapters/readConfig.ts +1 -1
  122. package/src/adapters/scriptPaths.ts +5 -0
  123. package/src/adapters/specReaderSources.ts +77 -0
  124. package/src/cli/args.ts +2 -2
  125. package/src/cli/fix.ts +1 -2
  126. package/src/cli/limits.ts +1 -0
  127. package/src/cli/program.ts +1 -1
  128. package/src/cli/subcommands.ts +5 -0
  129. package/{dist/cli/messages.js → src/cli/usage.ts} +0 -6
  130. package/{dist/config/constants.js → src/config/defaultExtensions.ts} +0 -2
  131. package/src/config/file.ts +1 -0
  132. package/src/config/load.ts +1 -1
  133. package/src/hooks/install.ts +1 -1
  134. package/src/imports/testComposition.ts +47 -0
  135. package/src/naming/adapters/plainData.ts +88 -0
  136. package/src/naming/constantModule.ts +28 -0
  137. package/src/naming/ownExports.ts +11 -28
  138. package/src/naming/packageTests.ts +24 -0
  139. package/src/naming/testCode.ts +62 -0
  140. package/src/rules/comments/kinds.ts +1 -1
  141. package/src/rules/files/namedAfterExport.ts +28 -11
  142. package/src/rules/imports/manifest.ts +18 -10
  143. package/src/rules/imports/noTestCode.ts +13 -12
  144. package/src/rules/maxLines.ts +7 -3
  145. package/src/rules/stories/specHelpers.ts +14 -4
  146. package/src/rules/suppressions/noInline.ts +1 -1
  147. package/src/rules/test-names/colocated.ts +7 -4
  148. package/src/rules/test-names/follow.ts +13 -6
  149. package/dist/cli/messages.d.ts.map +0 -1
  150. package/dist/cli/messages.js.map +0 -1
  151. package/dist/cli/options.d.ts.map +0 -1
  152. package/dist/cli/options.js.map +0 -1
  153. package/dist/config/constants.d.ts +0 -3
  154. package/dist/config/constants.d.ts.map +0 -1
  155. package/dist/config/constants.js.map +0 -1
  156. package/dist/naming/migrationFile.d.ts.map +0 -1
  157. package/dist/naming/migrationFile.js.map +0 -1
  158. package/dist/rules/suppressions/directives.d.ts.map +0 -1
  159. package/dist/rules/suppressions/directives.js.map +0 -1
  160. /package/src/cli/{options.ts → misplaced.ts} +0 -0
  161. /package/src/naming/{migrationFile.ts → isMigrationFile.ts} +0 -0
  162. /package/src/rules/suppressions/{directives.ts → in.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.67.0 - 2026-11-06
4
+
5
+ ### Fixed
6
+
7
+ - Classify package-owned `test/` trees beside `src/` and private workspace packages consumed only by tests as development code for dependency, test-import and line-limit checks. Production consumers keep composition packages in the production boundary.
8
+ - Recognise package-owned test suites as covering their package's source tree, and allow pure matchers and readers beside specs while keeping setup and action helpers in story kits.
9
+
10
+ ### Breaking
11
+
12
+ - Name plain-data constants modules in camelCase for words every constant shares, or use `limits.ts` for max/min/limit constants and `defaults.ts` for default constants. Rename single-constant PascalCase files such as `ProfileKey.ts` to `profileKey.ts`; split unrelated constants or group heterogeneous copy in one named record. Rename files whose names came from a private constant or an extra constant beside their one other runtime export to match that export. The same rules apply to test-support kits; computed values, schemas, Layers and functions do not count as constants.
13
+ - Direct module imports move from `config/constants.ts` to `config/file.ts` or `config/defaultExtensions.ts`, from `cli/messages.ts` to `cli/usage.ts` or `cli/subcommands.ts`, from `cli/options.ts` to `cli/misplaced.ts`, from `naming/migrationFile.ts` to `naming/isMigrationFile.ts`, and from `rules/suppressions/directives.ts` to `rules/suppressions/in.ts`. Import `MAX_FIX_ROUNDS` from `cli/limits.ts` instead of `cli/fix.ts`.
14
+
3
15
  ## 0.66.0 - 2026-11-05
4
16
 
5
17
  ### Breaking
package/README.md CHANGED
@@ -267,6 +267,8 @@ Tooling is server code in every package, including the workspace root: files und
267
267
 
268
268
  The manifest owns ordinary workspace dependencies. An **application** is a package whose manifest depends on `@shivaedev/platform`, the dependency shell that brings every runtime piece of the ShivaeDev framework. It imports each piece by its own name without listing it: `imports/manifest` and the `biome` rule's undeclared-dependency check count an import as declared when an entry point the application declares lists the piece among its dependencies. `@shivaedev/platform` is the entry point for any code and `@shivaedev/test-story` for test code, tooling and test support only. When a private package's import would be covered by an entry point it lacks, the finding names the entry point to add. `manifests/application` asks an application for `publicHoistPattern: ["@shivaedev/*"]` in the nearest `pnpm-workspace.yaml`, searching upward from the package, because pnpm does not link the pieces where the application can resolve them otherwise. It also rejects a dependency entry beside the entry point that already brings it, such as `@shivaedev/sql` beside `@shivaedev/platform`, and names the entry to remove. A library never depends on platform, so it declares every piece it imports.
269
269
 
270
+ Quality classifies a package's own `test/**` tree beside `src/` as test code for `imports/manifest`, `imports/no-test-code` and `structure/max-lines`. Helpers there may use development dependencies and the test line cap, while production imports of those helpers still fail. A private workspace package is test composition when it is reached from tests and every external consumer is test code or another test-composition package. Package names and paths do not determine this role. Published packages, packages with a `bin` entry or a source or built module named in a non-test script, and private packages without test consumers remain production code; any production consumer, including a type import, restores production classification through the composition chain. Scripts named `test` or `test:*` remain test entry points.
271
+
270
272
  When a package promises more, put `quality.fences.config.ts` beside its `package.json`, exporting an array of fences as the default. Quality discovers this file at the repository root and in workspace packages, even when `sources` includes only their source folders. The root config does not list boundary files.
271
273
 
272
274
  A **fence** is a prohibition on imports, with a reason and one illegal and one legal example. Quality validates all discovered fences together, so duplicate names or contradictory examples stop the run. An unreadable file or invalid default export also stops the run. The `imports/fences` rule checks them with Quality's shared import graph, resolver and report.
@@ -327,7 +329,7 @@ Every package tests its real engine through its own story kit, so setup and acti
327
329
 
328
330
  Quality's `tests/story-setup` rule reports top-level test functions named with the words `seed`, `make`, `build` or `setup`, and fixture-writing calls imported from Node's `fs` or `fs/promises`. It leaves source and `test-support/` files alone. This is a check for those syntax patterns; a passing test file still needs review of what it tests.
329
331
 
330
- Specs keep expectations visible. `tests/spec-helpers` moves all module-level helper functions out of specs and into the kit; `tests/no-expect-in-support` moves `expect` calls into the spec, except in test-support files that register tests at module top level and are not imported by any module, so nested Vitest runs can execute them as test files with real assertions. `tests/named-values` rejects numeric literals passed to `toBe` or `toHaveLength` in specs, except zero and process exit codes asserted on an `exitCode` subject: assert the observed items or use a domain name that comes from the story's inputs or the product. For HTTP statuses, import `* as HttpStatus` from `effect/http/HttpStatus` and use `HttpStatus.fromLiteral("NotFound")`; subjects named `status` or `code` do not exempt numeric assertions. A spec-local numeric const that only feeds these matchers is reported, including aliases for zero and codes. `tests/no-limit-imports` rejects importing `MAX_*` constants from a `limits` module into specs, so a story proves behavior instead of copying an implementation cap.
332
+ Specs keep expectations visible. `tests/spec-helpers` keeps setup and action helpers in the kit; pure matchers and readers may stay beside their specs. It recognises property reads and non-mutating methods that TypeScript resolves to native collections and strings, and Vitest’s imported asymmetric matcher factories such as `expect.objectContaining`. It still reports mutation, asynchronous work and unknown calls; `tests/no-expect-in-support` moves `expect` calls into the spec, except in test-support files that register tests at module top level and are not imported by any module, so nested Vitest runs can execute them as test files with real assertions. `tests/named-values` rejects numeric literals passed to `toBe` or `toHaveLength` in specs, except zero and process exit codes asserted on an `exitCode` subject: assert the observed items or use a domain name that comes from the story's inputs or the product. For HTTP statuses, import `* as HttpStatus` from `effect/http/HttpStatus` and use `HttpStatus.fromLiteral("NotFound")`; subjects named `status` or `code` do not exempt numeric assertions. A spec-local numeric const that only feeds these matchers is reported, including aliases for zero and codes. `tests/no-limit-imports` rejects importing `MAX_*` constants from a `limits` module into specs, so a story proves behavior instead of copying an implementation cap.
331
333
 
332
334
  Three more rules keep a spec readable as a story, as the [story-testing skill](https://github.com/ShivaeDev/platform/blob/main/packages/skills/skills/story-testing/SKILL.md) describes. Together with `tests/spec-helpers`, `tests/named-values` and `tests/no-limit-imports`, they read files whose test declarations trace to a story kit, whatever their suffix: a `.test` or `.spec` file outside `test-support` that is not a type or unit test, such as `orders.spec.ts`, `pane.dom.test.ts` or `orders.slow.test.ts`. The suffix says where a test sits under `tests/follow`, not whether it is a story, and `tests/story-specs` already holds every such file to the story kit. They exempt the same test-story prerequisites as `tests/story-specs`. `tests/domain-outcomes` reports each use of Effect's `Exit`, `Cause` or `Result` module, each `_tag` read or destructuring, and each object literal tagged `"Success"` or `"Failure"`: the kit's verb or readout returns the outcome in the domain's words, such as `"unauthorized"`, and a trait builds any failing input. A domain's own tagged value, such as `{ _tag: "Resync" }`, passes. `tests/grouped-outcomes` reports each run of two or more consecutive `expect(yield* …)` statements once, at its first statement: write the outcomes as rows of one `outcomes` call.
333
335
 
@@ -422,11 +424,11 @@ For adoption, run `quality baseline write --rule code/unused --file src/legacy.t
422
424
  - **Hidden casts:** `suppressions/no-double-cast` also checks code outside `adapters/` and `test-support/` for concrete annotations on `JSON.parse` results, unchecked `Reflect.get` bindings, SQL tagged-template row generics, identity overloads whose implementation returns `unknown`, context retagging through `Context.makeUnsafe(...mapUnsafe)`, and writes to readonly properties or native Scope state. Keep untrusted values as `unknown` and decode them with `Schema.decodeUnknownEffect`; decode SQL rows with `SqlSchema` rather than declaring their shape. Give an identity implementation its declared return type, preserve the Context service type, and use native constructors or lifecycle operations instead of changing native fields. Constructor initialization, mutable object writes and extensions that do not replace readonly fields are accepted. These checks read syntax and TypeScript declarations; they do not prove that arbitrary helper functions validate their input.
423
425
  - **Suppressions:** the `suppressions/*` rules reject inline lint and compiler directives, casts through `unknown`, `any` or `never`, Biome settings that weaken a check, recommended Biome rules the preset leaves below `error`, and `ignoreDeprecations`. None of them takes exceptions. A type test (`*.typecheck.test.ts`) may use `@ts-expect-error`; a test that must pass a rejected value at run time calls the API through `Reflect.apply`.
424
426
  - **Imports:** cycles, unresolvable imports, workspace imports missing from the manifest or an entry point, relative imports that leave their folder (except a module’s client or server `registration.ts` or `registration.tsx` importing its own `<module>/admin/` subtree), production imports of test code, runtime folders and fences, as described above.
425
- - **Names and files:** the Biome preset's naming rules and plugins, and the `files/*` rules, which name a file after its main export with its folders as the prefix. `files/named-after-export` accepts a file named after its single exported constant, such as `liveQueryWindow.ts` exporting `const liveQueryWindow`. It keeps the export’s full name while the file name omits words already supplied by any folder above it. In `spaces/client/`, a component exporting `CreateSpace` lives in `Create.tsx`: `spaces/` supplies “Space” even across the intervening `client/` folder. Keep the export named `CreateSpace`; `CreateSpace.tsx` would repeat a folder name. Inside a module’s `client/admin/` or `server/admin/` subtree, file names may repeat words from above `admin/`: `src/modules/inbox/client/admin/inboxRoutes.ts` may export `inboxRoutes`. Names must still match their exports and omit words repeated by folders within the admin subtree. No naming rule renames anything; the author picks the name. A name an outside system owns, such as a query parameter or an environment variable, is written as a quoted key, which the naming rules skip. A `Schema.Struct` field stays camelCase even when quoted and maps to the outside name with `Schema.encodeKeys`. Biome's naming messages print only a pattern: spell acronyms as words (`HttpClient`, `userId`, `parseUrl`) rather than turning off `strictCase` as its hint suggests, give a type no `I` prefix, and name a type parameter `T`, `T` plus a PascalCase name (`TItem`), or Effect's `A`, `E` and `R`. No rule checks these, so review does: a boolean reads as a question (`isOpen`, `canRetry`) unless the DOM or React names it (`open`, `disabled`); a schema shares its name with its type (`type Item = typeof Item.Type`); an unused parameter is removed rather than renamed with the `_` prefix TypeScript accepts. The naming rules take repository facts: `toolOwned` lists `.gitignore` patterns whose names a tool fixes, and a configured list extends the rule's defaults, so list only repository-specific additions; `content` lists snake_case content folders and files; `tests/follow` and `tests/colocated` take `suites` for test folders with their own layout, such as a Playwright suite.
427
+ - **Names and files:** the Biome preset's naming rules and plugins, and the `files/*` rules, which name a file after its main export with its folders as the prefix. `files/named-after-export` names a constants module in camelCase for what its exported data shares: `maxItems.ts` exports `MAX_ITEMS`, `timeouts.ts` holds `INSPECT_TIMEOUT_MILLIS` and `REMOTE_TIMEOUT_MILLIS`, `limits.ts` holds constants carrying max, min or limit, and `defaults.ts` holds constants carrying default. Each constant must carry every word of the module name, singular or plural; split unrelated constants or put heterogeneous copy in a single exported record named after itself. Only literal data, arrays and objects of it, and CONSTANT_CASE references count, with types derived from those constants allowed. Schemas, Layers, services, Effects, functions, classes and computed values stay runtime exports. One remaining runtime export names the file even beside constants; two or more use a camelCase topic file. Private constants do not name a file. The same model applies in `src/test-support`. It keeps the export’s full name while the file name omits words already supplied by any folder above it. In `spaces/client/`, a component exporting `CreateSpace` lives in `Create.tsx`: `spaces/` supplies “Space” even across the intervening `client/` folder. Keep the export named `CreateSpace`; `CreateSpace.tsx` would repeat a folder name. Inside a module’s `client/admin/` or `server/admin/` subtree, file names may repeat words from above `admin/`: `src/modules/inbox/client/admin/inboxRoutes.ts` may export `inboxRoutes`. Names must still match their exports and omit words repeated by folders within the admin subtree. No naming rule renames anything; the author picks the name. A name an outside system owns, such as a query parameter or an environment variable, is written as a quoted key, which the naming rules skip. A `Schema.Struct` field stays camelCase even when quoted and maps to the outside name with `Schema.encodeKeys`. Biome's naming messages print only a pattern: spell acronyms as words (`HttpClient`, `userId`, `parseUrl`) rather than turning off `strictCase` as its hint suggests, give a type no `I` prefix, and name a type parameter `T`, `T` plus a PascalCase name (`TItem`), or Effect's `A`, `E` and `R`. No rule checks these, so review does: a boolean reads as a question (`isOpen`, `canRetry`) unless the DOM or React names it (`open`, `disabled`); a schema shares its name with its type (`type Item = typeof Item.Type`); an unused parameter is removed rather than renamed with the `_` prefix TypeScript accepts. The naming rules take repository facts: `toolOwned` lists `.gitignore` patterns whose names a tool fixes, and a configured list extends the rule's defaults, so list only repository-specific additions; `content` lists snake_case content folders and files; `tests/follow` and `tests/colocated` take `suites` for test folders with their own layout, such as a Playwright suite.
426
428
  - **Change keys:** `boundaries/imported-change-keys` reports literal collection and bucket names in Reactivity invalidations and mutations, SQL `invalidateOnCommit`, and the `changes` key encoders. Import the owning declaration and use its name, list, item or bucket key. Literal record IDs and bucket values are accepted, as are names at their collection declaration.
427
429
  - **SQL transactions:** `effect/sql-transact` reports native `sql.withTransaction` calls around repository writes, `transact` or `invalidateOnCommit`. Begin the outer transaction with `transact(effect, { onSqlError })` so changed keys follow its commit. The rule resolves native SQL and repository declarations and follows direct calls, pipes, local aliases and source helpers. Native read-only and raw SQL transactions and unrelated transaction methods remain supported.
428
430
  - **React:** `react/jsx-conditionals` reports `&&` and ternaries in the JSX children a component returns, including nested decisions and returned `.map` items. Decisions in a `const` above the return, JSX built inside library callbacks and conditional attributes are accepted. A ternary with two plain string or number literal branches, such as `{on ? "On" : "Off"}`, is accepted; branches that select JSX, components or computed values still need a decision before the JSX. This rule owns the check, so the shared Biome preset leaves `noLeakedRender` off.
429
- - **Tests:** `tests/follow` and `tests/colocated` keep a test beside the code it covers, named `<file>[.<modifier>].test.ts` or `<behaviour>[.<modifier>].spec.ts` with at most one modifier of `dom`, `slow`, `typecheck` and `unit`; a unit test runs without the DOM, so `.unit.dom` is rejected. `tests/colocated` always treats `__tests__/` as a test folder. It treats `test/`, `tests/` and `spec/` as test folders only when their directly contained checked files are all tests or test support; a product folder with source beside its specs is an ordinary source folder. Declared `suites` keep their own layout. Shared test support belongs in `test-support/`, the sanctioned test-only folder. A test covering a whole module may sit at its root or directly beside its folder. The story rules above keep setup in the kit.
431
+ - **Tests:** `tests/follow` and `tests/colocated` keep a test beside the code it covers, named `<file>[.<modifier>].test.ts` or `<behaviour>[.<modifier>].spec.ts` with at most one modifier of `dom`, `slow`, `typecheck` and `unit`; a unit test runs without the DOM, so `.unit.dom` is rejected. A package-owned `test/` tree beside its `src/` is an accepted suite: `.test` files follow the corresponding `src/` path, and `.spec` files name behaviours there. This works for workspace members and standalone packages. Outside those trees, `tests/colocated` always treats `__tests__/` as a test folder. It treats `test/`, `tests/` and `spec/` as test folders only when their directly contained checked files are all tests or test support; a product folder with source beside its specs is an ordinary source folder. Declared `suites` keep their own layout. Shared test support belongs in `test-support/`, the sanctioned test-only folder. A test covering a whole module may sit at its root or directly beside its folder. The story rules above keep setup in the kit.
430
432
  - **Manifests:** `manifests/valid` decodes every repository `package.json` through one shared Schema before dependent rules run and reports each invalid manifest once with its file path. An unreadable manifest or one removed after discovery becomes a `manifests/valid` finding. Optional lookups still treat `NotFound` as absence. `manifests/sorted` keeps every `package.json` in sort-package-json order, and `manifests/source-first` puts the `@shivaedev/source` or `source` condition first in `exports` and `imports`. `manifests/exports-shape` checks the package root and workspace members. They use one file-preserving TypeScript wildcard: for example, `./*.ts` maps to `./src/*.ts`, `./dist/*.d.ts` and `./dist/*.js` under `@shivaedev/source` (or an application’s own `source`), `types` and `default`. Packages with `"private": true` may instead map the wildcard directly to source (`"./*.ts": "./src/*.ts"`); published packages require the full source, types and default conditions. A subtree pattern such as `./server/*.ts` keeps that same subtree in its targets. An optional root entry and exact-path non-code assets such as JSON presets and `./package.json` are allowed. Every module remains importable; `null` export entries fail with a request to remove the block. A package without modules, such as a dependency shell, exports only exact assets and needs no wildcard. Import each module at its path under `src/`; named aliases, flattened paths, per-file module lists and additional wildcards fail. When declared, the standard imports must preserve their roots: `#*.ts` maps directly to `./src/*.ts` or uses `@shivaedev/source` (or an application’s own `source`) `./src/*.ts`, types `./dist/*.d.ts` and default `./dist/*.js`; `#test/*` maps to `./src/test-support/*`. Include subfolders in specifiers, such as `#server/module.ts`. Other aliases are allowed. `manifests/application` keeps an application on its entry points, as described above.
431
433
  - **Biome:** the `biome` rule reports Biome's error findings as `biome/<category>`. A Biome run that fails without an error finding, such as one whose config leaves no file to check, fails lint and fix with Biome's message. The preset leaves out the `.worktrees` folder at the root, so a checkout does not lint its linked worktrees, while a worktree inside it lints all of its own files. The preset's plugins ban ambient time, randomness, `console` and `process.env` in favour of Effect's services.
432
434
 
@@ -712,4 +714,4 @@ export default defineConfig({
712
714
  Quality merges the Biome settings at lint and fix time; do not add or mirror an override in `biome.json`. Files are explicit repository paths. Biome exceptions cover individual lint rules or assist actions; whole checks, rule groups and globs are rejected. `biome/files/includes` is the directory exclusion form: keep `**` and list negative patterns naming directories, such as `!**/test-support/generated`. Quality's shipped exceptions are part of its internal policy. [Exceptions and upgrades](https://github.com/ShivaeDev/platform/blob/main/packages/quality/docs/debt-and-hooks.md#exceptions) describes subjects, stale entries and the upgrade command.
713
715
  - The source inventory and Biome have their own scopes. `quality fix` runs Biome from the config's folder; it is not restricted to the source-rule inventory.
714
716
  - The installed hook checks files on disk, not only what is staged, and uses each committing worktree's config and dependencies. Installation sets repository-local `core.hooksPath`; the hook chains an executable global pre-commit hook without changing global configuration. Either hook's failure blocks the commit. `quality hooks status` reports when git's effective hooks path does not run Quality.
715
- - Workspace imports require a declaration in the importing package’s `dependencies`, `peerDependencies` or `optionalDependencies`. Tests, `test-support`, package-root tooling folders (`script`, `scripts`, `tooling`) and package-root config files may also use `devDependencies`. Executables and public modules keep their imports in the runtime boundary.
717
+ - Workspace imports require a declaration in the importing package’s `dependencies`, `peerDependencies` or `optionalDependencies`. Tests, `test-support`, package-owned `test/` trees beside `src/`, private test-composition packages, package-root tooling folders (`script`, `scripts`, `tooling`) and package-root config files may also use `devDependencies`. Executables and public modules keep their imports in the runtime boundary.
@@ -0,0 +1,3 @@
1
+ import ts from "typescript";
2
+ export declare function asymmetricMatcher(call: ts.CallExpression, checker: ts.TypeChecker): boolean;
3
+ //# sourceMappingURL=asymmetricMatcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asymmetricMatcher.d.ts","sourceRoot":"","sources":["../../src/adapters/asymmetricMatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AA6B5B,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,EAAE,OAAO,EAAE,EAAE,CAAC,WAAW,GAAG,OAAO,CAG3F"}
@@ -0,0 +1,27 @@
1
+ import ts from "typescript";
2
+ import { importFrom } from "#rules/stories/importOrigin.ts";
3
+ import { unwrapped } from "#rules/stories/syntax.ts";
4
+ const MATCHERS = new Set(["any", "anything", "arrayContaining", "objectContaining", "stringContaining", "stringMatching"]);
5
+ function importedExpect(node, checker) {
6
+ const value = unwrapped(node);
7
+ if (ts.isPropertyAccessExpression(value) && value.name.text === "not") {
8
+ return importedExpect(value.expression, checker);
9
+ }
10
+ const namespace = ts.isPropertyAccessExpression(value) && value.name.text === "expect";
11
+ const receiver = namespace ? value.expression : value;
12
+ if (!ts.isIdentifier(receiver)) {
13
+ return false;
14
+ }
15
+ return (checker.getSymbolAtLocation(receiver)?.declarations?.some((declaration) => {
16
+ const from = importFrom(declaration);
17
+ return ((from === "vitest" || from === "@effect/vitest")
18
+ && (namespace
19
+ ? ts.isNamespaceImport(declaration)
20
+ : ts.isImportSpecifier(declaration) && (declaration.propertyName ?? declaration.name).text === "expect"));
21
+ }) === true);
22
+ }
23
+ export function asymmetricMatcher(call, checker) {
24
+ const target = unwrapped(call.expression);
25
+ return ts.isPropertyAccessExpression(target) && MATCHERS.has(target.name.text) && importedExpect(target.expression, checker);
26
+ }
27
+ //# sourceMappingURL=asymmetricMatcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asymmetricMatcher.js","sourceRoot":"","sources":["../../src/adapters/asymmetricMatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAE3H,SAAS,cAAc,CAAC,IAAmB,EAAE,OAAuB;IACnE,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAI,EAAE,CAAC,0BAA0B,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;QACvE,OAAO,cAAc,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IACD,MAAM,SAAS,GAAG,EAAE,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,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAsB3C,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,GAAE,SAAS,MAAM,EAAO;;;;;;;;;;;;;;;;;;;;;;;;;yBAqC/E,MAAM;;;;GAqBnB"}
1
+ {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../src/adapters/knip/configuration.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAsB3C,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,GAAE,SAAS,MAAM,EAAO;;;;;;;;;;;;;;;;;;;;;;;;;yBAiC/E,MAAM;;;;GAqBnB"}
@@ -1,5 +1,6 @@
1
1
  import { posix } from "node:path";
2
2
  import { readPackageManifest } from "#adapters/manifestInventory.ts";
3
+ import { scriptPaths } from "#adapters/scriptPaths.ts";
3
4
  import { exportedModule, exportTargets } from "#imports/packageExports.ts";
4
5
  import { packageOf, workspacePackages } from "#imports/workspace.ts";
5
6
  import { SHADCN_FILE_GLOB } from "#inventory/shadcnFiles.ts";
@@ -26,7 +27,7 @@ export async function knipConfiguration(inputs, toolOwned = []) {
26
27
  const manifest = (await readPackageManifest(inputs.readText, posix.join(directory, "package.json"))) ?? {};
27
28
  return { directory, manifest };
28
29
  }));
29
- const scripted = new Set(manifests.flatMap(({ directory, manifest }) => Object.values(manifest.scripts ?? {}).flatMap((script) => script.split(/[\s'"`;|&()]+/u).map((word) => posix.join(directory, word)))));
30
+ const scripted = new Set(manifests.flatMap(({ directory, manifest }) => scriptPaths(directory, manifest.scripts ?? {})));
30
31
  const workspaces = manifests.map(({ directory, manifest }) => {
31
32
  const sources = inputs.sources
32
33
  .filter(({ path }) => (packageOf(packages, path)?.directory ?? ".") === directory)
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/adapters/knip/configuration.ts"],"names":[],"mappings":"AAAA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E,EAAE;QACtB,uBAAuB,EAAE,KAAK;QAC9B,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,EAAE;QAChB,aAAa,EAAE,EAAE;QACjB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,OAAO,EAAE,WAAW;QACpB,mBAAmB,EAAE,KAAK;QAC1B,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;QACrE,IAAI,EAAE,EAAE;QACR,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC;KAC1C,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import ts from "typescript";
2
+ export declare function pureReader(name: ts.Node, readCall: (call: ts.CallExpression) => boolean): boolean;
3
+ //# sourceMappingURL=pureReader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pureReader.d.ts","sourceRoot":"","sources":["../../src/adapters/pureReader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAoC5B,wBAAgB,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,KAAK,OAAO,GAAG,OAAO,CAmBjG"}
@@ -0,0 +1,52 @@
1
+ import ts from "typescript";
2
+ import { unwrapped } from "#rules/stories/syntax.ts";
3
+ function functionOf(name) {
4
+ const declaration = name.parent;
5
+ if (ts.isFunctionDeclaration(declaration)) {
6
+ return declaration;
7
+ }
8
+ const value = ts.isVariableDeclaration(declaration) ? declaration.initializer : undefined;
9
+ const node = value === undefined ? undefined : unwrapped(value);
10
+ return node !== undefined && (ts.isArrowFunction(node) || ts.isFunctionExpression(node)) ? node : undefined;
11
+ }
12
+ function action(node, readCall) {
13
+ if (((ts.isArrowFunction(node) || ts.isFunctionExpression(node) || ts.isFunctionDeclaration(node))
14
+ && (node.asteriskToken !== undefined || node.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.AsyncKeyword)))
15
+ || ts.isJsxElement(node)
16
+ || ts.isJsxSelfClosingElement(node)
17
+ || ts.isJsxFragment(node)
18
+ || ts.isAwaitExpression(node)
19
+ || ts.isYieldExpression(node)
20
+ || ts.isNewExpression(node)
21
+ || ts.isThrowStatement(node)
22
+ || ts.isDeleteExpression(node)
23
+ || ts.isPostfixUnaryExpression(node)
24
+ || (ts.isPrefixUnaryExpression(node) && [ts.SyntaxKind.PlusPlusToken, ts.SyntaxKind.MinusMinusToken].includes(node.operator))
25
+ || (ts.isBinaryExpression(node)
26
+ && node.operatorToken.kind >= ts.SyntaxKind.FirstAssignment
27
+ && node.operatorToken.kind <= ts.SyntaxKind.LastAssignment)) {
28
+ return true;
29
+ }
30
+ return ts.isCallExpression(node) && !readCall(node);
31
+ }
32
+ export function pureReader(name, readCall) {
33
+ const fn = functionOf(name);
34
+ if (fn?.body === undefined || fn.asteriskToken !== undefined || fn.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.AsyncKeyword)) {
35
+ return false;
36
+ }
37
+ let returns = !ts.isBlock(fn.body);
38
+ let acts = false;
39
+ let reads = false;
40
+ function visit(node) {
41
+ returns ||= ts.isReturnStatement(node) && node.expression !== undefined;
42
+ acts ||= action(node, readCall);
43
+ reads ||= ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node) || ts.isBinaryExpression(node);
44
+ ts.forEachChild(node, visit);
45
+ }
46
+ for (const parameter of fn.parameters) {
47
+ visit(parameter);
48
+ }
49
+ visit(fn.body);
50
+ return returns && reads && !acts;
51
+ }
52
+ //# sourceMappingURL=pureReader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pureReader.js","sourceRoot":"","sources":["../../src/adapters/pureReader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM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,KAAK,CAAC;IAClB,SAAS,KAAK,CAAC,IAAa;QAC3B,OAAO,KAAK,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,CAAC;QACxE,IAAI,KAAK,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAChC,KAAK,KAAK,EAAE,CAAC,0BAA0B,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACnH,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC;IACD,KAAK,MAAM,SAAS,IAAI,EAAE,CAAC,UAAU,EAAE,CAAC;QACvC,KAAK,CAAC,SAAS,CAAC,CAAC;IAClB,CAAC;IACD,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACf,OAAO,OAAO,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;AAClC,CAAC"}
@@ -9,7 +9,7 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
9
9
  import { basename, dirname, resolve } from "node:path";
10
10
  import { pathToFileURL } from "node:url";
11
11
  import { Effect, FileSystem } from "effect";
12
- import { CONFIG_FILE } from "#config/constants.ts";
12
+ import { CONFIG_FILE } from "#config/file.ts";
13
13
  import { SetupFailure } from "#failure.ts";
14
14
  function messageOf(cause) {
15
15
  return cause instanceof Error ? cause.message : String(cause);
@@ -1 +1 @@
1
- {"version":3,"file":"readConfig.js","sourceRoot":"","sources":["../../src/adapters/readConfig.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAA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Q,CAAC,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE,CAC1C,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU;QAC/B,CAAC,CAAC,MAAM,CAAC,OAAO,CAAW,EAAE,CAAC;QAC9B,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,kBAAkB,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CACvG,CACD,CAAC;IACH,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IACjD,IAAI,CAAC,OAAO,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACpC,OAAO,KAAK,CAAC,CAAC,IAAI,YAAY,CAAC,EAAE,OAAO,EAAE,gBAAgB,IAAI,4BAA4B,EAAE,CAAC,CAAC;IAC/F,CAAC;IACD,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACzD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACzB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function scriptPaths(directory: string, scripts: Readonly<Record<string, string>>): readonly string[];
2
+ //# sourceMappingURL=scriptPaths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scriptPaths.d.ts","sourceRoot":"","sources":["../../src/adapters/scriptPaths.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,MAAM,EAAE,CAE3G"}
@@ -0,0 +1,5 @@
1
+ import { posix } from "node:path";
2
+ export function scriptPaths(directory, scripts) {
3
+ return Object.values(scripts).flatMap((script) => script.split(/[\s'"`;|&()]+/u).map((word) => posix.join(directory, word)));
4
+ }
5
+ //# sourceMappingURL=scriptPaths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scriptPaths.js","sourceRoot":"","sources":["../../src/adapters/scriptPaths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC,MAAM,UAAU,WAAW,CAAC,SAAiB,EAAE,OAAyC;IACvF,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC9H,CAAC"}
@@ -0,0 +1,7 @@
1
+ import ts from "typescript";
2
+ import type { SourceFile } from "#rule.ts";
3
+ export declare function specReaderSources(files: readonly SourceFile[]): {
4
+ readCall: (call: ts.CallExpression) => boolean;
5
+ source: ts.SourceFile;
6
+ }[];
7
+ //# sourceMappingURL=specReaderSources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"specReaderSources.d.ts","sourceRoot":"","sources":["../../src/adapters/specReaderSources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAsC3C,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE;qBAerC,EAAE,CAAC,cAAc,KAAG,OAAO;;IAsBnD"}
@@ -0,0 +1,73 @@
1
+ import ts from "typescript";
2
+ import { parse } from "#rules/parse.ts";
3
+ import { topLevelHelpers, unwrapped } from "#rules/stories/syntax.ts";
4
+ import { asymmetricMatcher } from "./asymmetricMatcher.js";
5
+ const READ_METHODS = new Set([
6
+ "at",
7
+ "concat",
8
+ "endsWith",
9
+ "entries",
10
+ "every",
11
+ "filter",
12
+ "find",
13
+ "findIndex",
14
+ "flat",
15
+ "flatMap",
16
+ "get",
17
+ "has",
18
+ "includes",
19
+ "indexOf",
20
+ "join",
21
+ "keys",
22
+ "lastIndexOf",
23
+ "map",
24
+ "match",
25
+ "reduce",
26
+ "replace",
27
+ "slice",
28
+ "some",
29
+ "split",
30
+ "startsWith",
31
+ "substring",
32
+ "toLowerCase",
33
+ "toUpperCase",
34
+ "trim",
35
+ "values",
36
+ ]);
37
+ export function specReaderSources(files) {
38
+ const sources = files.flatMap((file) => {
39
+ const source = parse(file);
40
+ return source === undefined || topLevelHelpers(source).length === 0 ? [] : [source];
41
+ });
42
+ if (sources.length === 0) {
43
+ return [];
44
+ }
45
+ const options = { allowJs: true, noResolve: true, target: ts.ScriptTarget.ESNext, types: [] };
46
+ const host = ts.createCompilerHost(options);
47
+ const getSourceFile = host.getSourceFile;
48
+ const parsed = new Map(sources.map((source) => [source.fileName, source]));
49
+ host.getSourceFile = (path, ...args) => parsed.get(path) ?? getSourceFile(path, ...args);
50
+ const program = ts.createProgram([...parsed.keys()], options, host);
51
+ const checker = program.getTypeChecker();
52
+ function readCall(call) {
53
+ if (asymmetricMatcher(call, checker)) {
54
+ return true;
55
+ }
56
+ const target = unwrapped(call.expression);
57
+ if (!(ts.isPropertyAccessExpression(target) && READ_METHODS.has(target.name.text))) {
58
+ return false;
59
+ }
60
+ const declaration = checker.getResolvedSignature(call)?.declaration;
61
+ return (declaration !== undefined
62
+ && program.isSourceFileDefaultLibrary(declaration.getSourceFile())
63
+ && call.arguments.every((argument) => {
64
+ if (ts.isArrowFunction(argument) || ts.isFunctionExpression(argument)) {
65
+ return true;
66
+ }
67
+ const type = checker.getTypeAtLocation(argument);
68
+ return (type.flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown)) === 0 && type.getCallSignatures().length === 0;
69
+ }));
70
+ }
71
+ return sources.map((source) => ({ readCall, source }));
72
+ }
73
+ //# sourceMappingURL=specReaderSources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"specReaderSources.js","sourceRoot":"","sources":["../../src/adapters/specReaderSources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAC5B,IAAI;IACJ,QAAQ;IACR,UAAU;IACV,SAAS;IACT,OAAO;IACP,QAAQ;IACR,MAAM;IACN,WAAW;IACX,MAAM;IACN,SAAS;IACT,KAAK;IACL,KAAK;IACL,UAAU;IACV,SAAS;IACT,MAAM;IACN,MAAM;IACN,aAAa;IACb,KAAK;IACL,OAAO;IACP,QAAQ;IACR,SAAS;IACT,OAAO;IACP,MAAM;IACN,OAAO;IACP,YAAY;IACZ,WAAW;IACX,aAAa;IACb,aAAa;IACb,MAAM;IACN,QAAQ;CACR,CAAC,CAAC;AAEH,MAAM,UAAU,iBAAiB,CAAC,KAA4B;IAC7D,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACtC,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,MAAM,KAAK,SAAS,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;IACH,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAC;IACX,CAAC;IACD,MAAM,OAAO,GAAuB,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI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AC,WAAW,CAAC,aAAa,EAAE,CAAC;eAC/D,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACpC,IAAI,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC;oBACvE,OAAO,IAAI,CAAC;gBACb,CAAC;gBACD,MAAM,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;gBACjD,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;YAChH,CAAC,CAAC,CACF,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AACxD,CAAC"}
package/dist/cli/args.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { parseArgs } from "node:util";
2
2
  import { Result } from "effect";
3
- import { SUBCOMMANDS } from "./messages.js";
4
- import { ACCEPTS, misplaced, OPTIONS } from "./options.js";
3
+ import { ACCEPTS, misplaced, OPTIONS } from "./misplaced.js";
4
+ import { SUBCOMMANDS } from "./subcommands.js";
5
5
  function usage(problem) {
6
6
  return { _tag: "Usage", problem };
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,S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AC,oBAAoB,IAAI,EAAE,CAAC,CAAC;IACvG,CAAC;IACD,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxC,OAAO,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC1E,CAAC"}
package/dist/cli/fix.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { Effect } from "effect";
2
2
  import { SetupFailure } from "#failure.ts";
3
3
  import type { RuleServices } from "#rule.ts";
4
- export declare const MAX_FIX_ROUNDS = 5;
5
4
  export declare function snapshotOf(root: string): Effect.Effect<ReadonlyMap<string, string>, SetupFailure, RuleServices>;
6
5
  export interface Pass<TFailure, TRequirements> {
7
6
  readonly label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"fix.d.ts","sourceRoot":"","sources":["../../src/cli/fix.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,MAAM,EAAoB,MAAM,QAAQ,CAAC;AAK3D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,cAAc,IAAI,CAAC;AAMhC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAY/G;AAED,MAAM,WAAW,IAAI,CAAC,QAAQ,EAAE,aAAa;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;CAC7D;AAED,MAAM,WAAW,QAAQ,CAAC,QAAQ,EAAE,aAAa;IAChD,QAAQ,CAAC,MAAM,EAA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GAAG,8FAKd,CAAC"}
package/dist/cli/fix.js CHANGED
@@ -8,7 +8,7 @@ import { posix } from "#inventory/ignoreScope.ts";
8
8
  import { walk } from "#inventory/walk.ts";
9
9
  import { sortManifests } from "#manifests/sorted.ts";
10
10
  import { plural } from "#report/plural.ts";
11
- export const MAX_FIX_ROUNDS = 5;
11
+ import { MAX_FIX_ROUNDS } from "./limits.js";
12
12
  function isBinary(bytes) {
13
13
  return bytes.includes(0);
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fix.js","sourceRoot":"","sources":["../../src/cli/fix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAEhC,SAAS,QAAQ,CAAC,KAAiB;IAClC,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAY;IACtC,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC1B,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,I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names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const MAX_FIX_ROUNDS = 5;
2
+ //# sourceMappingURL=limits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limits.js","sourceRoot":"","sources":["../../src/cli/limits.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC"}
@@ -42,4 +42,4 @@ type Option = Exclude<keyof Values, "config" | "help">;
42
42
  export declare const ACCEPTS: Readonly<Record<string, readonly Option[]>>;
43
43
  export declare function misplaced(name: string, values: Values): string | undefined;
44
44
  export {};
45
- //# sourceMappingURL=options.d.ts.map
45
+ //# sourceMappingURL=misplaced.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"misplaced.d.ts","sourceRoot":"","sources":["../../src/cli/misplaced.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,eAAO,MAAM,OAAO;aACnB,OAAO;iBAAI,IAAI,EAAE,QAAQ;;aACzB,MAAM;iBAAI,IAAI,EAAE,QAAQ;;aACxB,QAAQ;iBAAI,IAAI,EAAE,SAAS;;aAC3B,IAAI;iBAAI,QAAQ;iBAAQ,IAAI,EAAE,QAAQ;;aACtC,gBAAgB;iBAAI,IAAI,EAAE,SAAS;;aACnC,KAAK;iBAAI,IAAI,EAAE,SAAS;;aACxB,IAAI;iBAAI,IAAI,EAAE,QAAQ;;aACtB,IAAI;iBAAI,KAAK,EAAE,GAAG;iBAAE,IAAI,EAAE,SAAS;;aACnC,IAAI;iBAAI,QAAQ;iBAAQ,IAAI,EAAE,QAAQ;;aACtC,MAAM;iBAAI,IAAI,EAAE,SAAS;;CAChB,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC;IAAE,OAAO,EAAE,OAAO,OAAO,CAAC;IAAC,gBAAgB,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAEjH,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC;AAIvD,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAe/D,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI1E"}
@@ -32,4 +32,4 @@ export function misplaced(name, values) {
32
32
  const owners = Object.keys(ACCEPTS).filter((owner) => option !== undefined && (ACCEPTS[owner] ?? []).includes(option));
33
33
  return option === undefined ? undefined : `--${option} applies only to ${owners.join(" and ")}.`;
34
34
  }
35
- //# sourceMappingURL=options.js.map
35
+ //# sourceMappingURL=misplaced.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"misplaced.js","sourceRoot":"","sources":["../../src/cli/misplaced.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC3B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC7B,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxC,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACrC,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxB,IAAI,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE;IACrC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxC,MAAM,EAAE,EAAE,IAAI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C,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,MAAM,oBAAoB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;AAClG,CAAC"}
@@ -17,7 +17,7 @@ import { preCommitHook } from "#hooks/preCommit.ts";
17
17
  import { setupHook } from "#hooks/setup.ts";
18
18
  import { hookStatus } from "#hooks/status.ts";
19
19
  import { uninstallHook } from "#hooks/uninstall.ts";
20
- import { USAGE } from "./messages.js";
20
+ import { USAGE } from "./usage.js";
21
21
  export const program = Effect.fn("Cli.program")(function* (args, { cwd, launch }) {
22
22
  const parsed = parseCommand(args);
23
23
  if (parsed._tag === "Usage") {
@@ -1 +1 @@
1
- {"version":3,"file":"program.js","sourceRoot":"","sources":["../../src/cli/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE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AE,OAAO,CAAC,IAAI,CAAC,CAAC;QACpE,KAAK,iBAAiB;YACrB,OAAO,KAAK,CAAC,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QAClE,KAAK,cAAc;YAClB,OAAO,KAAK,CAAC,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QAC1F,KAAK,gBAAgB;YACpB,OAAO,KAAK,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAClC,KAAK,aAAa;YACjB,OAAO,KAAK,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAC/B,KAAK,gBAAgB;YACpB,OAAO,KAAK,CAAC,CAAC,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;AACF,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const SUBCOMMANDS: Readonly<Record<string, string>>;
2
+ //# sourceMappingURL=subcommands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subcommands.d.ts","sourceRoot":"","sources":["../../src/cli/subcommands.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIxD,CAAC"}
@@ -0,0 +1,6 @@
1
+ export const SUBCOMMANDS = {
2
+ baseline: "baseline takes write, prune, tighten, migrate, merge or install-driver.",
3
+ exceptions: "exceptions takes migrate.",
4
+ hooks: "hooks takes install, uninstall, status or pre-commit.",
5
+ };
6
+ //# sourceMappingURL=subcommands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subcommands.js","sourceRoot":"","sources":["../../src/cli/subcommands.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAqC;IAC5D,QAAQ,EAAE,yEAAyE;IACnF,UAAU,EAAE,2BAA2B;IACvC,KAAK,EAAE,uDAAuD;CAC9D,CAAC"}
@@ -1,3 +1,2 @@
1
1
  export declare const USAGE = "Usage:\n quality lint [--config <file>]\n quality ci [--coverage]\n quality setup [--config <file>]\n quality fix [--config <file>] [--rule <id>]...\n quality exceptions migrate [--config <file>] [--from <registry>]\n quality baseline merge <ancestor> <current> <other>\n quality baseline install-driver\n quality baseline write [--config <file>] [--rule <id>]... [--file <path>]... [--first-adoption]\n quality baseline prune [--config <file>] [--against <ref>]\n quality baseline tighten [--config <file>] [--staged]\n quality baseline migrate [--config <file>] [--from <file>]\n quality hooks install [--config <file>] [--force]\n quality hooks uninstall\n quality hooks status\n quality hooks pre-commit [--config <file>]\n\nci Check pnpm peers, then run the application scripts lint, typecheck, build and test, stopping on failure.\nsetup Install the Quality hook when the current folder owns a .git entry; skip unversioned and enclosed apps.\nlint Run every rule. Exits 1 on an error-level violation, a file over its baseline, a stale registry entry\n or a baseline entry for an unknown rule.\nfix Sort every package.json, apply Biome's lint fixes, unsafe ones included, its assist actions and formatting, then format again.\n With --rule, apply only that rule's safe mechanical fixes and report remaining findings (exit 1), including baseline debt. Unsupported rules exit 2.\nexceptions migrate Move legacy registry entries and Biome declarations into quality.config.ts exceptions and remove matching root overrides.\nbaseline merge Merge Git baseline versions into <current>: deletions win and counts take the minimum.\nbaseline install-driver Configure only the repository-local merge.quality-baseline.driver setting.\nbaseline write Adopt initial debt once, or record named rules only for --file paths changed since HEAD. Stage new files first.\n --first-adoption records any rule, including unchanged files. With an existing baseline, name explicit --rule ids.\nbaseline prune Drop fixed debt, lower entries to what is left and carry entries to files git saw move. Never adds or raises an entry.\nbaseline tighten Prune only the entries of files changed since HEAD, or with --staged, in the index.\nbaseline migrate Move a JSON or JSON Lines baseline (--from, quality/baseline.json by default) into root and package shards.\nhooks install Install the git pre-commit hook, shared by every worktree, that runs hooks pre-commit. Keeps a hook that is not quality's\n unless --force replaces it.\nhooks uninstall Remove quality's pre-commit hook. Keeps a hook that is not quality's.\nhooks status Check that git's effective hooks path runs Quality's pre-commit hook and report global chaining.\nhooks pre-commit Check lint and staged baseline counts, then package.json scripts typecheck and quality:commit when present.\n\n--config <file> Config file; its directory is the repository root. Without this option, uses ./quality.config.ts when present, otherwise defaults.\n--against <ref> The branch the work merges into, whose merge base prune follows moves from. Defaults to origin/HEAD, then origin/main, then origin/master.\n--coverage Collect V8 coverage and JUnit from ci's single test run into coverage/, including failed tests.\nExit codes: 0 passed, 1 failed the gate, 2 could not run.";
2
- export declare const SUBCOMMANDS: Readonly<Record<string, string>>;
3
- //# sourceMappingURL=messages.d.ts.map
2
+ //# sourceMappingURL=usage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/cli/usage.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,84GAwCwC,CAAC"}