@shivaedev/quality 0.52.0 → 0.53.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 (111) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +18 -8
  3. package/biome/declarations.json +0 -5
  4. package/biome/preset.json +1 -1
  5. package/dist/cli/lint.d.ts +2 -3
  6. package/dist/cli/lint.d.ts.map +1 -1
  7. package/dist/cli/lint.js +4 -2
  8. package/dist/cli/lint.js.map +1 -1
  9. package/dist/config/globs.d.ts +17 -0
  10. package/dist/config/globs.d.ts.map +1 -0
  11. package/dist/config/globs.js +18 -0
  12. package/dist/config/globs.js.map +1 -0
  13. package/dist/engine/runRules.d.ts +2 -1
  14. package/dist/engine/runRules.d.ts.map +1 -1
  15. package/dist/engine/runRules.js +4 -1
  16. package/dist/engine/runRules.js.map +1 -1
  17. package/dist/engine/session.d.ts +1 -1
  18. package/dist/engine/session.d.ts.map +1 -1
  19. package/dist/engine/session.js +9 -5
  20. package/dist/engine/session.js.map +1 -1
  21. package/dist/hooks/preCommit.d.ts +2 -1
  22. package/dist/hooks/preCommit.d.ts.map +1 -1
  23. package/dist/rule.d.ts +1 -0
  24. package/dist/rule.d.ts.map +1 -1
  25. package/dist/rule.js +7 -3
  26. package/dist/rule.js.map +1 -1
  27. package/dist/rules/builtIn.d.ts +36 -9
  28. package/dist/rules/builtIn.d.ts.map +1 -1
  29. package/dist/rules/files/folderNames.d.ts +8 -2
  30. package/dist/rules/files/folderNames.d.ts.map +1 -1
  31. package/dist/rules/files/folderNames.js +7 -5
  32. package/dist/rules/files/folderNames.js.map +1 -1
  33. package/dist/rules/files/namedAfterExport.d.ts +4 -1
  34. package/dist/rules/files/namedAfterExport.d.ts.map +1 -1
  35. package/dist/rules/files/namedAfterExport.js +6 -7
  36. package/dist/rules/files/namedAfterExport.js.map +1 -1
  37. package/dist/rules/files/otherNames.d.ts +8 -2
  38. package/dist/rules/files/otherNames.d.ts.map +1 -1
  39. package/dist/rules/files/otherNames.js +7 -5
  40. package/dist/rules/files/otherNames.js.map +1 -1
  41. package/dist/rules/stories/authSql.d.ts +4 -1
  42. package/dist/rules/stories/authSql.d.ts.map +1 -1
  43. package/dist/rules/stories/authSql.js +6 -3
  44. package/dist/rules/stories/authSql.js.map +1 -1
  45. package/dist/rules/stories/collectionOrigins.d.ts +5 -0
  46. package/dist/rules/stories/collectionOrigins.d.ts.map +1 -0
  47. package/dist/rules/stories/collectionOrigins.js +17 -0
  48. package/dist/rules/stories/collectionOrigins.js.map +1 -0
  49. package/dist/rules/stories/httpStatus.d.ts +4 -1
  50. package/dist/rules/stories/httpStatus.d.ts.map +1 -1
  51. package/dist/rules/stories/httpStatus.js +6 -3
  52. package/dist/rules/stories/httpStatus.js.map +1 -1
  53. package/dist/rules/stories/namedValues.d.ts.map +1 -1
  54. package/dist/rules/stories/namedValues.js +5 -5
  55. package/dist/rules/stories/namedValues.js.map +1 -1
  56. package/dist/rules/stories/noLimitImports.d.ts.map +1 -1
  57. package/dist/rules/stories/noLimitImports.js +4 -2
  58. package/dist/rules/stories/noLimitImports.js.map +1 -1
  59. package/dist/rules/stories/origins.d.ts +1 -2
  60. package/dist/rules/stories/origins.d.ts.map +1 -1
  61. package/dist/rules/stories/origins.js +12 -6
  62. package/dist/rules/stories/origins.js.map +1 -1
  63. package/dist/rules/stories/prerequisites.d.ts.map +1 -1
  64. package/dist/rules/stories/prerequisites.js +6 -24
  65. package/dist/rules/stories/prerequisites.js.map +1 -1
  66. package/dist/rules/stories/program.d.ts.map +1 -1
  67. package/dist/rules/stories/program.js +8 -1
  68. package/dist/rules/stories/program.js.map +1 -1
  69. package/dist/rules/stories/sources.d.ts.map +1 -1
  70. package/dist/rules/stories/sources.js +19 -7
  71. package/dist/rules/stories/sources.js.map +1 -1
  72. package/dist/rules/stories/specHelpers.d.ts.map +1 -1
  73. package/dist/rules/stories/specHelpers.js +4 -2
  74. package/dist/rules/stories/specHelpers.js.map +1 -1
  75. package/dist/rules/stories/specs.js +1 -1
  76. package/dist/rules/stories/specs.js.map +1 -1
  77. package/dist/rules/stories/syntax.d.ts +0 -1
  78. package/dist/rules/stories/syntax.d.ts.map +1 -1
  79. package/dist/rules/stories/syntax.js +0 -4
  80. package/dist/rules/stories/syntax.js.map +1 -1
  81. package/dist/rules/test-names/colocated.d.ts +4 -1
  82. package/dist/rules/test-names/colocated.d.ts.map +1 -1
  83. package/dist/rules/test-names/colocated.js +5 -3
  84. package/dist/rules/test-names/colocated.js.map +1 -1
  85. package/dist/rules/test-names/follow.d.ts +4 -1
  86. package/dist/rules/test-names/follow.d.ts.map +1 -1
  87. package/dist/rules/test-names/follow.js +5 -3
  88. package/dist/rules/test-names/follow.js.map +1 -1
  89. package/package.json +3 -2
  90. package/src/cli/lint.ts +33 -27
  91. package/src/config/globs.ts +31 -0
  92. package/src/engine/runRules.ts +7 -2
  93. package/src/engine/session.ts +10 -5
  94. package/src/rule.ts +12 -2
  95. package/src/rules/files/folderNames.ts +7 -5
  96. package/src/rules/files/namedAfterExport.ts +6 -7
  97. package/src/rules/files/otherNames.ts +7 -5
  98. package/src/rules/stories/authSql.ts +6 -3
  99. package/src/rules/stories/collectionOrigins.ts +20 -0
  100. package/src/rules/stories/httpStatus.ts +6 -3
  101. package/src/rules/stories/namedValues.ts +7 -5
  102. package/src/rules/stories/noLimitImports.ts +4 -2
  103. package/src/rules/stories/origins.ts +12 -8
  104. package/src/rules/stories/prerequisites.ts +6 -25
  105. package/src/rules/stories/program.ts +9 -1
  106. package/src/rules/stories/sources.ts +21 -9
  107. package/src/rules/stories/specHelpers.ts +4 -2
  108. package/src/rules/stories/specs.ts +1 -1
  109. package/src/rules/stories/syntax.ts +0 -5
  110. package/src/rules/test-names/colocated.ts +5 -3
  111. package/src/rules/test-names/follow.ts +5 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.53.0 - 2026-11-01
