@shivaedev/quality 0.24.0 → 0.25.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 (261) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +2 -2
  3. package/dist/baseline/compare.js +1 -1
  4. package/dist/baseline/compare.js.map +1 -1
  5. package/dist/baseline/update.js +3 -3
  6. package/dist/baseline/update.js.map +1 -1
  7. package/dist/cli/args.d.ts +1 -3
  8. package/dist/cli/args.d.ts.map +1 -1
  9. package/dist/cli/args.js +4 -9
  10. package/dist/cli/args.js.map +1 -1
  11. package/dist/cli/fix.js +1 -1
  12. package/dist/cli/fix.js.map +1 -1
  13. package/dist/cli/lint.d.ts +1 -2
  14. package/dist/cli/lint.d.ts.map +1 -1
  15. package/dist/cli/lint.js +1 -2
  16. package/dist/cli/lint.js.map +1 -1
  17. package/dist/cli/messages.d.ts +1 -1
  18. package/dist/cli/messages.d.ts.map +1 -1
  19. package/dist/cli/messages.js +2 -2
  20. package/dist/cli/migrate.js +1 -1
  21. package/dist/cli/migrate.js.map +1 -1
  22. package/dist/cli/migrateExceptions.js +1 -1
  23. package/dist/cli/migrateExceptions.js.map +1 -1
  24. package/dist/cli/program.js +1 -1
  25. package/dist/cli/program.js.map +1 -1
  26. package/dist/cli/{run-main.d.ts → runMain.d.ts} +1 -1
  27. package/dist/cli/runMain.d.ts.map +1 -0
  28. package/dist/cli/{run-main.js → runMain.js} +1 -1
  29. package/dist/cli/runMain.js.map +1 -0
  30. package/dist/cli.js +1 -1
  31. package/dist/cli.js.map +1 -1
  32. package/dist/config/resolve.d.ts +1 -1
  33. package/dist/config/resolve.d.ts.map +1 -1
  34. package/dist/config/resolve.js +1 -1
  35. package/dist/config/resolve.js.map +1 -1
  36. package/dist/config.d.ts +2 -2
  37. package/dist/config.d.ts.map +1 -1
  38. package/dist/decoded.d.ts +1 -1
  39. package/dist/decoded.d.ts.map +1 -1
  40. package/dist/decoded.js +1 -1
  41. package/dist/decoded.js.map +1 -1
  42. package/dist/engine/{baseline-file.d.ts → baselineFile.d.ts} +1 -1
  43. package/dist/engine/baselineFile.d.ts.map +1 -0
  44. package/dist/engine/{baseline-file.js → baselineFile.js} +1 -1
  45. package/dist/engine/baselineFile.js.map +1 -0
  46. package/dist/engine/evaluate.d.ts +0 -1
  47. package/dist/engine/evaluate.d.ts.map +1 -1
  48. package/dist/engine/evaluate.js +1 -2
  49. package/dist/engine/evaluate.js.map +1 -1
  50. package/dist/engine/{run-rules.d.ts → runRules.d.ts} +1 -1
  51. package/dist/engine/runRules.d.ts.map +1 -0
  52. package/dist/engine/{run-rules.js → runRules.js} +2 -2
  53. package/dist/engine/runRules.js.map +1 -0
  54. package/dist/engine/session.d.ts +1 -1
  55. package/dist/engine/session.d.ts.map +1 -1
  56. package/dist/engine/session.js +2 -2
  57. package/dist/engine/session.js.map +1 -1
  58. package/dist/engine/violation.d.ts +1 -1
  59. package/dist/engine/violation.d.ts.map +1 -1
  60. package/dist/engine/violation.js +1 -1
  61. package/dist/engine/violation.js.map +1 -1
  62. package/dist/hooks/preCommit.js +1 -1
  63. package/dist/hooks/preCommit.js.map +1 -1
  64. package/dist/imports/generated.js +1 -1
  65. package/dist/imports/generated.js.map +1 -1
  66. package/dist/imports/{pnpm-workspace.d.ts → pnpmWorkspacePatterns.d.ts} +1 -1
  67. package/dist/imports/pnpmWorkspacePatterns.d.ts.map +1 -0
  68. package/dist/imports/{pnpm-workspace.js → pnpmWorkspacePatterns.js} +1 -1
  69. package/dist/imports/pnpmWorkspacePatterns.js.map +1 -0
  70. package/dist/imports/resolve.js +1 -1
  71. package/dist/imports/resolve.js.map +1 -1
  72. package/dist/imports/workspace.js +1 -1
  73. package/dist/imports/workspace.js.map +1 -1
  74. package/dist/inventory/collect.js +1 -1
  75. package/dist/inventory/collect.js.map +1 -1
  76. package/dist/inventory/{ignore-scope.d.ts → ignoreScope.d.ts} +1 -1
  77. package/dist/inventory/ignoreScope.d.ts.map +1 -0
  78. package/dist/inventory/{ignore-scope.js → ignoreScope.js} +1 -1
  79. package/dist/inventory/ignoreScope.js.map +1 -0
  80. package/dist/inventory/walk.d.ts +1 -1
  81. package/dist/inventory/walk.d.ts.map +1 -1
  82. package/dist/inventory/walk.js +1 -1
  83. package/dist/inventory/walk.js.map +1 -1
  84. package/dist/manifests/sorted.js +1 -1
  85. package/dist/manifests/sorted.js.map +1 -1
  86. package/dist/report/render.d.ts +0 -2
  87. package/dist/report/render.d.ts.map +1 -1
  88. package/dist/report/render.js +6 -16
  89. package/dist/report/render.js.map +1 -1
  90. package/dist/report/stale.js +1 -1
  91. package/dist/report/stale.js.map +1 -1
  92. package/dist/rule.d.ts +1 -1
  93. package/dist/rule.d.ts.map +1 -1
  94. package/dist/rule.js +1 -1
  95. package/dist/rule.js.map +1 -1
  96. package/dist/rules/{built-in.d.ts → builtIn.d.ts} +2 -2
  97. package/dist/rules/builtIn.d.ts.map +1 -0
  98. package/dist/rules/{built-in.js → builtIn.js} +15 -13
  99. package/dist/rules/builtIn.js.map +1 -0
  100. package/dist/rules/comments/{pattern-rule.d.ts → definePattern.d.ts} +1 -1
  101. package/dist/rules/comments/definePattern.d.ts.map +1 -0
  102. package/dist/rules/comments/{pattern-rule.js → definePattern.js} +1 -1
  103. package/dist/rules/comments/definePattern.js.map +1 -0
  104. package/dist/rules/comments/{max-per-file.d.ts → maxPerFile.d.ts} +1 -1
  105. package/dist/rules/comments/maxPerFile.d.ts.map +1 -0
  106. package/dist/rules/comments/{max-per-file.js → maxPerFile.js} +1 -1
  107. package/dist/rules/comments/maxPerFile.js.map +1 -0
  108. package/dist/rules/comments/{no-banner.d.ts → noBanner.d.ts} +1 -1
  109. package/dist/rules/comments/noBanner.d.ts.map +1 -0
  110. package/dist/rules/comments/{no-banner.js → noBanner.js} +2 -2
  111. package/dist/rules/comments/noBanner.js.map +1 -0
  112. package/dist/rules/comments/{no-environment-pragma.d.ts → noEnvironmentPragma.d.ts} +1 -1
  113. package/dist/rules/comments/noEnvironmentPragma.d.ts.map +1 -0
  114. package/dist/rules/comments/{no-environment-pragma.js → noEnvironmentPragma.js} +2 -2
  115. package/dist/rules/comments/noEnvironmentPragma.js.map +1 -0
  116. package/dist/rules/comments/{no-jsdoc.d.ts → noJsdoc.d.ts} +1 -1
  117. package/dist/rules/comments/noJsdoc.d.ts.map +1 -0
  118. package/dist/rules/comments/{no-jsdoc.js → noJsdoc.js} +1 -1
  119. package/dist/rules/comments/noJsdoc.js.map +1 -0
  120. package/dist/rules/comments/{no-line-reference.d.ts → noLineReference.d.ts} +1 -1
  121. package/dist/rules/comments/noLineReference.d.ts.map +1 -0
  122. package/dist/rules/comments/{no-line-reference.js → noLineReference.js} +2 -2
  123. package/dist/rules/comments/noLineReference.js.map +1 -0
  124. package/dist/rules/comments/{no-pr-reference.d.ts → noPrReference.d.ts} +1 -1
  125. package/dist/rules/comments/noPrReference.d.ts.map +1 -0
  126. package/dist/rules/comments/{no-pr-reference.js → noPrReference.js} +2 -2
  127. package/dist/rules/comments/noPrReference.js.map +1 -0
  128. package/dist/rules/comments/{no-todo.d.ts → noTodo.d.ts} +1 -1
  129. package/dist/rules/comments/noTodo.d.ts.map +1 -0
  130. package/dist/rules/comments/{no-todo.js → noTodo.js} +2 -2
  131. package/dist/rules/comments/noTodo.js.map +1 -0
  132. package/dist/rules/{manifests-sorted.d.ts → manifestsSorted.d.ts} +1 -1
  133. package/dist/rules/manifestsSorted.d.ts.map +1 -0
  134. package/dist/rules/{manifests-sorted.js → manifestsSorted.js} +1 -1
  135. package/dist/rules/manifestsSorted.js.map +1 -0
  136. package/dist/rules/manifestsSourceFirst.d.ts +2 -0
  137. package/dist/rules/manifestsSourceFirst.d.ts.map +1 -0
  138. package/dist/rules/manifestsSourceFirst.js +43 -0
  139. package/dist/rules/manifestsSourceFirst.js.map +1 -0
  140. package/dist/rules/{max-lines.d.ts → maxLines.d.ts} +1 -1
  141. package/dist/rules/maxLines.d.ts.map +1 -0
  142. package/dist/rules/{max-lines.js → maxLines.js} +1 -1
  143. package/dist/rules/maxLines.js.map +1 -0
  144. package/dist/rules/suppressions/{biome-overrides.d.ts → biomeOverrides.d.ts} +1 -1
  145. package/dist/rules/suppressions/biomeOverrides.d.ts.map +1 -0
  146. package/dist/rules/suppressions/{biome-overrides.js → biomeOverrides.js} +1 -1
  147. package/dist/rules/suppressions/biomeOverrides.js.map +1 -0
  148. package/dist/rules/suppressions/{no-double-cast.d.ts → noDoubleCast.d.ts} +1 -1
  149. package/dist/rules/suppressions/noDoubleCast.d.ts.map +1 -0
  150. package/dist/rules/suppressions/{no-double-cast.js → noDoubleCast.js} +1 -1
  151. package/dist/rules/suppressions/noDoubleCast.js.map +1 -0
  152. package/dist/rules/suppressions/noIgnoreDeprecations.js +1 -1
  153. package/dist/rules/suppressions/noIgnoreDeprecations.js.map +1 -1
  154. package/dist/rules/suppressions/{no-inline.d.ts → noInline.d.ts} +1 -1
  155. package/dist/rules/suppressions/noInline.d.ts.map +1 -0
  156. package/dist/rules/suppressions/{no-inline.js → noInline.js} +2 -2
  157. package/dist/rules/suppressions/noInline.js.map +1 -0
  158. package/dist/rules/suppressions/{stylesheet-comments.d.ts → stylesheetComments.d.ts} +1 -1
  159. package/dist/rules/suppressions/stylesheetComments.d.ts.map +1 -0
  160. package/dist/rules/suppressions/{stylesheet-comments.js → stylesheetComments.js} +1 -1
  161. package/dist/rules/suppressions/stylesheetComments.js.map +1 -0
  162. package/dist/{standard-schema.d.ts → standardSchema.d.ts} +1 -1
  163. package/dist/standardSchema.d.ts.map +1 -0
  164. package/dist/{standard-schema.js → standardSchema.js} +1 -1
  165. package/dist/standardSchema.js.map +1 -0
  166. package/docs/debt-and-hooks.md +2 -2
  167. package/docs/modules.md +25 -24
  168. package/docs/roadmap.md +1 -1
  169. package/docs/rules.md +2 -0
  170. package/package.json +2 -3
  171. package/src/baseline/compare.ts +1 -1
  172. package/src/baseline/update.ts +3 -3
  173. package/src/cli/args.ts +5 -11
  174. package/src/cli/fix.ts +1 -1
  175. package/src/cli/lint.ts +1 -3
  176. package/src/cli/messages.ts +2 -2
  177. package/src/cli/migrate.ts +1 -1
  178. package/src/cli/migrateExceptions.ts +1 -1
  179. package/src/cli/program.ts +1 -1
  180. package/src/cli.ts +1 -1
  181. package/src/config/resolve.ts +2 -2
  182. package/src/config.ts +2 -2
  183. package/src/decoded.ts +1 -1
  184. package/src/engine/evaluate.ts +1 -3
  185. package/src/engine/{run-rules.ts → runRules.ts} +1 -1
  186. package/src/engine/session.ts +2 -2
  187. package/src/engine/violation.ts +2 -2
  188. package/src/hooks/preCommit.ts +1 -1
  189. package/src/imports/generated.ts +1 -1
  190. package/src/imports/resolve.ts +1 -1
  191. package/src/imports/workspace.ts +1 -1
  192. package/src/inventory/collect.ts +1 -1
  193. package/src/inventory/walk.ts +1 -1
  194. package/src/manifests/sorted.ts +1 -1
  195. package/src/report/render.ts +6 -26
  196. package/src/report/stale.ts +1 -1
  197. package/src/rule.ts +1 -1
  198. package/src/rules/{built-in.ts → builtIn.ts} +14 -12
  199. package/src/rules/comments/{no-banner.ts → noBanner.ts} +1 -1
  200. package/src/rules/comments/{no-environment-pragma.ts → noEnvironmentPragma.ts} +1 -1
  201. package/src/rules/comments/{no-line-reference.ts → noLineReference.ts} +1 -1
  202. package/src/rules/comments/{no-pr-reference.ts → noPrReference.ts} +1 -1
  203. package/src/rules/comments/{no-todo.ts → noTodo.ts} +1 -1
  204. package/src/rules/manifestsSourceFirst.ts +48 -0
  205. package/src/rules/suppressions/noIgnoreDeprecations.ts +1 -1
  206. package/src/rules/suppressions/{no-inline.ts → noInline.ts} +1 -1
  207. package/dist/cli/run-main.d.ts.map +0 -1
  208. package/dist/cli/run-main.js.map +0 -1
  209. package/dist/engine/baseline-file.d.ts.map +0 -1
  210. package/dist/engine/baseline-file.js.map +0 -1
  211. package/dist/engine/run-rules.d.ts.map +0 -1
  212. package/dist/engine/run-rules.js.map +0 -1
  213. package/dist/imports/pnpm-workspace.d.ts.map +0 -1
  214. package/dist/imports/pnpm-workspace.js.map +0 -1
  215. package/dist/inventory/ignore-scope.d.ts.map +0 -1
  216. package/dist/inventory/ignore-scope.js.map +0 -1
  217. package/dist/rules/built-in.d.ts.map +0 -1
  218. package/dist/rules/built-in.js.map +0 -1
  219. package/dist/rules/comments/max-per-file.d.ts.map +0 -1
  220. package/dist/rules/comments/max-per-file.js.map +0 -1
  221. package/dist/rules/comments/no-banner.d.ts.map +0 -1
  222. package/dist/rules/comments/no-banner.js.map +0 -1
  223. package/dist/rules/comments/no-environment-pragma.d.ts.map +0 -1
  224. package/dist/rules/comments/no-environment-pragma.js.map +0 -1
  225. package/dist/rules/comments/no-jsdoc.d.ts.map +0 -1
  226. package/dist/rules/comments/no-jsdoc.js.map +0 -1
  227. package/dist/rules/comments/no-line-reference.d.ts.map +0 -1
  228. package/dist/rules/comments/no-line-reference.js.map +0 -1
  229. package/dist/rules/comments/no-pr-reference.d.ts.map +0 -1
  230. package/dist/rules/comments/no-pr-reference.js.map +0 -1
  231. package/dist/rules/comments/no-todo.d.ts.map +0 -1
  232. package/dist/rules/comments/no-todo.js.map +0 -1
  233. package/dist/rules/comments/pattern-rule.d.ts.map +0 -1
  234. package/dist/rules/comments/pattern-rule.js.map +0 -1
  235. package/dist/rules/manifests-sorted.d.ts.map +0 -1
  236. package/dist/rules/manifests-sorted.js.map +0 -1
  237. package/dist/rules/max-lines.d.ts.map +0 -1
  238. package/dist/rules/max-lines.js.map +0 -1
  239. package/dist/rules/suppressions/biome-overrides.d.ts.map +0 -1
  240. package/dist/rules/suppressions/biome-overrides.js.map +0 -1
  241. package/dist/rules/suppressions/no-double-cast.d.ts.map +0 -1
  242. package/dist/rules/suppressions/no-double-cast.js.map +0 -1
  243. package/dist/rules/suppressions/no-inline.d.ts.map +0 -1
  244. package/dist/rules/suppressions/no-inline.js.map +0 -1
  245. package/dist/rules/suppressions/stylesheet-comments.d.ts.map +0 -1
  246. package/dist/rules/suppressions/stylesheet-comments.js.map +0 -1
  247. package/dist/standard-schema.d.ts.map +0 -1
  248. package/dist/standard-schema.js.map +0 -1
  249. /package/src/cli/{run-main.ts → runMain.ts} +0 -0
  250. /package/src/engine/{baseline-file.ts → baselineFile.ts} +0 -0
  251. /package/src/imports/{pnpm-workspace.ts → pnpmWorkspacePatterns.ts} +0 -0
  252. /package/src/inventory/{ignore-scope.ts → ignoreScope.ts} +0 -0
  253. /package/src/rules/comments/{pattern-rule.ts → definePattern.ts} +0 -0
  254. /package/src/rules/comments/{max-per-file.ts → maxPerFile.ts} +0 -0
  255. /package/src/rules/comments/{no-jsdoc.ts → noJsdoc.ts} +0 -0
  256. /package/src/rules/{manifests-sorted.ts → manifestsSorted.ts} +0 -0
  257. /package/src/rules/{max-lines.ts → maxLines.ts} +0 -0
  258. /package/src/rules/suppressions/{biome-overrides.ts → biomeOverrides.ts} +0 -0
  259. /package/src/rules/suppressions/{no-double-cast.ts → noDoubleCast.ts} +0 -0
  260. /package/src/rules/suppressions/{stylesheet-comments.ts → stylesheetComments.ts} +0 -0
  261. /package/src/{standard-schema.ts → standardSchema.ts} +0 -0
@@ -8,4 +8,4 @@ function segment(part) {
8
8
  export function describeIssue(issue) {
9
9
  return issue.path === undefined || issue.path.length === 0 ? issue.message : `${issue.path.map(segment).join(".")}: ${issue.message}`;
10
10
  }
11
- //# sourceMappingURL=standard-schema.js.map
11
+ //# sourceMappingURL=standardSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standardSchema.js","sourceRoot":"","sources":["../src/standardSchema.ts"],"names":[],"mappings":"AAkBA,2HAA2H;AAC3H,SAAS,OAAO,CAAC,GAAgB;IAChC,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACvB,CAAC;AAED,SAAS,OAAO,CAAC,IAAiD;IACjE,OAAO,OAAO,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAoB;IACjD,OAAO,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;AACvI,CAAC"}
@@ -1,6 +1,6 @@
1
1
  # Existing debt, exceptions and commit checks
2
2
 
3
- The [README](../README.md) introduces the gate. Adopt the whole policy with its default error levels; use the baseline to retain old debt rather than warning or off settings. This page explains how to record debt, keep it current as files change and run the gate at commit time. The wider accepted severity API is described under [configuration limits](../README.md#configuration-limits).
3
+ The [README](../README.md) introduces the gate. Adopt the whole policy at error level; use the baseline to retain old debt. This page explains how to record debt, keep it current as files change and run the gate at commit time.
4
4
 
5
5
  ## Baseline
6
6
 
@@ -11,7 +11,7 @@ The [README](../README.md) introduces the gate. Adopt the whole policy with its
11
11
 
12
12
  The baseline is a JSON Lines file with one entry per line: the violations of one rule in one file. `count` is how many violations the file may have. For a rule that counts occurrences, such as `comments/no-jsdoc`, that is the number of occurrences. For a rule with a limit, it is the amount over the limit: the entry above lets `src/server/db.ts` have 412 lines under a limit of 150. A new baseline is sorted by path and then rule. Later edits preserve unrelated lines, including their formatting and order, so the diff shows the entries that changed.
13
13
 
14
- For an error-level rule, `quality lint` fails when a baselined file has more violations than its `count`; the report then lists all of that file's violations for the rule. The accepted warning-level API does not fail on uncovered findings; it is outside the recommended adoption path. A file at or below its entry passes. An entry that allows more than is left, including a file with no violations left, is listed as a note and does not fail, so fixing debt never breaks the build; `tighten` and `prune` lower it. An entry for a rule that is off or unknown fails until it is pruned. The baseline covers violations at any level.
14
+ `quality lint` fails when a baselined file has more violations than its `count`; the report then lists all of that file's violations for the rule. A file at or below its entry passes. An entry that allows more than is left, including a file with no violations left, is listed as a note and does not fail, so fixing debt never breaks the build; `tighten` and `prune` lower it. An entry for an unknown rule fails until it is pruned.
15
15
 
16
16
  - `quality baseline write` records every error-level violation when there is no baseline yet. Once a baseline exists it refuses, unless `--rule <id>` names the rules to record: it then replaces the entries of those rules with what the files have now, and leaves every other entry as it is.
17
17
  - `quality baseline tighten` lowers and removes the entries of files changed since `HEAD`, and with `--staged`, of the files staged for the next commit. It carries the entry of a file that git sees as moved to the new path. Every other line stays byte for byte.
package/docs/modules.md CHANGED
@@ -9,11 +9,11 @@ A module link opens its source. Type and value declarations with the same name a
9
9
  | Module | Exported names |
10
10
  | --- | --- |
11
11
  | [cli.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/cli.ts) | None; executable entry. |
12
- | [config.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/config.ts) | `Level`, `RuleSetting`, `RuleSettings`, `BuiltInRules`, `QualityConfig`, `defineConfig` |
12
+ | [config.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/config.ts) | `Level` (`"error"`), `RuleSetting`, `RuleSettings`, `BuiltInRules`, `QualityConfig`, `defineConfig` |
13
13
  | [decoded.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/decoded.ts) | `Decoded`, `decodeWith`, `validOrFail` |
14
14
  | [failure.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/failure.ts) | `SetupFailure`, `GateFailed` |
15
15
  | [rule.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rule.ts) | `Finding`, `Findings`, `SourceFile`, `RuleInputs`, `RuleContext`, `Configured`, `Rule`, `defineRule` |
16
- | [standard-schema.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/standard-schema.ts) | `StandardSchemaV1`, `StandardResult`, `StandardIssue`, `describeIssue` |
16
+ | [standardSchema.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/standardSchema.ts) | `StandardSchemaV1`, `StandardResult`, `StandardIssue`, `describeIssue` |
17
17
  | [testProjects.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/testProjects.ts) | `testProjects` |
18
18
 
19
19
  ## baseline
@@ -50,7 +50,7 @@ A module link opens its source. Type and value declarations with the same name a
50
50
  | [cli/migrate.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/cli/migrate.ts) | `migrateBaseline` |
51
51
  | [cli/migrateExceptions.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/cli/migrateExceptions.ts) | `migrateExceptions` |
52
52
  | [cli/program.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/cli/program.ts) | `Invocation`, `program` |
53
- | [cli/run-main.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/cli/run-main.ts) | `exitCode`, `quietOnClosedPipe`, `services`, `explained`, `runMain` |
53
+ | [cli/runMain.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/cli/runMain.ts) | `exitCode`, `quietOnClosedPipe`, `services`, `explained`, `runMain` |
54
54
  | [cli/shrink.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/cli/shrink.ts) | `pruneBaseline`, `tightenBaseline` |
55
55
 
56
56
  ## config
@@ -66,11 +66,11 @@ A module link opens its source. Type and value declarations with the same name a
66
66
 
67
67
  | Module | Exported names |
68
68
  | --- | --- |
69
- | [engine/baseline-file.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/engine/baseline-file.ts) | `BaselineFile`, `readInput`, `readBaseline` |
69
+ | [engine/baselineFile.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/engine/baselineFile.ts) | `BaselineFile`, `readInput`, `readBaseline` |
70
70
  | [engine/evaluate.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/engine/evaluate.ts) | `Outcome`, `evaluate`, `passes` |
71
- | [engine/run-rules.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/engine/run-rules.ts) | `ActiveRule`, `runRules` |
71
+ | [engine/runRules.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/engine/runRules.ts) | `ActiveRule`, `runRules` |
72
72
  | [engine/session.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/engine/session.ts) | `Session`, `scan`, `openSession` |
73
- | [engine/violation.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/engine/violation.ts) | `ActiveLevel`, `Violation`, `keyOf`, `byLocation`, `groupBy`, `RuleIndex`, `covers`, `levelOf`, `registrable`, `unusedEntryProblem` |
73
+ | [engine/violation.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/engine/violation.ts) | `ActiveLevel` (`"error"`), `Violation`, `keyOf`, `byLocation`, `groupBy`, `RuleIndex`, `covers`, `levelOf`, `registrable`, `unusedEntryProblem` |
74
74
 
75
75
  ## exceptions
76
76
 
@@ -116,7 +116,7 @@ A module link opens its source. Type and value declarations with the same name a
116
116
  | [imports/glob.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/imports/glob.ts) | `globMatcher` |
117
117
  | [imports/graph.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/imports/graph.ts) | `ImportEdge`, `UnresolvedImport`, `ImportGraph`, `importGraph` |
118
118
  | [imports/paths.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/imports/paths.ts) | `shortestPath` |
119
- | [imports/pnpm-workspace.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/imports/pnpm-workspace.ts) | `pnpmWorkspacePatterns` |
119
+ | [imports/pnpmWorkspacePatterns.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/imports/pnpmWorkspacePatterns.ts) | `pnpmWorkspacePatterns` |
120
120
  | [imports/projects.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/imports/projects.ts) | `Project`, `projectsFor` |
121
121
  | [imports/resolve.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/imports/resolve.ts) | `Endpoint`, `builtinName`, `packageNameOf`, `isDeclarationFile`, `presumedTarget`, `resolveImport` |
122
122
  | [imports/runtime.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/imports/runtime.ts) | `Runtime`, `runtimeOf` |
@@ -145,7 +145,7 @@ A module link opens its source. Type and value declarations with the same name a
145
145
  | --- | --- |
146
146
  | [inventory/collect.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/inventory/collect.ts) | `InventoryScope`, `Inventory`, `linesOf`, `collectInventory` |
147
147
  | [inventory/filesystem.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/inventory/filesystem.ts) | `FilesystemFailure`, `orWhenAbsent`, `readOptionalText`, `readRequiredText`, `writeText` |
148
- | [inventory/ignore-scope.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/inventory/ignore-scope.ts) | `Verdict`, `IgnoreScope`, `emptyScope`, `posix`, `withIgnoreFile`, `insideKept`, `verdictFor` |
148
+ | [inventory/ignoreScope.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/inventory/ignoreScope.ts) | `Verdict`, `IgnoreScope`, `emptyScope`, `posix`, `withIgnoreFile`, `insideKept`, `verdictFor` |
149
149
  | [inventory/trackedPaths.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/inventory/trackedPaths.ts) | `trackedPaths`, `ignoredTrackedPaths` |
150
150
  | [inventory/walk.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/inventory/walk.ts) | `ignoreScopeAt`, `scopeAbove`, `walk` |
151
151
 
@@ -171,7 +171,7 @@ A module link opens its source. Type and value declarations with the same name a
171
171
  | Module | Exported names |
172
172
  | --- | --- |
173
173
  | [report/plural.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/report/plural.ts) | `plural` |
174
- | [report/render.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/report/render.ts) | `WarningDetail`, `ReportContext`, `render` |
174
+ | [report/render.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/report/render.ts) | `ReportContext`, `render` |
175
175
  | [report/stale.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/report/stale.ts) | `staleSections` |
176
176
 
177
177
  ## rules
@@ -179,9 +179,10 @@ A module link opens its source. Type and value declarations with the same name a
179
179
  | Module | Exported names |
180
180
  | --- | --- |
181
181
  | [rules/biome.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/biome.ts) | `PRESET`, `rootConfig`, `biome` |
182
- | [rules/built-in.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/built-in.ts) | `builtInRules` |
183
- | [rules/manifests-sorted.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/manifests-sorted.ts) | `manifestsSorted` |
184
- | [rules/max-lines.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/max-lines.ts) | `maxLines` |
182
+ | [rules/builtIn.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/builtIn.ts) | `builtInRules` |
183
+ | [rules/manifestsSorted.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/manifestsSorted.ts) | `manifestsSorted` |
184
+ | [rules/manifestsSourceFirst.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/manifestsSourceFirst.ts) | `manifestsSourceFirst` |
185
+ | [rules/maxLines.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/maxLines.ts) | `maxLines` |
185
186
  | [rules/maxDepth.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/maxDepth.ts) | `maxDepth` |
186
187
  | [rules/noBarrel.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/noBarrel.ts) | `noBarrel` |
187
188
  | [rules/syntax.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/syntax.ts) | `parse` |
@@ -191,14 +192,14 @@ A module link opens its source. Type and value declarations with the same name a
191
192
  | Module | Exported names |
192
193
  | --- | --- |
193
194
  | [rules/comments/kinds.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/kinds.ts) | `Pragmas`, `textOf`, `isJsdoc`, `isPragma`, `isDirective` |
194
- | [rules/comments/max-per-file.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/max-per-file.ts) | `maxPerFile` |
195
- | [rules/comments/no-banner.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/no-banner.ts) | `noBanner` |
196
- | [rules/comments/no-environment-pragma.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/no-environment-pragma.ts) | `noEnvironmentPragma` |
197
- | [rules/comments/no-jsdoc.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/no-jsdoc.ts) | `noJsdoc` |
198
- | [rules/comments/no-line-reference.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/no-line-reference.ts) | `noLineReference` |
199
- | [rules/comments/no-pr-reference.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/no-pr-reference.ts) | `noPrReference` |
200
- | [rules/comments/no-todo.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/no-todo.ts) | `noTodo` |
201
- | [rules/comments/pattern-rule.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/pattern-rule.ts) | `definePatternRule` |
195
+ | [rules/comments/maxPerFile.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/maxPerFile.ts) | `maxPerFile` |
196
+ | [rules/comments/noBanner.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/noBanner.ts) | `noBanner` |
197
+ | [rules/comments/noEnvironmentPragma.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/noEnvironmentPragma.ts) | `noEnvironmentPragma` |
198
+ | [rules/comments/noJsdoc.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/noJsdoc.ts) | `noJsdoc` |
199
+ | [rules/comments/noLineReference.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/noLineReference.ts) | `noLineReference` |
200
+ | [rules/comments/noPrReference.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/noPrReference.ts) | `noPrReference` |
201
+ | [rules/comments/noTodo.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/noTodo.ts) | `noTodo` |
202
+ | [rules/comments/definePattern.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/definePattern.ts) | `definePatternRule` |
202
203
  | [rules/comments/scan.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/comments/scan.ts) | `SourceComment`, `bodyOf`, `scanComments`, `commentsOf` |
203
204
 
204
205
  ## rules/files
@@ -235,13 +236,13 @@ A module link opens its source. Type and value declarations with the same name a
235
236
 
236
237
  | Module | Exported names |
237
238
  | --- | --- |
238
- | [rules/suppressions/biome-overrides.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/suppressions/biome-overrides.ts) | `biomeOverrides` |
239
+ | [rules/suppressions/biomeOverrides.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/suppressions/biomeOverrides.ts) | `biomeOverrides` |
239
240
  | [rules/suppressions/biomeRecommended.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/suppressions/biomeRecommended.ts) | `biomeRecommendedFrom`, `biomeRecommended` |
240
241
  | [rules/suppressions/directives.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/suppressions/directives.ts) | `SUPPRESSIONS`, `suppressionIn` |
241
- | [rules/suppressions/no-double-cast.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/suppressions/no-double-cast.ts) | `noDoubleCast` |
242
- | [rules/suppressions/no-inline.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/suppressions/no-inline.ts) | `noInline` |
242
+ | [rules/suppressions/noDoubleCast.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/suppressions/noDoubleCast.ts) | `noDoubleCast` |
243
+ | [rules/suppressions/noInline.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/suppressions/noInline.ts) | `noInline` |
243
244
  | [rules/suppressions/noIgnoreDeprecations.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/suppressions/noIgnoreDeprecations.ts) | `noIgnoreDeprecations` |
244
- | [rules/suppressions/stylesheet-comments.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/suppressions/stylesheet-comments.ts) | `STYLESHEET`, `stylesheetComments` |
245
+ | [rules/suppressions/stylesheetComments.ts](https://github.com/ShivaeDev/platform/blob/main/packages/quality/src/rules/suppressions/stylesheetComments.ts) | `STYLESHEET`, `stylesheetComments` |
245
246
 
246
247
  ## rules/suppressions/biome
247
248
 
package/docs/roadmap.md CHANGED
@@ -4,6 +4,7 @@ This page owns Quality's shared policy, tooling, CLI and hook implementation sta
4
4
 
5
5
  ## Built
6
6
 
7
+ - [x] Error-only engine and report, with no CLI warning-report controls; old-debt adoption stays in the baseline.
7
8
  - [x] Optional typed and runtime-validated config with config-free defaults; built-in and local rules enforced at `error`; local-rule and Standard Schema option APIs; one checked inventory and one report grouped by rule.
8
9
  - [x] The public config rejects `warn`, `off`, raised thresholds, inventory exclusions and custom test-file patterns. Vitest projects reject suite exclusions. Reasoned Biome declarations cover individual rules on explicit files and named directory exclusions.
9
10
  - [x] A JSON Lines baseline with counted debt, explicit named-rule recording, lowering and pruning, tracked-move handling and preservation of unrelated lines.
@@ -20,7 +21,6 @@ This page owns Quality's shared policy, tooling, CLI and hook implementation sta
20
21
 
21
22
  ## Next
22
23
 
23
- - [ ] Remove obsolete CLI warning-report controls; config levels are already enforced at `error`. Keep old-debt adoption in the baseline.
24
24
  - [ ] Reduce policy-tuning inputs to the ones checks need about a repository. Thresholds can only be lowered; local-rule APIs remain exposed. Review the remaining extension boundary.
25
25
  - [ ] Split Grit implementation modules by the checks they own, without making consumers select competing presets; route Platform's remaining static checks through Quality.
26
26
  - [ ] Define the Effect-boundary rule's source and test scope before porting the repository's `try`/`async` restrictions.
package/docs/rules.md CHANGED
@@ -249,6 +249,8 @@ A finding has its fence's name as its subject, so a config exception with that s
249
249
 
250
250
  `manifests/sorted` keeps every `package.json` in the repository in the key order of [sort-package-json](https://github.com/keithamus/sort-package-json), a dependency of this package. It walks the whole repository, not only the sources, and skips untracked files ignored by git and `node_modules`. A manifest that is not valid JSON is reported too. `quality fix` sorts the manifests, and the rule takes no exceptions.
251
251
 
252
+ `manifests/source-first` reports each condition block in the `exports` or `imports` of a `package.json` that names the `source` condition after another condition, nested blocks included. TypeScript takes the first condition that matches, and `types` always matches, so once built output exists a block that lists `types` first sends TypeScript to the built declarations instead of the sources. Each finding names the line of the block. Move `source` to the top of it. Like `manifests/sorted`, the rule walks the whole repository and takes no exceptions.
253
+
252
254
  ## Local-rule API
253
255
 
254
256
  The API allows a local rule to receive checked source text and return findings. This is an extension reference, not a step every repository must complete; reusable quality policy belongs in the shared package. This example is the same text-scanning rule exercised by the package's CLI tests:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shivaedev/quality",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "Repository quality gate with typed rules, a baseline of existing debt and a registry of reasoned exceptions",
5
5
  "homepage": "https://github.com/ShivaeDev/platform/tree/main/packages/quality#readme",
6
6
  "bugs": {
@@ -24,9 +24,8 @@
24
24
  },
25
25
  "exports": {
26
26
  "./*.ts": {
27
- "types": "./dist/*.d.ts",
28
27
  "source": "./src/*.ts",
29
- "import": "./dist/*.js",
28
+ "types": "./dist/*.d.ts",
30
29
  "default": "./dist/*.js"
31
30
  },
32
31
  "./biome": "./biome/preset.json",
@@ -33,7 +33,7 @@ export function applyBaseline(violations: readonly Violation[], entries: readonl
33
33
  const group = groups.get(keyOf(entry.rule, entry.file)) ?? [];
34
34
  if (group.length === 0) {
35
35
  const level = levelOf(rules, entry.rule);
36
- (level === undefined || level === "off" ? stale : loose).push({
36
+ (level === undefined ? stale : loose).push({
37
37
  entry,
38
38
  problem: unusedEntryProblem(rules, entry.rule, "has no violations left"),
39
39
  });
@@ -29,7 +29,7 @@ function refusal(id: string, index: RuleIndex): readonly string[] {
29
29
  if (level === undefined) {
30
30
  return [`${id}: no built-in or local rule has this id.`];
31
31
  }
32
- return level === "error" ? [] : [`${id}: the rule is ${level}. Set it to error before baselining it.`];
32
+ return [];
33
33
  }
34
34
 
35
35
  export function adopt(
@@ -49,7 +49,7 @@ export function adopt(
49
49
  return rules.some((name) => covers(name, rule));
50
50
  }
51
51
  const kept = (existing ?? []).filter((entry) => !named(entry.rule));
52
- const adopted = violations.filter((violation) => violation.level === "error" && (rules.length === 0 || named(violation.rule)));
52
+ const adopted = violations.filter((violation) => rules.length === 0 || named(violation.rule));
53
53
  const added = record(adopted);
54
54
  return { _tag: "Adopted", added: added.length, entries: [...kept, ...added], replaced: (existing ?? []).length - kept.length };
55
55
  }
@@ -89,7 +89,7 @@ export function prune(
89
89
  }
90
90
  const level = levelOf(index, before.rule);
91
91
  const now = current.get(keyOf(before.rule, before.file)) ?? destination(before, current, scope.moves, taken);
92
- if (now === undefined || level === undefined || level === "off") {
92
+ if (now === undefined || level === undefined) {
93
93
  return [];
94
94
  }
95
95
  moved += Number(now.file !== before.file);
package/src/cli/args.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  import { parseArgs } from "node:util";
2
2
  import { Result } from "effect";
3
- import type { WarningDetail } from "#report/render.ts";
4
3
  import { ADOPT_REMOVED, USAGE as COMMAND_USAGE } from "./messages.ts";
5
4
 
6
5
  export type Command =
7
- | { readonly _tag: "Lint"; readonly config: string | undefined; readonly warnings: WarningDetail }
6
+ | { readonly _tag: "Lint"; readonly config: string | undefined }
8
7
  | { readonly _tag: "ExceptionsMigrate"; readonly config: string | undefined; readonly from: string | undefined }
9
8
  | { readonly _tag: "Fix"; readonly config: string | undefined }
10
9
  | { readonly _tag: "BaselineWrite"; readonly config: string | undefined; readonly rules: readonly string[] }
@@ -28,7 +27,6 @@ const OPTIONS = {
28
27
  help: { short: "h", type: "boolean" },
29
28
  rule: { multiple: true, type: "string" },
30
29
  staged: { type: "boolean" },
31
- warnings: { type: "string" },
32
30
  } as const;
33
31
 
34
32
  function usage(problem: string): Parsed {
@@ -49,7 +47,7 @@ type Values = ReturnType<typeof parseArgs<{ options: typeof OPTIONS; allowPositi
49
47
 
50
48
  type Option = Exclude<keyof Values, "config" | "help">;
51
49
 
52
- const COMMAND_OPTIONS: readonly Option[] = ["against", "force", "from", "rule", "staged", "warnings"];
50
+ const COMMAND_OPTIONS: readonly Option[] = ["against", "force", "from", "rule", "staged"];
53
51
 
54
52
  const ACCEPTS: Readonly<Record<string, readonly Option[]>> = {
55
53
  "baseline migrate": ["from"],
@@ -61,7 +59,7 @@ const ACCEPTS: Readonly<Record<string, readonly Option[]>> = {
61
59
  "hooks install": ["force"],
62
60
  "hooks pre-commit": [],
63
61
  "hooks uninstall": [],
64
- lint: ["warnings"],
62
+ lint: [],
65
63
  };
66
64
 
67
65
  function misplaced(name: string, values: Values): string | undefined {
@@ -77,12 +75,8 @@ function ref(against: string | undefined, command: Command): Parsed {
77
75
  function commandFor(name: string, values: Values): Parsed {
78
76
  const config = values.config;
79
77
  switch (name) {
80
- case "lint": {
81
- const warnings = values.warnings ?? "summary";
82
- return warnings === "summary" || warnings === "all"
83
- ? parsed({ _tag: "Lint", config, warnings })
84
- : usage(`--warnings takes summary or all, not "${warnings}".`);
85
- }
78
+ case "lint":
79
+ return parsed({ _tag: "Lint", config });
86
80
  case "exceptions migrate":
87
81
  return parsed({ _tag: "ExceptionsMigrate", config, from: values.from });
88
82
  case "fix":
package/src/cli/fix.ts CHANGED
@@ -4,7 +4,7 @@ import { biomeReport, type Report } from "#biome/report.ts";
4
4
  import { loadConfig } from "#config/load.ts";
5
5
  import type { ExceptionDeclaration } from "#exceptions/declaration.ts";
6
6
  import { SetupFailure } from "#failure.ts";
7
- import { posix } from "#inventory/ignore-scope.ts";
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";
package/src/cli/lint.ts CHANGED
@@ -3,12 +3,11 @@ import { Console, Effect, type FileSystem } from "effect";
3
3
  import { evaluate, passes } from "#engine/evaluate.ts";
4
4
  import { openSession } from "#engine/session.ts";
5
5
  import { GateFailed, type SetupFailure } from "#failure.ts";
6
- import { render, type WarningDetail } from "#report/render.ts";
6
+ import { render } from "#report/render.ts";
7
7
 
8
8
  export const lint = Effect.fn("Cli.lint")(function* (
9
9
  cwd: string,
10
10
  config: string | undefined,
11
- warnings: WarningDetail,
12
11
  ): Effect.fn.Return<void, SetupFailure | GateFailed, FileSystem.FileSystem> {
13
12
  const session = yield* openSession(cwd, config);
14
13
  const outcome = evaluate(session.violations, session.registry, session.baseline.entries, session.config);
@@ -18,7 +17,6 @@ export const lint = Effect.fn("Cli.lint")(function* (
18
17
  checked: session.inventory.sources.length,
19
18
  descriptions: new Map(session.config.active.map((rule) => [rule.id, rule.description])),
20
19
  registry: session.config.exceptions.length === 0 ? session.config.registry : `${relative(session.config.root, session.config.file)} exceptions`,
21
- warnings,
22
20
  }),
23
21
  );
24
22
  if (!passes(outcome)) {
@@ -1,5 +1,5 @@
1
1
  export const USAGE = `Usage:
2
- quality lint [--config <file>] [--warnings summary|all]
2
+ quality lint [--config <file>]
3
3
  quality fix [--config <file>]
4
4
  quality exceptions migrate [--config <file>] [--from <registry>]
5
5
  quality baseline write [--config <file>] [--rule <id>]...
@@ -11,7 +11,7 @@ export const USAGE = `Usage:
11
11
  quality hooks pre-commit [--config <file>]
12
12
 
13
13
  lint Run every rule. Exits 1 on an error-level violation, a file over its baseline, a stale registry entry
14
- or a baseline entry for a rule that is off or unknown.
14
+ or a baseline entry for an unknown rule.
15
15
  fix Sort every package.json, apply Biome's lint fixes, unsafe ones included, its assist actions and formatting, then format again.
16
16
  exceptions migrate Move legacy registry entries and Biome declarations into quality.config.ts exceptions and remove matching root overrides.
17
17
  baseline write Record current error-level violations. Creates the baseline, or records the named rules again, replacing their entries.
@@ -4,7 +4,7 @@ import { encodeBaseline } from "#baseline/format.ts";
4
4
  import { convertLegacy, decodeLegacyBaseline, LEGACY_BASELINE } from "#baseline/legacy.ts";
5
5
  import { loadConfig } from "#config/load.ts";
6
6
  import { validOrFail } from "#decoded.ts";
7
- import { readInput } from "#engine/baseline-file.ts";
7
+ import { readInput } from "#engine/baselineFile.ts";
8
8
  import { scan } from "#engine/session.ts";
9
9
  import { SetupFailure } from "#failure.ts";
10
10
  import { writeText } from "#inventory/filesystem.ts";
@@ -2,7 +2,7 @@ import { join } from "node:path";
2
2
  import { Console, Effect, FileSystem } from "effect";
3
3
  import { loadConfig } from "#config/load.ts";
4
4
  import { validOrFail } from "#decoded.ts";
5
- import { readInput } from "#engine/baseline-file.ts";
5
+ import { readInput } from "#engine/baselineFile.ts";
6
6
  import { decodeExceptions, type ExceptionDeclaration } from "#exceptions/declaration.ts";
7
7
  import { migrateBiome } from "#exceptions/migrateBiome.ts";
8
8
  import { migrateConfig } from "#exceptions/migrateConfig.ts";
@@ -27,7 +27,7 @@ export const program = Effect.fn("Cli.program")(function* (args: readonly string
27
27
  case "Help":
28
28
  return yield* Console.log(USAGE);
29
29
  case "Lint":
30
- return yield* lint(cwd, command.config, command.warnings);
30
+ return yield* lint(cwd, command.config);
31
31
  case "Fix":
32
32
  return yield* fix(cwd, command.config);
33
33
  case "BaselineWrite":
package/src/cli.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import process from "node:process";
3
3
  import { program } from "#cli/program.ts";
4
- import { runMain } from "#cli/run-main.ts";
4
+ import { runMain } from "#cli/runMain.ts";
5
5
 
6
6
  runMain(program(process.argv.slice(2), { cwd: process.cwd(), launch: { options: process.execArgv, script: process.argv[1] ?? "" } }));
@@ -1,9 +1,9 @@
1
1
  import { Effect } from "effect";
2
2
  import type { Decoded } from "#decoded.ts";
3
- import type { ActiveRule } from "#engine/run-rules.ts";
3
+ import type { ActiveRule } from "#engine/runRules.ts";
4
4
  import type { RuleIndex } from "#engine/violation.ts";
5
5
  import type { Rule } from "#rule.ts";
6
- import { builtInRules } from "#rules/built-in.ts";
6
+ import { builtInRules } from "#rules/builtIn.ts";
7
7
  import type { ConfigInput } from "./decode.ts";
8
8
 
9
9
  export interface ResolvedRules extends RuleIndex {
package/src/config.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import type { ExceptionDeclaration } from "#exceptions/declaration.ts";
2
- import type { builtInRules } from "#rules/built-in.ts";
2
+ import type { builtInRules } from "#rules/builtIn.ts";
3
3
  import type { Rule } from "./rule.ts";
4
4
 
5
- export type Level = "error" | "warn" | "off";
5
+ export type Level = "error";
6
6
 
7
7
  export type RuleSetting<TInput> = "error" | { readonly level?: "error"; readonly options?: TInput };
8
8
 
package/src/decoded.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Effect } from "effect";
2
2
  import { SetupFailure } from "./failure.ts";
3
- import { describeIssue, type StandardSchemaV1 } from "./standard-schema.ts";
3
+ import { describeIssue, type StandardSchemaV1 } from "./standardSchema.ts";
4
4
 
5
5
  export type Decoded<TValue> = { readonly _tag: "Valid"; readonly value: TValue } | { readonly _tag: "Invalid"; readonly issues: readonly string[] };
6
6
 
@@ -11,7 +11,6 @@ export interface Outcome {
11
11
  readonly regressions: readonly Regression[];
12
12
  readonly staleBaseline: readonly StaleBaselineEntry[];
13
13
  readonly staleRegistry: readonly StaleRegistryEntry[];
14
- readonly warnings: readonly Violation[];
15
14
  }
16
15
 
17
16
  export function evaluate(
@@ -25,13 +24,12 @@ export function evaluate(
25
24
  const kept = [...baselined.kept].sort(byLocation);
26
25
  return {
27
26
  baselined: baselined.baselined,
28
- errors: kept.filter((violation) => violation.level === "error"),
27
+ errors: kept,
29
28
  looseBaseline: baselined.loose,
30
29
  registered: registered.registered,
31
30
  regressions: baselined.regressions,
32
31
  staleBaseline: baselined.stale,
33
32
  staleRegistry: registered.stale,
34
- warnings: kept.filter((violation) => violation.level === "warn"),
35
33
  };
36
34
  }
37
35
 
@@ -1,7 +1,7 @@
1
1
  import { isAbsolute, relative } from "node:path";
2
2
  import { Effect } from "effect";
3
3
  import { SetupFailure } from "#failure.ts";
4
- import { posix } from "#inventory/ignore-scope.ts";
4
+ import { posix } from "#inventory/ignoreScope.ts";
5
5
  import type { Finding, Findings, RuleInputs } from "#rule.ts";
6
6
  import type { ActiveLevel, Violation } from "./violation.ts";
7
7
 
@@ -7,8 +7,8 @@ import { registryEntries } from "#exceptions/registryEntries.ts";
7
7
  import { SetupFailure } from "#failure.ts";
8
8
  import { collectInventory, type Inventory } from "#inventory/collect.ts";
9
9
  import { type FilesystemFailure, readOptionalText } from "#inventory/filesystem.ts";
10
- import { type BaselineFile, readBaseline, readInput } from "./baseline-file.ts";
11
- import { runRules } from "./run-rules.ts";
10
+ import { type BaselineFile, readBaseline, readInput } from "./baselineFile.ts";
11
+ import { runRules } from "./runRules.ts";
12
12
  import type { Violation } from "./violation.ts";
13
13
 
14
14
  export interface Session {
@@ -1,7 +1,7 @@
1
1
  import type { Level } from "#config.ts";
2
2
  import type { Finding } from "#rule.ts";
3
3
 
4
- export type ActiveLevel = "error" | "warn";
4
+ export type ActiveLevel = "error";
5
5
 
6
6
  export interface Violation extends Finding {
7
7
  readonly level: ActiveLevel;
@@ -56,5 +56,5 @@ export function unusedEntryProblem(index: RuleIndex, rule: string, unused: strin
56
56
  if (level === undefined) {
57
57
  return "names no known rule";
58
58
  }
59
- return level === "off" ? "names a rule that is off" : unused;
59
+ return unused;
60
60
  }
@@ -48,7 +48,7 @@ const runScript = Effect.fnUntraced(
48
48
  export const preCommitHook = Effect.fn("Hooks.preCommitHook")(function* (cwd: string, path: string | undefined) {
49
49
  const config = yield* loadConfig(cwd, path);
50
50
  const { manager, scripts } = yield* commitScripts(config.root);
51
- const linted = yield* lint(cwd, path, "summary").pipe(
51
+ const linted = yield* lint(cwd, path).pipe(
52
52
  Effect.as(true),
53
53
  Effect.catchTag("GateFailed", () => Effect.succeed(false)),
54
54
  );
@@ -1,7 +1,7 @@
1
1
  import { execFile } from "node:child_process";
2
2
  import { posix } from "node:path";
3
3
  import { promisify } from "node:util";
4
- import { emptyScope, type IgnoreScope, verdictFor, withIgnoreFile } from "#inventory/ignore-scope.ts";
4
+ import { emptyScope, type IgnoreScope, verdictFor, withIgnoreFile } from "#inventory/ignoreScope.ts";
5
5
  import type { RuleInputs } from "#rule.ts";
6
6
  import type { ImportGraph, UnresolvedImport } from "./graph.ts";
7
7
 
@@ -2,7 +2,7 @@ import { realpathSync } from "node:fs";
2
2
  import { isBuiltin } from "node:module";
3
3
  import { dirname, join, relative } from "node:path";
4
4
  import ts from "typescript";
5
- import { posix } from "#inventory/ignore-scope.ts";
5
+ import { posix } from "#inventory/ignoreScope.ts";
6
6
  import type { Ambient } from "./ambient.ts";
7
7
  import type { ImportRequest } from "./extract.ts";
8
8
  import type { Project } from "./projects.ts";
@@ -4,7 +4,7 @@ import { Effect } from "effect";
4
4
  import { manifestsIn } from "#manifests/sorted.ts";
5
5
  import type { RuleInputs } from "#rule.ts";
6
6
  import { globMatcher } from "./glob.ts";
7
- import { pnpmWorkspacePatterns } from "./pnpm-workspace.ts";
7
+ import { pnpmWorkspacePatterns } from "./pnpmWorkspacePatterns.ts";
8
8
 
9
9
  export interface WorkspacePackage {
10
10
  readonly directory: string;
@@ -3,7 +3,7 @@ import { Effect, FileSystem } from "effect";
3
3
  import ignore from "ignore";
4
4
  import type { SourceFile } from "#rule.ts";
5
5
  import { FilesystemFailure, orWhenAbsent, readRequiredText } from "./filesystem.ts";
6
- import { posix } from "./ignore-scope.ts";
6
+ import { posix } from "./ignoreScope.ts";
7
7
  import { scopeAbove, walk } from "./walk.ts";
8
8
 
9
9
  export interface InventoryScope {
@@ -1,7 +1,7 @@
1
1
  import { dirname, join, relative, sep } from "node:path";
2
2
  import { Effect, FileSystem } from "effect";
3
3
  import { FilesystemFailure, orWhenAbsent, readOptionalText } from "./filesystem.ts";
4
- import { emptyScope, type IgnoreScope, insideKept, verdictFor, withIgnoreFile } from "./ignore-scope.ts";
4
+ import { emptyScope, type IgnoreScope, insideKept, verdictFor, withIgnoreFile } from "./ignoreScope.ts";
5
5
  import { trackedPaths } from "./trackedPaths.ts";
6
6
 
7
7
  const SKIPPED = new Set([".git", "node_modules"]);
@@ -2,7 +2,7 @@ import { basename, join, relative } from "node:path";
2
2
  import { Effect, FileSystem } from "effect";
3
3
  import { sortPackageJson } from "sort-package-json";
4
4
  import { FilesystemFailure } from "#inventory/filesystem.ts";
5
- import { posix } from "#inventory/ignore-scope.ts";
5
+ import { posix } from "#inventory/ignoreScope.ts";
6
6
  import { walk } from "#inventory/walk.ts";
7
7
 
8
8
  export type Sorting = { readonly _tag: "Invalid" } | { readonly _tag: "Sorted" } | { readonly _tag: "Unsorted"; readonly sorted: string };