4
+
5
+ ### Added
6
+
7
+ - Rules can validate inventory-dependent configuration through `defineRule`'s `validate` callback before checking files.
8
+
9
+ ### Changed
10
+
11
+ - Generated starters declare auth ownership with reasoned globs for Quality.
12
+
13
+ ### Fixed
14
+
15
+ - Accept a file named after its single exported constant in `files/named-after-export`, applying the existing export-name and folder-prefix checks.
16
+ - Run `quality lint`, including its Biome checks and pre-commit lint, under the shared heavy-process lock so concurrent local heavy commands wait their turn.
17
+ - Enable Biome's `noDelete` as an error while disabling its automatic fix so diagnostics remain visible without rewriting deletion behavior.
18
+ - Check story kits in all packages except test-story, test and types, including test-story's development dependencies. Apply story syntax rules to kit declarations in both `.test` and `.spec` files; keep unit and typecheck tests outside those rules.
19
+
20
+ ### Breaking
21
+
22
+ - Glob options (`toolOwned`, `content`, `edge`, `owners` and `suites`) require `{ glob, reason }` declarations. Replace each string with a declaration explaining its purpose, and remove patterns that match no current inventoried file. Stale declarations fail configuration.
23
+ - Lint and baseline commands refuse legacy exception registries. Run `quality exceptions migrate` (or `quality exceptions migrate --from <registry>`) to move entries into config exceptions.
24
+ - Remove `isSpec` from `@shivaedev/quality/rules/stories/syntax.ts`. Consumers selecting story files must use `storySources` from `@shivaedev/quality/rules/stories/sources.ts` and run its Effect with the rule inputs; story kit origins determine coverage instead of a `.spec` suffix.
25
+
3
26
  ## 0.52.0 - 2026-10-31
4
27
 
5
28
  ### Added
package/README.md CHANGED
@@ -30,7 +30,7 @@ The work has three parts: connect the repository to the shared tools once; descr
30
30
 
31
31
  ### Rule lifecycle
32
32
 
33
- `defineRule` accepts synchronous, Promise and Effect checks. Promise checks receive an abort signal as `context.signal`; pass it to cancellable APIs. Effect checks compose filesystem and child-process work in the run's scope. Configured checks return Effects and preserve their service requirements; tool checks read `FileSystem` and `ChildProcessSpawner` from the environment.
33
+ `defineRule` accepts synchronous, Promise and Effect checks. Promise checks receive an abort signal as `context.signal`; pass it to cancellable APIs. Effect checks compose filesystem and child-process work in the run's scope. An optional `validate(context)` callback returns inventory-dependent configuration issues before `check`; those issues stop the run as invalid configuration. Configured checks return Effects and preserve their service requirements; tool checks read `FileSystem` and `ChildProcessSpawner` from the environment.
34
34
 
35
35
  Interrupting a run stops its Biome and knip processes and removes their scoped temporary configs before it ends. A rule crash is a defect; the CLI prints the rule id and original stack. Expected setup failures retain their underlying cause without including it in enumerable error data.
36
36
 
@@ -189,7 +189,7 @@ export default defineConfig({
189
189
 
190
190
  Keep story kits and fixtures in `src/test-support` and keep each spec specific to its story. [`@shivaedev/test-story`](https://github.com/ShivaeDev/platform/tree/main/packages/test-story#readme) explains how to build the kit, traits and verbs over a real engine.
191
191
 
192
- Quality's `tests/story-specs` rule reports a test file that declares tests without a kit's `it`, including plain Vitest `it` and `test` declarations mixed with stories. Typecheck tests are exempt, as are test-story itself and its transitive workspace dependencies, including development, optional and peer dependencies: requiring those packages to depend on test-story would create a cycle.
192
+ Quality's `tests/story-specs` rule reports a test file that declares tests without a kit's `it`, including plain Vitest `it` and `test` declarations mixed with stories. Typecheck tests are exempt, as are only the packages named `@shivaedev/test-story`, `@shivaedev/test` and `@shivaedev/types`, wherever they live in the workspace or at its root. Other dependencies of test-story, including development dependencies, remain checked.
193
193
 
194
194
  Quality's `tests/story-engine` rule reports a kit story with no traits whose body never references its verbs, its story or its test context. Drive the engine through one of the kit's verbs or traits, or, if the code under test is pure, move it to `<stem>.unit.test.ts`, which reaches no engine and mocks nothing. The rule follows the same kit origins and prerequisite exemptions as `tests/story-specs`; unit and typecheck files are exempt.
195
195
 
@@ -197,25 +197,35 @@ There is one other honest form. A pure function with no engine behind it gets a
197
197
 
198
198
  Every finding names both repairs: drive the engine through the package's story kit, or, when the code under test is pure, move the test to a `.unit` file. Never wrap a pure function in a story that ignores its kit.
199
199
 
200
- Every package tests its real engine through its own story kit, so setup and actions share the package's domain vocabulary. To repair a finding, build the kit with `storyKit` from `@shivaedev/test-story/server/storyKit.ts` in `src/test-support`, import it in the spec and replace plain registrations with `kit.it(name, traits, body)`. The rule follows imports, aliases and conditional registrars back to the kit; it checks declarations, while review and runtime tests establish whether the kit exercises the real engine.
200
+ Every package tests its real engine through its own story kit, so setup and actions share the package's domain vocabulary. To repair a finding, build the kit with `storyKit` from `@shivaedev/test-story/server/storyKit.ts` in `src/test-support`, import it in the spec and replace plain registrations with `kit.it(name, traits, body)`. The rule follows imports, aliases, conditional registrars and arrays of kits (including tuple loops) back to the kit; it checks declarations, while review and runtime tests establish whether the kit exercises the real engine.
201
201
 
202
202
  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.
203
203
 
204
204
  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.
205
205
 
206
- 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. They read every story file, whatever its suffix: any `.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. `tests/wait-on-events` reports `Effect.sleep`, `setTimeout` and `setInterval`, calls to an imported `eventually`, Vitest's fake timers, `vi.waitFor`, and `TestClock.adjust` and `TestClock.setTime`: settle on the engine's own signal through a kit verb, and when time passing is the behaviour, advance the clock in a verb named for it.
206
+ 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. `tests/wait-on-events` reports `Effect.sleep`, `setTimeout` and `setInterval`, calls to an imported `eventually`, Vitest's fake timers, `vi.waitFor`, and `TestClock.adjust` and `TestClock.setTime`: settle on the engine's own signal through a kit verb, and when time passing is the behaviour, advance the clock in a verb named for it.
207
207
 
208
208
  `boundaries/queue-sql` rejects SQL mentioning the private `pgboss.` schema. Apps use their queue definitions and let workers process jobs; there is no queue-purge API by design. `boundaries/auth-sql` rejects SQL accessing Better Auth's `user`, `account`, `session` and `verification` tables. App tables reference users by foreign key: migrations may reference only `user(id)` with `ON DELETE CASCADE` or `ON DELETE SET NULL`. Import `userReference` from `@shivaedev/identity/server/better-auth/userReference.ts` and interpolate `sql(userReference.table)` and `sql(userReference.column)` in the reference. Apps use identity for account data; `options.owners` names platform's own auth implementation and its migrations. These rules inspect SQL templates, literal query calls and query variables, and inventoried `.sql` files. They do not evaluate arbitrary runtime SQL construction.
209
209
 
210
210
  `boundaries/http-status` rejects comparisons with HTTP error status numbers, switch cases and literal status-list membership outside `options.edge`. Domain code handles typed errors; the named HTTP edge translates them into transport responses. Process exit codes remain ordinary domain values.
211
211
 
212
- Declare these architectural facts in the repository's quality config; paths and patterns are relative to that config's directory:
212
+ Glob options (`toolOwned`, `content`, `edge`, `owners` and `suites`) use `{ glob, reason }` declarations. Every declaration needs a nonblank reason and must match a current inventoried file; otherwise configuration fails. Remove declarations when their files disappear. Paths and patterns are relative to the config's directory. Naming and suite options use gitignore patterns; `edge` and `owners` use Node glob patterns.
213
+
214
+ Declare these architectural facts in the repository's quality config:
213
215
 
214
216
  ```ts
215
217
  export default defineConfig({
216
218
  rules: {
217
- "boundaries/auth-sql": { options: { owners: ["packages/identity/src/server/better-auth/**", "examples/starter/src/server/migrations/**"] } },
218
- "boundaries/http-status": { options: { edge: ["src/http/**"] } },
219
+ "boundaries/auth-sql": {
220
+ options: {
221
+ owners: [{ glob: "src/auth/**", reason: "This module implements the auth storage API." }],
222
+ },
223
+ },
224
+ "boundaries/http-status": {
225
+ options: {
226
+ edge: [{ glob: "src/http/**", reason: "These HTTP adapters translate transport statuses into domain errors." }],
227
+ },
228
+ },
219
229
  },
220
230
  });
221
231
  ```
@@ -276,7 +286,7 @@ For adoption, run `quality baseline write --rule code/unused --file src/legacy.t
276
286
  - **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.
277
287
  - **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`.
278
288
  - **Imports:** cycles, unresolvable imports, workspace imports missing from the manifest or an entry point, relative imports that leave their folder, production imports of test code, runtime folders and fences, as described above.
279
- - **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` 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. 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.
289
+ - **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. 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.
280
290
  - **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.
281
291
  - **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.
282
292
  - **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. Read failures other than `NotFound` fail the scan. `manifests/sorted` keeps every `package.json` in sort-package-json order, and `manifests/source-first` puts the `source` condition first in `exports` and `imports`. `manifests/exports-shape` checks the package root and workspace members with exports. They use one file-preserving TypeScript wildcard: for example, `./*.ts` maps to `./src/*.ts`, `./dist/*.d.ts` and `./dist/*.js` under `source`, `types` and `default`. 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. `manifests/application` keeps an application on its entry points, as described above.
@@ -32,11 +32,6 @@
32
32
  "reason": "A test defines the helper and harness components it renders, and no test module is hot-reloaded, so the rule's fast-refresh boundary does not apply.",
33
33
  "rule": "lint/style/useComponentExportOnlyModules"
34
34
  },
35
- {
36
- "includes": ["**"],
37
- "reason": "quality fix applies every Biome lint fix, and this rule's fix changed behavior or did not finish on real code, so the rule is off until it is reviewed.",
38
- "rule": "lint/performance/noDelete"
39
- },
40
35
  {
41
36
  "includes": ["**"],
42
37
  "reason": "An unused private member asks whether it is still needed or should be used; deleting it automatically skips that decision.",
package/biome/preset.json CHANGED
@@ -342,7 +342,7 @@
342
342
  "performance": {
343
343
  "noAccumulatingSpread": "error",
344
344
  "noBarrelFile": "error",
345
- "noDelete": "off",
345
+ "noDelete": { "fix": "none", "level": "error" },
346
346
  "noDynamicNamespaceImportAccess": "error",
347
347
  "noReExportAll": "error",
348
348
  "noSyncScripts": "error",
@@ -1,5 +1,4 @@
1
1
  import { Effect } from "effect";
2
- import { GateFailed, type SetupFailure } from "#failure.ts";
3
- import type { RuleServices } from "#rule.ts";
4
- export declare const lint: (cwd: string, config: string | undefined, staged?: any) => Effect.Effect<void, GateFailed | SetupFailure, RuleServices>;
2
+ import { GateFailed, SetupFailure } from "#failure.ts";
3
+ export declare const lint: (cwd: string, config: string | undefined, staged?: any) => Effect.Effect<void, GateFailed | SetupFailure, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | import("effect/FileSystem").FileSystem>;
5
4
  //# sourceMappingURL=lint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/cli/lint.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKzC,OAAO,EAAE,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,IAAI,yHAyBf,CAAC"}
1
+ {"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/cli/lint.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,MAAM,EAAE,MAAM,QAAQ,CAAC;AAMzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIvD,eAAO,MAAM,IAAI,sNA6BhB,CAAC"}
package/dist/cli/lint.js CHANGED
@@ -1,10 +1,12 @@
1
1
  import { relative } from "node:path";
2
+ import * as NodePath from "@effect/platform-node/NodePath";
2
3
  import { Console, Effect } from "effect";
4
+ import { withHeavyLock } from "@shivaedev/heavy-lock/withHeavyLock.ts";
3
5
  import { looseStagedEntries } from "#baseline/looseStagedEntries.ts";
4
6
  import { evaluate, passes } from "#engine/evaluate.ts";
5
7
  import { openSession } from "#engine/session.ts";
6
8
  import { keyOf } from "#engine/violation.ts";
7
- import { GateFailed } from "#failure.ts";
9
+ import { GateFailed, SetupFailure } from "#failure.ts";
8
10
  import { render } from "#report/render.ts";
9
11
  export const lint = Effect.fn("Cli.lint")(function* (cwd, config, staged = false) {
10
12
  const session = yield* openSession(cwd, config);
@@ -25,5 +27,5 @@ export const lint = Effect.fn("Cli.lint")(function* (cwd, config, staged = false
25
27
  if (!passes(outcome)) {
26
28
  return yield* new GateFailed();
27
29
  }
28
- });
30
+ }, (effect) => withHeavyLock(effect, { command: "quality lint" }).pipe(Effect.catchTag("HeavyLockError", (cause) => new SetupFailure({ cause, message: cause.message })), Effect.provide(NodePath.layer)));
29
31
  //# sourceMappingURL=lint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lint.js","sourceRoot":"","sources":["../../src/cli/lint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAqB,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,EAClD,GAAW,EACX,MAA0B,EAC1B,MAAM,GAAG,KAAK;IAEd,MAAM,OAAO,GAAG,KAAK,CAAC,CA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AAM,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa;KACtI,CAAC,CACF,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QACtB,OAAO,KAAK,CAAC,CAAC,IAAI,UAAU,EAAE,CAAC;IAChC,CAAC;AACF,CAAC,EACD,CAAC,MAAM,EAAE,EAAE,CACV,aAAa,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC,IAAI,CACtD,MAAM,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,EACjG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC9B,CACF,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { Schema } from "effect";
2
+ declare const GlobDeclaration: Schema.Struct<{
3
+ readonly glob: Schema.NonEmptyString;
4
+ readonly reason: Schema.String;
5
+ }>;
6
+ export declare const GlobDeclarations: Schema.withDecodingDefaultKey<Schema.$Array<Schema.Struct<{
7
+ readonly glob: Schema.NonEmptyString;
8
+ readonly reason: Schema.String;
9
+ }>>, never>;
10
+ type GlobOptions = Readonly<Record<string, readonly (typeof GlobDeclaration.Type)[]>>;
11
+ export declare function globPatterns(declarations: readonly (typeof GlobDeclaration.Type)[]): readonly string[];
12
+ export declare function validateGlobs({ files, options }: {
13
+ readonly files: readonly string[];
14
+ readonly options: GlobOptions;
15
+ }, matches?: (file: string, glob: string) => boolean): readonly string[];
16
+ export {};
17
+ //# sourceMappingURL=globs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globs.d.ts","sourceRoot":"","sources":["../../src/config/globs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGxC,QAAA,MAAM,eAAe;;;EAGnB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;WAAwF,CAAC;AAEtH,KAAK,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAEtF,wBAAgB,YAAY,CAAC,YAAY,EAAE,SAAS,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,EAAE,GAAG,SAAS,MAAM,EAAE,CAEtG;AAOD,wBAAgB,aAAa,CAC5B,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAA;CAAE,EACxF,OAAO,GAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAA8B,GACrE,SAAS,MAAM,EAAE,CAMnB"}
@@ -0,0 +1,18 @@
1
+ import { Effect, Schema } from "effect";
2
+ import ignore from "ignore";
3
+ const GlobDeclaration = Schema.Struct({
4
+ glob: Schema.NonEmptyString,
5
+ reason: Schema.String.check(Schema.isPattern(/\S/u, { expected: "a reason for this glob" })),
6
+ });
7
+ export const GlobDeclarations = Schema.Array(GlobDeclaration).pipe(Schema.withDecodingDefaultKey(Effect.succeed([])));
8
+ export function globPatterns(declarations) {
9
+ return declarations.map(({ glob }) => glob);
10
+ }
11
+ function matchesIgnorePattern(file, glob) {
12
+ const result = ignore().add(glob).test(file);
13
+ return result.ignored || result.unignored;
14
+ }
15
+ export function validateGlobs({ files, options }, matches = matchesIgnorePattern) {
16
+ return Object.entries(options).flatMap(([option, declarations]) => declarations.flatMap(({ glob }, index) => files.some((file) => matches(file, glob)) ? [] : [`${option}.${index}.glob: "${glob}" matches no current file. Remove the stale glob.`]));
17
+ }
18
+ //# sourceMapping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AE,EAAE,KAAK,EAAE,EAAE,CACxC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,WAAW,IAAI,mDAAmD,CAAC,CACvI,CACD,CAAC;AACH,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { Effect } from "effect";
2
+ import { SetupFailure } from "#failure.ts";
2
3
  import type { RuleCheck, RuleInputs, RuleServices } from "#rule.ts";
3
4
  import type { ActiveLevel, Violation } from "./violation.ts";
4
5
  export interface ActiveRule {
@@ -9,5 +10,5 @@ export interface ActiveRule {
9
10
  readonly level: ActiveLevel;
10
11
  readonly registrable?: boolean;
11
12
  }
12
- export declare const runRules: (rules: readonly ActiveRule[], inputs: RuleInputs) => Effect.Effect<readonly Violation[], never, RuleServices>;
13
+ export declare const runRules: (rules: readonly ActiveRule[], inputs: RuleInputs) => Effect.Effect<readonly Violation[], SetupFailure, RuleServices>;
13
14
  //# sourceMappingURL=runRules.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runRules.d.ts","sourceRoot":"","sources":["../../src/engine/runRules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,KAAK,EAAW,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE7D,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAC/B;AAgDD,eAAO,MAAM,QAAQ,gHAsBnB,CAAC"}
1
+ {"version":3,"file":"runRules.d.ts","sourceRoot":"","sources":["../../src/engine/runRules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EAAW,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE7D,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAC/B;AAoDD,eAAO,MAAM,QAAQ,uHAsBnB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { isAbsolute, relative } from "node:path";
2
2
  import { Effect } from "effect";
3
3
  import { ManifestFailure } from "#adapters/manifestInventory.ts";
4
+ import { SetupFailure } from "#failure.ts";
4
5
  import { posix } from "#inventory/ignoreScope.ts";
5
6
  function messageOf(cause) {
6
7
  return cause instanceof Error ? cause.message : String(cause);
@@ -33,7 +34,9 @@ function violationOf(rule, root, finding, exceptionFile) {
33
34
  };
34
35
  }
35
36
  function runRule(rule, inputs, exceptionFile) {
36
- return Effect.suspend(() => rule.check(inputs)).pipe(Effect.orDie, Effect.map((findings) => findings.map((finding) => violationOf(rule, inputs.root, finding, exceptionFile))), Effect.catchDefect((cause) => cause instanceof ManifestFailure
37
+ return Effect.suspend(() => rule.check(inputs)).pipe(Effect.catch((cause) => cause instanceof SetupFailure
38
+ ? Effect.fail(new SetupFailure({ cause, message: `rule ${rule.id} failed: ${cause.message}` }))
39
+ : Effect.die(cause)), Effect.map((findings) => findings.map((finding) => violationOf(rule, inputs.root, finding, exceptionFile))), Effect.catchDefect((cause) => cause instanceof ManifestFailure
37
40
  ? Effect.succeed([{ file: cause.path, level: "error", message: cause.message, rule: "manifests/valid" }])
38
41
  : Effect.die(new Error(`rule ${rule.id} failed: ${messageOf(cause)}`, { cause }))));
39
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"runRules.js","sourceRoot":"","sources":["../../src/engine/runRules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAalD,SAAS,SAAS,CAAC,KAAc;IAChC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC;AAED,iGAAiG;AACjG,SAAS,cAAc,CAAC,IAAY,EAAE,IAAY;IACjD,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AACzF,CAAC;AAED,SAAS,aAAa,CAAC,IAAgB,EAAE,OAAgB,EAAE,IAAY,EAAE,MAAc;IACtF,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,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AI,GAAG,EAAU,CAAC;IAC/B,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;QACxC,IAAI,OAAO,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;YACxC,OAAO,IAAI,CAAC;QACb,CAAC;QACD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACvB,OAAO,CAAC,SAAS,CAAC;IACnB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { Effect } from "effect";
2
2
  import { type ResolvedConfig } from "#config/load.ts";
3
- import { type RegistryEntry } from "#exceptions/registry.ts";
3
+ import type { RegistryEntry } from "#exceptions/registry.ts";
4
4
  import { SetupFailure } from "#failure.ts";
5
5
  import { type Inventory } from "#inventory/collect.ts";
6
6
  import type { RuleServices } from "#rule.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/engine/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,KAAK,YAAY,EAA2B,MAAM,mBAAmB,CAAC;AAE/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,WAAW,OAAO;IACvB,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;CAC1C;AAUD,eAAO,MAAM,IAAI,kHAef,CAAC;AAEH,eAAO,MAAM,WAAW,qGAUtB,CAAC"}
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/engine/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,KAAK,YAAY,EAA2B,MAAM,mBAAmB,CAAC;AAE/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,WAAW,OAAO;IACvB,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;CAC1C;AAUD,eAAO,MAAM,IAAI,kHAef,CAAC;AAEH,eAAO,MAAM,WAAW,qGAgBtB,CAAC"}
@@ -3,8 +3,6 @@ import { Effect } from "effect";
3
3
  import { setManifestFiles } from "#adapters/manifestInventory.ts";
4
4
  import { manifestReader } from "#adapters/manifestReader.ts";
5
5
  import { loadConfig } from "#config/load.ts";
6
- import { validOrFail } from "#decoded.ts";
7
- import { decodeRegistry } from "#exceptions/registry.ts";
8
6
  import { registryEntries } from "#exceptions/registryEntries.ts";
9
7
  import { SetupFailure } from "#failure.ts";
10
8
  import { collectInventory } from "#inventory/collect.ts";
@@ -29,10 +27,16 @@ export const scan = Effect.fn("Engine.scan")(function* (config) {
29
27
  });
30
28
  export const openSession = Effect.fn("Engine.openSession")(function* (cwd, configPath) {
31
29
  const config = yield* loadConfig(cwd, configPath);
32
- const registryRaw = yield* readInput(config.root, config.registry);
33
- const registry = yield* validOrFail(config.registry, yield* Effect.promise(() => decodeRegistry(registryRaw)));
30
+ const selection = configPath === undefined ? "" : ` --config ${configPath}`;
31
+ for (const path of new Set([config.registry, "quality/registry.json"])) {
32
+ if ((yield* readInput(config.root, path)) !== undefined) {
33
+ return yield* new SetupFailure({
34
+ message: `${path} holds legacy exceptions. Run \`quality exceptions migrate${selection} --from ${path}\` to move them into ${config.file}.`,
35
+ });
36
+ }
37
+ }
34
38
  const baseline = yield* readBaseline(config);
35
39
  const { inventory, violations } = yield* scan(config);
36
- return { baseline, config, inventory, registry: [...registry, ...registryEntries(config.exceptions)], violations };
40
+ return { baseline, config, inventory, registry: registryEntries(config.exceptions), violations };
37
41
  });
38
42
  //# sourceMappingURL=session.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/engine/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAuB,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,WAAW,EAA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UAAU,EAAE,CAAC;AAClG,CAAC,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { Effect } from "effect";
2
+ import { ChildProcessSpawner } from "effect/process";
2
3
  import { GateFailed, SetupFailure } from "#failure.ts";
3
- export declare const preCommitHook: (cwd: string, path: string | undefined) => Effect.Effect<undefined, GateFailed | SetupFailure, import("../rule.ts").RuleServices>;
4
+ export declare const preCommitHook: (cwd: string, path: string | undefined) => Effect.Effect<undefined, GateFailed | SetupFailure, ChildProcessSpawner.ChildProcessSpawner | import("effect/FileSystem").FileSystem>;
4
5
  //# sourceMappingURL=preCommit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preCommit.d.ts","sourceRoot":"","sources":["../../src/hooks/preCommit.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,MAAM,EAAE,MAAM,QAAQ,CAAC;AAMzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAkCvD,eAAO,MAAM,aAAa,mIAoBxB,CAAC"}
1
+ {"version":3,"file":"preCommit.d.ts","sourceRoot":"","sources":["../../src/hooks/preCommit.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAgB,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAKnE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAkCvD,eAAO,MAAM,aAAa,kLAoBxB,CAAC"}
package/dist/rule.d.ts CHANGED
@@ -50,6 +50,7 @@ interface RuleDefinition<TId extends string, TOptions, TServices> {
50
50
  readonly description: string;
51
51
  readonly id: TId;
52
52
  readonly registrable?: false;
53
+ readonly validate?: (context: RuleContext<TOptions>) => readonly string[];
53
54
  }
54
55
  interface RuleDefinitionWithOptions<TId extends string, TInput, TOptions, TServices> extends RuleDefinition<TId, TOptions, TServices> {
55
56
  readonly options: StandardSchemaV1<TInput, TOptions>;
@@ -1 +1 @@
1
- {"version":3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AC,GAAG,SAAS,MAAM,EAAE,SAAS,GAAG,KAAK,EACrE,UAAU,EAAE,4BAA4B,CAAC,GAAG,EAAE,SAAS,CAAC,GACtD,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC"}
package/dist/rule.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Effect } from "effect";
2
+ import { validOrFail } from "#decoded.ts";
2
3
  import { describeIssue } from "./standardSchema.js";
3
4
  const noOptions = {
4
5
  "~standard": {
@@ -7,7 +8,7 @@ const noOptions = {
7
8
  version: 1,
8
9
  },
9
10
  };
10
- function configureWith(schema, check, absent) {
11
+ function configureWith(schema, check, id, absent, validate) {
11
12
  return async (options) => {
12
13
  const result = await schema["~standard"].validate(options ?? absent);
13
14
  if (result.issues !== undefined) {
@@ -17,6 +18,9 @@ function configureWith(schema, check, absent) {
17
18
  return {
18
19
  _tag: "Ready",
19
20
  check: (inputs) => Effect.scoped(Effect.gen(function* () {
21
+ const context = { ...inputs, options: value };
22
+ const issues = validate?.(context).map((issue) => `rules.${id}.options: ${issue}`) ?? [];
23
+ yield* validOrFail(inputs.configFile ?? "quality.config.ts", issues.length === 0 ? { _tag: "Valid", value: undefined } : { _tag: "Invalid", issues });
20
24
  const signal = yield* Effect.abortSignal;
21
25
  const checked = check({ ...inputs, options: value, signal });
22
26
  return yield* Effect.isEffect(checked) ? checked : Effect.promise(() => Promise.resolve(checked));
@@ -26,8 +30,8 @@ function configureWith(schema, check, absent) {
26
30
  }
27
31
  export function defineRule(definition) {
28
32
  const configure = definition.options === undefined
29
- ? configureWith(noOptions, definition.check, undefined)
30
- : configureWith(definition.options, definition.check, {});
33
+ ? configureWith(noOptions, definition.check, definition.id, undefined, definition.validate)
34
+ : configureWith(definition.options, definition.check, definition.id, {}, definition.validate);
31
35
  return { configure, description: definition.description, id: definition.id, registrable: definition.registrable ?? true };
32
36
  }
33
37
  //# sourceMappingURL=rule.js.map
package/dist/rule.js.map CHANGED
@@ -1 +1 @@
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AE,GAAG,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;gBAC7D,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;YACnG,CAAC,CAAC,CACF;SACF,CAAC;IACH,CAAC,CAAC;AACH,CAAC;AAQD,MAAM,UAAU,UAAU,CACzB,UAAsH;IAEtH,MAAM,SAAS,GACd,UAAU,CAAC,OAAO,KAAK,SAAS;QAC/B,CAAC,CAAC,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,QAAQ,CAAC;QAC3F,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAChG,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,CAAC,WAAW,EAAE,EAAE,EAAE,UAAU,CAAC,EAAE,EAAE,WAAW,EAAE,UAAU,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC;AAC3H,CAAC"}
@@ -17,20 +17,47 @@ export declare const builtInRules: readonly [import("../rule.ts").Rule<"code/unu
17
17
  }, never>, import("../rule.ts").Rule<"imports/runtime", undefined, import("effect/FileSystem").FileSystem>, import("../rule.ts").Rule<"imports/resolvable", {
18
18
  readonly generated?: readonly string[];
19
19
  }, import("effect/process/ChildProcessSpawner").ChildProcessSpawner>, import("../rule.ts").Rule<"imports/manifest", undefined, never>, import("../rule.ts").Rule<"imports/aliased", undefined, never>, import("../rule.ts").Rule<"imports/no-test-code", undefined, never>, import("../rule.ts").Rule<"manifests/valid", undefined, never>, import("../rule.ts").Rule<"manifests/sorted", undefined, never>, import("../rule.ts").Rule<"manifests/source-first", undefined, never>, import("../rule.ts").Rule<"manifests/exports-shape", undefined, never>, import("../rule.ts").Rule<"manifests/application", undefined, never>, import("../rule.ts").Rule<"files/named-after-export", {
20
- readonly toolOwned?: readonly string[];
20
+ readonly toolOwned?: readonly {
21
+ readonly glob: string;
22
+ readonly reason: string;
23
+ }[];
21
24
  }, never>, import("../rule.ts").Rule<"files/folder-names", {
22
- readonly content?: readonly string[];
23
- readonly toolOwned?: readonly string[];
25
+ readonly content?: readonly {
26
+ readonly glob: string;
27
+ readonly reason: string;
28
+ }[];
29
+ readonly toolOwned?: readonly {
30
+ readonly glob: string;
31
+ readonly reason: string;
32
+ }[];
24
33
  }, never>, import("../rule.ts").Rule<"files/distinct-case", undefined, never>, import("../rule.ts").Rule<"files/other-names", {
25
- readonly content?: readonly string[];
26
- readonly toolOwned?: readonly string[];
34
+ readonly content?: readonly {
35
+ readonly glob: string;
36
+ readonly reason: string;
37
+ }[];
38
+ readonly toolOwned?: readonly {
39
+ readonly glob: string;
40
+ readonly reason: string;
41
+ }[];
27
42
  }, never>, import("../rule.ts").Rule<"tests/follow", {
28
- readonly suites?: readonly string[];
43
+ readonly suites?: readonly {
44
+ readonly glob: string;
45
+ readonly reason: string;
46
+ }[];
29
47
  }, never>, import("../rule.ts").Rule<"tests/colocated", {
30
- readonly suites?: readonly string[];
48
+ readonly suites?: readonly {
49
+ readonly glob: string;
50
+ readonly reason: string;
51
+ }[];
31
52
  }, never>, import("../rule.ts").Rule<"tests/story-setup", undefined, never>, import("../rule.ts").Rule<"tests/story-specs", undefined, never>, import("../rule.ts").Rule<"tests/story-engine", undefined, never>, import("../rule.ts").Rule<"boundaries/queue-sql", undefined, never>, import("../rule.ts").Rule<"boundaries/auth-sql", {
32
- readonly owners?: readonly string[];
53
+ readonly owners?: readonly {
54
+ readonly glob: string;
55
+ readonly reason: string;
56
+ }[];
33
57
  }, never>, import("../rule.ts").Rule<"tests/no-expect-in-support", undefined, never>, import("../rule.ts").Rule<"tests/spec-helpers", undefined, never>, import("../rule.ts").Rule<"boundaries/http-status", {
34
- readonly edge?: readonly string[];
58
+ readonly edge?: readonly {
59
+ readonly glob: string;
60
+ readonly reason: string;
61
+ }[];
35
62
  }, never>, import("../rule.ts").Rule<"tests/named-values", undefined, never>, import("../rule.ts").Rule<"tests/no-limit-imports", undefined, never>, import("../rule.ts").Rule<"tests/domain-outcomes", undefined, never>, import("../rule.ts").Rule<"tests/grouped-outcomes", undefined, never>, import("../rule.ts").Rule<"tests/wait-on-events", undefined, never>];
36
63
  //# sourceMappingURL=builtIn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"builtIn.d.ts","sourceRoot":"","sources":["../../src/rules/builtIn.ts"],"names":[],"mappings":"AAuDA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sWAuDf,CAAC"}
1
+ {"version":3,"file":"builtIn.d.ts","sourceRoot":"","sources":["../../src/rules/builtIn.ts"],"names":[],"mappings":"AAuDA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sWAuDf,CAAC"}
@@ -1,5 +1,11 @@
1
1
  export declare const folderNames: import("#rule.ts").Rule<"files/folder-names", {
2
- readonly content?: readonly string[];
3
- readonly toolOwned?: readonly string[];
2
+ readonly content?: readonly {
3
+ readonly glob: string;
4
+ readonly reason: string;
5
+ }[];
6
+ readonly toolOwned?: readonly {
7
+ readonly glob: string;
8
+ readonly reason: string;
9
+ }[];
4
10
  }, never>;
5
11
  //# sourceMappingURL=folderNames.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"folderNames.d.ts","sourceRoot":"","sources":["../../../src/rules/files/folderNames.ts"],"names":[],"mappings":"AAyEA,eAAO,MAAM,WAAW;;;SAmBtB,CAAC"}
1
+ {"version":3,"file":"folderNames.d.ts","sourceRoot":"","sources":["../../../src/rules/files/folderNames.ts"],"names":[],"mappings":"AA0EA,eAAO,MAAM,WAAW;;;;;;;;;SAoBtB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { posix } from "node:path";
2
- import { Effect, Order, Schema } from "effect";
2
+ import { Order, Schema } from "effect";
3
3
  import ignore, {} from "ignore";
4
+ import { GlobDeclarations, globPatterns, validateGlobs } from "#config/globs.ts";
4
5
  import { nativeNames } from "#naming/nativeNames.ts";
5
6
  import { packageLayout } from "#naming/packageLayout.ts";
6
7
  import { KEBAB, PASCAL } from "#naming/words.ts";
@@ -8,8 +9,8 @@ import { defineRule } from "#rule.ts";
8
9
  const SNAKE = /^[a-z0-9]+(?:_[a-z0-9]+)*$/u;
9
10
  const CODE = /\.[cm]?[jt]sx?$/u;
10
11
  const FolderNamesOptions = Schema.Struct({
11
- content: Schema.Array(Schema.String).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
12
- toolOwned: Schema.Array(Schema.String).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
12
+ content: GlobDeclarations,
13
+ toolOwned: GlobDeclarations,
13
14
  });
14
15
  function foldersIn(files) {
15
16
  const folders = new Set();
@@ -57,11 +58,11 @@ export const folderNames = defineRule({
57
58
  check: async ({ files, options, readText }) => {
58
59
  const layout = await packageLayout({ files, readText });
59
60
  const context = {
60
- content: ignore().add([...options.content]),
61
+ content: ignore().add([...globPatterns(options.content)]),
61
62
  names: layout.names,
62
63
  native: nativeNames(files).folders,
63
64
  stems: stemsIn(files),
64
- toolOwned: ignore().add([...options.toolOwned]),
65
+ toolOwned: ignore().add([...globPatterns(options.toolOwned)]),
65
66
  };
66
67
  return foldersIn(files).flatMap((folder) => {
67
68
  const message = messageFor(folder, context);
@@ -71,5 +72,6 @@ export const folderNames = defineRule({
71
72
  description: "A package folder is named after its package, a module folder after its main file, a content folder in snake_case and every other folder in kebab-case.",
72
73
  id: "files/folder-names",
73
74
  options: Schema.toStandardSchemaV1(FolderNamesOptions, { parseOptions: { errors: "all", onExcessProperty: "error" } }),
75
+ validate: validateGlobs,
74
76
  });
75
77
  //# sourceMappingURL=folderNames.js.map