@shivaedev/quality 0.7.1 → 0.7.3

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 (276) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/baseline/compare.d.ts +1 -1
  3. package/dist/baseline/compare.d.ts.map +1 -1
  4. package/dist/baseline/compare.js +1 -1
  5. package/dist/baseline/compare.js.map +1 -1
  6. package/dist/baseline/format.d.ts +1 -1
  7. package/dist/baseline/format.d.ts.map +1 -1
  8. package/dist/baseline/format.js +2 -2
  9. package/dist/baseline/format.js.map +1 -1
  10. package/dist/baseline/legacy.d.ts +2 -2
  11. package/dist/baseline/legacy.d.ts.map +1 -1
  12. package/dist/baseline/legacy.js +2 -2
  13. package/dist/baseline/legacy.js.map +1 -1
  14. package/dist/baseline/rewrite.js +1 -1
  15. package/dist/baseline/rewrite.js.map +1 -1
  16. package/dist/baseline/update.d.ts +1 -1
  17. package/dist/baseline/update.d.ts.map +1 -1
  18. package/dist/baseline/update.js +1 -1
  19. package/dist/baseline/update.js.map +1 -1
  20. package/dist/cli/args.d.ts +1 -1
  21. package/dist/cli/args.d.ts.map +1 -1
  22. package/dist/cli/args.js +4 -0
  23. package/dist/cli/args.js.map +1 -1
  24. package/dist/cli/baseline.d.ts +3 -3
  25. package/dist/cli/baseline.d.ts.map +1 -1
  26. package/dist/cli/baseline.js +7 -7
  27. package/dist/cli/baseline.js.map +1 -1
  28. package/dist/cli/fix.d.ts +8 -3
  29. package/dist/cli/fix.d.ts.map +1 -1
  30. package/dist/cli/fix.js +63 -36
  31. package/dist/cli/fix.js.map +1 -1
  32. package/dist/cli/lint.d.ts +2 -2
  33. package/dist/cli/lint.d.ts.map +1 -1
  34. package/dist/cli/lint.js +4 -4
  35. package/dist/cli/lint.js.map +1 -1
  36. package/dist/cli/migrate.d.ts +1 -1
  37. package/dist/cli/migrate.d.ts.map +1 -1
  38. package/dist/cli/migrate.js +9 -9
  39. package/dist/cli/migrate.js.map +1 -1
  40. package/dist/cli/run-main.d.ts +3 -1
  41. package/dist/cli/run-main.d.ts.map +1 -1
  42. package/dist/cli/run-main.js +13 -1
  43. package/dist/cli/run-main.js.map +1 -1
  44. package/dist/cli/shrink.d.ts +2 -2
  45. package/dist/cli/shrink.d.ts.map +1 -1
  46. package/dist/cli/shrink.js +2 -2
  47. package/dist/cli/shrink.js.map +1 -1
  48. package/dist/cli.js +7 -7
  49. package/dist/cli.js.map +1 -1
  50. package/dist/config/decode.d.ts +3 -2
  51. package/dist/config/decode.d.ts.map +1 -1
  52. package/dist/config/decode.js +5 -1
  53. package/dist/config/decode.js.map +1 -1
  54. package/dist/config/load.d.ts +2 -2
  55. package/dist/config/load.d.ts.map +1 -1
  56. package/dist/config/load.js +2 -2
  57. package/dist/config/load.js.map +1 -1
  58. package/dist/config/resolve.d.ts +3 -3
  59. package/dist/config/resolve.d.ts.map +1 -1
  60. package/dist/config/resolve.js +1 -1
  61. package/dist/config/resolve.js.map +1 -1
  62. package/dist/config.d.ts +1 -1
  63. package/dist/config.d.ts.map +1 -1
  64. package/dist/engine/baseline-file.d.ts +3 -3
  65. package/dist/engine/baseline-file.d.ts.map +1 -1
  66. package/dist/engine/baseline-file.js +5 -5
  67. package/dist/engine/baseline-file.js.map +1 -1
  68. package/dist/engine/evaluate.d.ts +3 -3
  69. package/dist/engine/evaluate.d.ts.map +1 -1
  70. package/dist/engine/evaluate.js +2 -2
  71. package/dist/engine/evaluate.js.map +1 -1
  72. package/dist/engine/run-rules.d.ts +2 -2
  73. package/dist/engine/run-rules.d.ts.map +1 -1
  74. package/dist/engine/run-rules.js +2 -2
  75. package/dist/engine/run-rules.js.map +1 -1
  76. package/dist/engine/session.d.ts +4 -4
  77. package/dist/engine/session.d.ts.map +1 -1
  78. package/dist/engine/session.js +6 -6
  79. package/dist/engine/session.js.map +1 -1
  80. package/dist/engine/violation.d.ts +2 -2
  81. package/dist/engine/violation.d.ts.map +1 -1
  82. package/dist/exceptions/registry.d.ts +2 -2
  83. package/dist/exceptions/registry.d.ts.map +1 -1
  84. package/dist/exceptions/registry.js +2 -2
  85. package/dist/exceptions/registry.js.map +1 -1
  86. package/dist/git/base.d.ts +1 -1
  87. package/dist/git/base.d.ts.map +1 -1
  88. package/dist/git/base.js +1 -1
  89. package/dist/git/base.js.map +1 -1
  90. package/dist/git/command.d.ts +1 -1
  91. package/dist/git/command.d.ts.map +1 -1
  92. package/dist/git/command.js +1 -1
  93. package/dist/git/command.js.map +1 -1
  94. package/dist/git/history.d.ts +1 -1
  95. package/dist/git/history.d.ts.map +1 -1
  96. package/dist/imports/departures.d.ts +1 -1
  97. package/dist/imports/departures.d.ts.map +1 -1
  98. package/dist/imports/departures.js +1 -1
  99. package/dist/imports/departures.js.map +1 -1
  100. package/dist/imports/fences/evaluate.d.ts +2 -2
  101. package/dist/imports/fences/evaluate.d.ts.map +1 -1
  102. package/dist/imports/fences/match.d.ts +2 -2
  103. package/dist/imports/fences/match.d.ts.map +1 -1
  104. package/dist/imports/fences/match.js +2 -2
  105. package/dist/imports/fences/match.js.map +1 -1
  106. package/dist/imports/fences/policy.js +1 -1
  107. package/dist/imports/fences/policy.js.map +1 -1
  108. package/dist/imports/fences/reach.d.ts +2 -2
  109. package/dist/imports/fences/reach.d.ts.map +1 -1
  110. package/dist/imports/fences/vocabulary.d.ts +1 -1
  111. package/dist/imports/fences/vocabulary.d.ts.map +1 -1
  112. package/dist/imports/generated.d.ts +1 -1
  113. package/dist/imports/generated.d.ts.map +1 -1
  114. package/dist/imports/generated.js +1 -1
  115. package/dist/imports/generated.js.map +1 -1
  116. package/dist/imports/graph.d.ts +1 -1
  117. package/dist/imports/graph.d.ts.map +1 -1
  118. package/dist/imports/graph.js +1 -1
  119. package/dist/imports/graph.js.map +1 -1
  120. package/dist/imports/resolve.js +1 -1
  121. package/dist/imports/resolve.js.map +1 -1
  122. package/dist/imports/workspace.d.ts +1 -1
  123. package/dist/imports/workspace.d.ts.map +1 -1
  124. package/dist/index.d.ts +3 -3
  125. package/dist/index.d.ts.map +1 -1
  126. package/dist/index.js +2 -2
  127. package/dist/index.js.map +1 -1
  128. package/dist/inventory/collect.d.ts +1 -1
  129. package/dist/inventory/collect.d.ts.map +1 -1
  130. package/dist/manifests/sorted.d.ts +1 -1
  131. package/dist/manifests/sorted.d.ts.map +1 -1
  132. package/dist/manifests/sorted.js +3 -3
  133. package/dist/manifests/sorted.js.map +1 -1
  134. package/dist/report/render.d.ts +1 -1
  135. package/dist/report/render.d.ts.map +1 -1
  136. package/dist/report/render.js +2 -2
  137. package/dist/report/render.js.map +1 -1
  138. package/dist/report/stale.d.ts +1 -1
  139. package/dist/report/stale.d.ts.map +1 -1
  140. package/dist/rules/biome.d.ts +1 -1
  141. package/dist/rules/biome.d.ts.map +1 -1
  142. package/dist/rules/biome.js +3 -3
  143. package/dist/rules/biome.js.map +1 -1
  144. package/dist/rules/built-in.js +14 -14
  145. package/dist/rules/built-in.js.map +1 -1
  146. package/dist/rules/comments/kinds.js +1 -1
  147. package/dist/rules/comments/kinds.js.map +1 -1
  148. package/dist/rules/comments/max-per-file.d.ts +1 -1
  149. package/dist/rules/comments/max-per-file.js +2 -2
  150. package/dist/rules/comments/max-per-file.js.map +1 -1
  151. package/dist/rules/comments/no-jsdoc.d.ts +1 -1
  152. package/dist/rules/comments/no-jsdoc.js +1 -1
  153. package/dist/rules/comments/no-jsdoc.js.map +1 -1
  154. package/dist/rules/comments/pattern-rule.d.ts +1 -1
  155. package/dist/rules/comments/pattern-rule.d.ts.map +1 -1
  156. package/dist/rules/comments/pattern-rule.js +1 -1
  157. package/dist/rules/comments/pattern-rule.js.map +1 -1
  158. package/dist/rules/comments/scan.d.ts +1 -1
  159. package/dist/rules/comments/scan.d.ts.map +1 -1
  160. package/dist/rules/comments/scan.js +1 -1
  161. package/dist/rules/comments/scan.js.map +1 -1
  162. package/dist/rules/imports/aliased.d.ts +1 -1
  163. package/dist/rules/imports/aliased.d.ts.map +1 -1
  164. package/dist/rules/imports/aliased.js +2 -2
  165. package/dist/rules/imports/aliased.js.map +1 -1
  166. package/dist/rules/imports/cycles.d.ts +1 -1
  167. package/dist/rules/imports/cycles.d.ts.map +1 -1
  168. package/dist/rules/imports/cycles.js +4 -4
  169. package/dist/rules/imports/cycles.js.map +1 -1
  170. package/dist/rules/imports/fences.d.ts +2 -2
  171. package/dist/rules/imports/fences.d.ts.map +1 -1
  172. package/dist/rules/imports/fences.js +3 -3
  173. package/dist/rules/imports/fences.js.map +1 -1
  174. package/dist/rules/imports/resolvable.d.ts +1 -1
  175. package/dist/rules/imports/resolvable.js +3 -3
  176. package/dist/rules/imports/resolvable.js.map +1 -1
  177. package/dist/rules/manifests-sorted.d.ts +1 -1
  178. package/dist/rules/manifests-sorted.d.ts.map +1 -1
  179. package/dist/rules/manifests-sorted.js +2 -2
  180. package/dist/rules/manifests-sorted.js.map +1 -1
  181. package/dist/rules/max-lines.d.ts +1 -1
  182. package/dist/rules/max-lines.js +1 -1
  183. package/dist/rules/max-lines.js.map +1 -1
  184. package/dist/rules/suppressions/biome/configs.d.ts +1 -1
  185. package/dist/rules/suppressions/biome/configs.d.ts.map +1 -1
  186. package/dist/rules/suppressions/biome/declarations.d.ts +1 -1
  187. package/dist/rules/suppressions/biome/declarations.d.ts.map +1 -1
  188. package/dist/rules/suppressions/biome/declarations.js +1 -1
  189. package/dist/rules/suppressions/biome/declarations.js.map +1 -1
  190. package/dist/rules/suppressions/biome/resolve.d.ts +1 -1
  191. package/dist/rules/suppressions/biome/resolve.d.ts.map +1 -1
  192. package/dist/rules/suppressions/biome/resolve.js +1 -1
  193. package/dist/rules/suppressions/biome/resolve.js.map +1 -1
  194. package/dist/rules/suppressions/biome-overrides.d.ts +1 -1
  195. package/dist/rules/suppressions/biome-overrides.js +4 -4
  196. package/dist/rules/suppressions/biome-overrides.js.map +1 -1
  197. package/dist/rules/suppressions/directives.d.ts +1 -1
  198. package/dist/rules/suppressions/directives.d.ts.map +1 -1
  199. package/dist/rules/suppressions/no-double-cast.d.ts +1 -1
  200. package/dist/rules/suppressions/no-double-cast.d.ts.map +1 -1
  201. package/dist/rules/suppressions/no-double-cast.js +2 -2
  202. package/dist/rules/suppressions/no-double-cast.js.map +1 -1
  203. package/dist/rules/suppressions/no-inline.d.ts +1 -1
  204. package/dist/rules/suppressions/no-inline.d.ts.map +1 -1
  205. package/dist/rules/suppressions/no-inline.js +2 -2
  206. package/dist/rules/suppressions/no-inline.js.map +1 -1
  207. package/dist/rules/suppressions/stylesheet-comments.d.ts +1 -1
  208. package/dist/rules/suppressions/stylesheet-comments.d.ts.map +1 -1
  209. package/dist/rules/suppressions/stylesheet-comments.js +1 -1
  210. package/dist/rules/suppressions/stylesheet-comments.js.map +1 -1
  211. package/dist/rules/syntax.d.ts +1 -1
  212. package/dist/rules/syntax.d.ts.map +1 -1
  213. package/package.json +10 -2
  214. package/src/baseline/compare.ts +1 -1
  215. package/src/baseline/format.ts +2 -2
  216. package/src/baseline/legacy.ts +2 -2
  217. package/src/baseline/rewrite.ts +1 -1
  218. package/src/baseline/update.ts +1 -1
  219. package/src/cli/args.ts +7 -1
  220. package/src/cli/baseline.ts +8 -8
  221. package/src/cli/fix.ts +81 -42
  222. package/src/cli/lint.ts +4 -4
  223. package/src/cli/migrate.ts +9 -9
  224. package/src/cli/run-main.ts +17 -2
  225. package/src/cli/shrink.ts +5 -5
  226. package/src/cli.ts +7 -7
  227. package/src/config/decode.ts +7 -2
  228. package/src/config/load.ts +3 -3
  229. package/src/config/resolve.ts +6 -6
  230. package/src/config.ts +1 -1
  231. package/src/engine/baseline-file.ts +6 -6
  232. package/src/engine/evaluate.ts +3 -3
  233. package/src/engine/run-rules.ts +3 -3
  234. package/src/engine/session.ts +6 -6
  235. package/src/engine/violation.ts +2 -2
  236. package/src/exceptions/registry.ts +2 -2
  237. package/src/git/base.ts +1 -1
  238. package/src/git/command.ts +1 -1
  239. package/src/git/history.ts +1 -1
  240. package/src/imports/departures.ts +2 -2
  241. package/src/imports/fences/evaluate.ts +2 -2
  242. package/src/imports/fences/match.ts +2 -2
  243. package/src/imports/fences/policy.ts +2 -2
  244. package/src/imports/fences/reach.ts +2 -2
  245. package/src/imports/fences/vocabulary.ts +1 -1
  246. package/src/imports/generated.ts +2 -2
  247. package/src/imports/graph.ts +2 -2
  248. package/src/imports/resolve.ts +1 -1
  249. package/src/imports/workspace.ts +1 -1
  250. package/src/index.ts +3 -3
  251. package/src/inventory/collect.ts +1 -1
  252. package/src/manifests/sorted.ts +3 -3
  253. package/src/report/render.ts +3 -3
  254. package/src/report/stale.ts +3 -3
  255. package/src/rules/biome.ts +3 -3
  256. package/src/rules/built-in.ts +14 -14
  257. package/src/rules/comments/kinds.ts +1 -1
  258. package/src/rules/comments/max-per-file.ts +2 -2
  259. package/src/rules/comments/no-jsdoc.ts +1 -1
  260. package/src/rules/comments/pattern-rule.ts +1 -1
  261. package/src/rules/comments/scan.ts +2 -2
  262. package/src/rules/imports/aliased.ts +2 -2
  263. package/src/rules/imports/cycles.ts +4 -4
  264. package/src/rules/imports/fences.ts +4 -4
  265. package/src/rules/imports/resolvable.ts +3 -3
  266. package/src/rules/manifests-sorted.ts +2 -2
  267. package/src/rules/max-lines.ts +1 -1
  268. package/src/rules/suppressions/biome/configs.ts +1 -1
  269. package/src/rules/suppressions/biome/declarations.ts +1 -1
  270. package/src/rules/suppressions/biome/resolve.ts +2 -2
  271. package/src/rules/suppressions/biome-overrides.ts +4 -4
  272. package/src/rules/suppressions/directives.ts +1 -1
  273. package/src/rules/suppressions/no-double-cast.ts +2 -2
  274. package/src/rules/suppressions/no-inline.ts +2 -2
  275. package/src/rules/suppressions/stylesheet-comments.ts +1 -1
  276. package/src/rules/syntax.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  import { resolve } from "node:path";
2
2
  import { Effect, type FileSystem } from "effect";
3
- import { loadConfig, type ResolvedConfig } from "../config/load.ts";
4
- import { validOrFail } from "../decoded.ts";
5
- import { decodeRegistry, type RegistryEntry } from "../exceptions/registry.ts";
6
- import { SetupFailure } from "../failure.ts";
7
- import { collectInventory, type Inventory } from "../inventory/collect.ts";
8
- import { type FilesystemFailure, readOptionalText } from "../inventory/filesystem.ts";
3
+ import { loadConfig, type ResolvedConfig } from "#config/load.ts";
4
+ import { validOrFail } from "#decoded.ts";
5
+ import { decodeRegistry, type RegistryEntry } from "#exceptions/registry.ts";
6
+ import { SetupFailure } from "#failure.ts";
7
+ import { collectInventory, type Inventory } from "#inventory/collect.ts";
8
+ import { type FilesystemFailure, readOptionalText } from "#inventory/filesystem.ts";
9
9
  import { type BaselineFile, readBaseline, readInput } from "./baseline-file.ts";
10
10
  import { runRules } from "./run-rules.ts";
11
11
  import type { Violation } from "./violation.ts";
@@ -1,5 +1,5 @@
1
- import type { Level } from "../config.ts";
2
- import type { Finding } from "../rule.ts";
1
+ import type { Level } from "#config.ts";
2
+ import type { Finding } from "#rule.ts";
3
3
 
4
4
  export type ActiveLevel = "error" | "warn";
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect";
2
- import { type Decoded, decodeWith } from "../decoded.ts";
3
- import { type RuleIndex, registrable, unusedEntryProblem, type Violation } from "../engine/violation.ts";
2
+ import { type Decoded, decodeWith } from "#decoded.ts";
3
+ import { type RuleIndex, registrable, unusedEntryProblem, type Violation } from "#engine/violation.ts";
4
4
 
5
5
  const RegistryEntry = Schema.Struct({
6
6
  file: Schema.NonEmptyString,
package/src/git/base.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Effect } from "effect";
2
- import { SetupFailure } from "../failure.ts";
2
+ import { SetupFailure } from "#failure.ts";
3
3
  import { type Git, git } from "./command.ts";
4
4
 
5
5
  export interface Base {
@@ -1,6 +1,6 @@
1
1
  import { Effect, Stream } from "effect";
2
2
  import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
3
- import { SetupFailure } from "../failure.ts";
3
+ import { SetupFailure } from "#failure.ts";
4
4
 
5
5
  export interface GitResult {
6
6
  readonly code: number;
@@ -1,5 +1,5 @@
1
1
  import { Effect } from "effect";
2
- import type { SetupFailure } from "../failure.ts";
2
+ import type { SetupFailure } from "#failure.ts";
3
3
  import { type Git, gitOrFail } from "./command.ts";
4
4
 
5
5
  export interface Changes {
@@ -1,7 +1,7 @@
1
1
  import { realpathSync } from "node:fs";
2
2
  import { posix } from "node:path";
3
- import type { RuleInputs } from "../rule.ts";
4
- import { parse } from "../rules/syntax.ts";
3
+ import type { RuleInputs } from "#rule.ts";
4
+ import { parse } from "#rules/syntax.ts";
5
5
  import type { ImportRequest } from "./extract.ts";
6
6
  import { type Project, projectsFor } from "./projects.ts";
7
7
  import { resolveImport } from "./resolve.ts";
@@ -1,5 +1,5 @@
1
- import type { Finding } from "../../rule.ts";
2
- import type { ImportEdge, ImportGraph } from "../graph.ts";
1
+ import type { ImportEdge, ImportGraph } from "#imports/graph.ts";
2
+ import type { Finding } from "#rule.ts";
3
3
  import { type Compiler, compile, type Matcher } from "./match.ts";
4
4
  import type { Fence } from "./model.ts";
5
5
  import { labelOf, outgoing, reachedFrom } from "./reach.ts";
@@ -1,5 +1,5 @@
1
- import { builtinName, type Endpoint, packageNameOf } from "../resolve.ts";
2
- import { packageOf, type WorkspacePackage } from "../workspace.ts";
1
+ import { builtinName, type Endpoint, packageNameOf } from "#imports/resolve.ts";
2
+ import { packageOf, type WorkspacePackage } from "#imports/workspace.ts";
3
3
  import type { Selector } from "./model.ts";
4
4
 
5
5
  export interface PolicyScope {
@@ -1,5 +1,5 @@
1
- import type { ImportEdge } from "../graph.ts";
2
- import { type Endpoint, packageNameOf } from "../resolve.ts";
1
+ import type { ImportEdge } from "#imports/graph.ts";
2
+ import { type Endpoint, packageNameOf } from "#imports/resolve.ts";
3
3
  import { type CompiledFence, compileFence, type FenceGraph } from "./evaluate.ts";
4
4
  import type { PolicyScope } from "./match.ts";
5
5
  import type { Chain, ExampleStep, Fence } from "./model.ts";
@@ -1,5 +1,5 @@
1
- import type { ImportEdge } from "../graph.ts";
2
- import type { Endpoint } from "../resolve.ts";
1
+ import type { ImportEdge } from "#imports/graph.ts";
2
+ import type { Endpoint } from "#imports/resolve.ts";
3
3
  import type { Matcher } from "./match.ts";
4
4
 
5
5
  export interface Reached {
@@ -1,4 +1,4 @@
1
- import type { Endpoint } from "../resolve.ts";
1
+ import type { Endpoint } from "#imports/resolve.ts";
2
2
  import { type Compiler, holdsFiles, packageNamed, trimmed } from "./match.ts";
3
3
  import type { Selector } from "./model.ts";
4
4
 
@@ -1,8 +1,8 @@
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";
5
- import type { RuleInputs } from "../rule.ts";
4
+ import { emptyScope, type IgnoreScope, verdictFor, withIgnoreFile } from "#inventory/ignore-scope.ts";
5
+ import type { RuleInputs } from "#rule.ts";
6
6
  import type { ImportGraph, UnresolvedImport } from "./graph.ts";
7
7
 
8
8
  type Reader = Pick<RuleInputs, "readText" | "root">;
@@ -1,7 +1,7 @@
1
1
  import { realpathSync } from "node:fs";
2
2
  import { join, posix } from "node:path";
3
- import type { RuleInputs, SourceFile } from "../rule.ts";
4
- import { parse } from "../rules/syntax.ts";
3
+ import type { RuleInputs, SourceFile } from "#rule.ts";
4
+ import { parse } from "#rules/syntax.ts";
5
5
  import { ambientModules } from "./ambient.ts";
6
6
  import { type ImportKind, type ImportRequest, importsOf } from "./extract.ts";
7
7
  import { projectsFor } from "./projects.ts";
@@ -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/ignore-scope.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";
@@ -1,5 +1,5 @@
1
1
  import { posix } from "node:path";
2
- import type { RuleInputs } from "../rule.ts";
2
+ import type { RuleInputs } from "#rule.ts";
3
3
  import { globMatcher } from "./glob.ts";
4
4
  import { pnpmWorkspacePatterns } from "./pnpm-workspace.ts";
5
5
 
package/src/index.ts CHANGED
@@ -1,8 +1,8 @@
1
+ export { fence } from "#imports/fences/dsl.ts";
2
+ export type { Chain, ExampleStep, Examples, External, Fence, Target } from "#imports/fences/model.ts";
3
+ export { anyOf, anything, external, files, folders, modules, packages, scopes, workspace } from "#imports/fences/selectors.ts";
1
4
  export type { BuiltInRules, Level, QualityConfig, RuleSetting, RuleSettings } from "./config.ts";
2
5
  export { defineConfig } from "./config.ts";
3
- export { fence } from "./imports/fences/dsl.ts";
4
- export type { Chain, ExampleStep, Examples, External, Fence, Target } from "./imports/fences/model.ts";
5
- export { anyOf, anything, external, files, folders, modules, packages, scopes, workspace } from "./imports/fences/selectors.ts";
6
6
  export type { Configured, Finding, Findings, Rule, RuleContext, RuleInputs, SourceFile } from "./rule.ts";
7
7
  export { defineRule } from "./rule.ts";
8
8
  export type { StandardIssue, StandardResult, StandardSchemaV1 } from "./standard-schema.ts";
@@ -1,7 +1,7 @@
1
1
  import { join, relative } from "node:path";
2
2
  import { Effect, FileSystem } from "effect";
3
3
  import ignore from "ignore";
4
- import type { SourceFile } from "../rule.ts";
4
+ import type { SourceFile } from "#rule.ts";
5
5
  import { FilesystemFailure, orWhenAbsent, readRequiredText } from "./filesystem.ts";
6
6
  import { posix } from "./ignore-scope.ts";
7
7
  import { scopeAbove, walk } from "./walk.ts";
@@ -1,9 +1,9 @@
1
1
  import { basename, join, relative } from "node:path";
2
2
  import { Effect, FileSystem } from "effect";
3
3
  import { sortPackageJson } from "sort-package-json";
4
- import { FilesystemFailure } from "../inventory/filesystem.ts";
5
- import { posix } from "../inventory/ignore-scope.ts";
6
- import { walk } from "../inventory/walk.ts";
4
+ import { FilesystemFailure } from "#inventory/filesystem.ts";
5
+ import { posix } from "#inventory/ignore-scope.ts";
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 };
9
9
 
@@ -1,6 +1,6 @@
1
- import type { Regression } from "../baseline/compare.ts";
2
- import { type Outcome, passes } from "../engine/evaluate.ts";
3
- import { groupBy, keyOf, type Violation } from "../engine/violation.ts";
1
+ import type { Regression } from "#baseline/compare.ts";
2
+ import { type Outcome, passes } from "#engine/evaluate.ts";
3
+ import { groupBy, keyOf, type Violation } from "#engine/violation.ts";
4
4
  import { plural } from "./plural.ts";
5
5
  import { staleSections } from "./stale.ts";
6
6
 
@@ -1,6 +1,6 @@
1
- import type { StaleBaselineEntry } from "../baseline/compare.ts";
2
- import type { Outcome } from "../engine/evaluate.ts";
3
- import type { StaleRegistryEntry } from "../exceptions/registry.ts";
1
+ import type { StaleBaselineEntry } from "#baseline/compare.ts";
2
+ import type { Outcome } from "#engine/evaluate.ts";
3
+ import type { StaleRegistryEntry } from "#exceptions/registry.ts";
4
4
  import { plural } from "./plural.ts";
5
5
 
6
6
  interface StaleFiles {
@@ -1,6 +1,6 @@
1
- import { biomeReport, type Diagnostic } from "../biome/report.ts";
2
- import { defineRule, type Finding, type Rule, type RuleInputs } from "../rule.ts";
3
- import { itemsOf, member, parseJsonc, textOf } from "./suppressions/biome/json.ts";
1
+ import { biomeReport, type Diagnostic } from "#biome/report.ts";
2
+ import { defineRule, type Finding, type Rule, type RuleInputs } from "#rule.ts";
3
+ import { itemsOf, member, parseJsonc, textOf } from "#rules/suppressions/biome/json.ts";
4
4
 
5
5
  export const PRESET = "@shivaedev/quality/biome";
6
6
 
@@ -1,20 +1,20 @@
1
+ import { maxPerFile } from "#rules/comments/max-per-file.ts";
2
+ import { noBanner } from "#rules/comments/no-banner.ts";
3
+ import { noEnvironmentPragma } from "#rules/comments/no-environment-pragma.ts";
4
+ import { noJsdoc } from "#rules/comments/no-jsdoc.ts";
5
+ import { noLineReference } from "#rules/comments/no-line-reference.ts";
6
+ import { noPrReference } from "#rules/comments/no-pr-reference.ts";
7
+ import { noTodo } from "#rules/comments/no-todo.ts";
8
+ import { importsAliased } from "#rules/imports/aliased.ts";
9
+ import { importCycles } from "#rules/imports/cycles.ts";
10
+ import { importFences } from "#rules/imports/fences.ts";
11
+ import { importsResolvable } from "#rules/imports/resolvable.ts";
12
+ import { biomeOverrides } from "#rules/suppressions/biome-overrides.ts";
13
+ import { noDoubleCast } from "#rules/suppressions/no-double-cast.ts";
14
+ import { noInline } from "#rules/suppressions/no-inline.ts";
1
15
  import { biome } from "./biome.ts";
2
- import { maxPerFile } from "./comments/max-per-file.ts";
3
- import { noBanner } from "./comments/no-banner.ts";
4
- import { noEnvironmentPragma } from "./comments/no-environment-pragma.ts";
5
- import { noJsdoc } from "./comments/no-jsdoc.ts";
6
- import { noLineReference } from "./comments/no-line-reference.ts";
7
- import { noPrReference } from "./comments/no-pr-reference.ts";
8
- import { noTodo } from "./comments/no-todo.ts";
9
- import { importsAliased } from "./imports/aliased.ts";
10
- import { importCycles } from "./imports/cycles.ts";
11
- import { importFences } from "./imports/fences.ts";
12
- import { importsResolvable } from "./imports/resolvable.ts";
13
16
  import { manifestsSorted } from "./manifests-sorted.ts";
14
17
  import { maxLines } from "./max-lines.ts";
15
- import { biomeOverrides } from "./suppressions/biome-overrides.ts";
16
- import { noDoubleCast } from "./suppressions/no-double-cast.ts";
17
- import { noInline } from "./suppressions/no-inline.ts";
18
18
 
19
19
  export const builtInRules = [
20
20
  maxLines,
@@ -1,5 +1,5 @@
1
1
  import { Effect, Schema } from "effect";
2
- import { SUPPRESSIONS } from "../suppressions/directives.ts";
2
+ import { SUPPRESSIONS } from "#rules/suppressions/directives.ts";
3
3
  import type { SourceComment } from "./scan.ts";
4
4
 
5
5
  export const Pragmas = Schema.Array(Schema.String).pipe(Schema.withDecodingDefaultKey(Effect.succeed<readonly string[]>([])));
@@ -1,6 +1,6 @@
1
1
  import { Effect, Schema } from "effect";
2
- import { plural } from "../../report/plural.ts";
3
- import { defineRule, type Finding, type SourceFile } from "../../rule.ts";
2
+ import { plural } from "#report/plural.ts";
3
+ import { defineRule, type Finding, type SourceFile } from "#rule.ts";
4
4
  import { isDirective, isPragma, Pragmas } from "./kinds.ts";
5
5
  import { commentsOf, type SourceComment } from "./scan.ts";
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { defineRule } from "../../rule.ts";
2
+ import { defineRule } from "#rule.ts";
3
3
  import { isDirective, isJsdoc, isPragma, Pragmas } from "./kinds.ts";
4
4
  import { commentsOf } from "./scan.ts";
5
5
 
@@ -1,4 +1,4 @@
1
- import { defineRule, type Finding, type Rule } from "../../rule.ts";
1
+ import { defineRule, type Finding, type Rule } from "#rule.ts";
2
2
  import { isDirective, textOf } from "./kinds.ts";
3
3
  import { commentsOf, type SourceComment } from "./scan.ts";
4
4
 
@@ -1,6 +1,6 @@
1
1
  import ts from "typescript";
2
- import type { SourceFile } from "../../rule.ts";
3
- import { parse } from "../syntax.ts";
2
+ import type { SourceFile } from "#rule.ts";
3
+ import { parse } from "#rules/syntax.ts";
4
4
 
5
5
  export interface SourceComment {
6
6
  readonly body: readonly string[];
@@ -1,5 +1,5 @@
1
- import { type Departure, departures } from "../../imports/departures.ts";
2
- import { defineRule } from "../../rule.ts";
1
+ import { type Departure, departures } from "#imports/departures.ts";
2
+ import { defineRule } from "#rule.ts";
3
3
 
4
4
  function messageOf({ installed, specifier, workspace }: Departure): string {
5
5
  const leaves = `"${specifier}" leaves its folder.`;
@@ -1,7 +1,7 @@
1
- import { cyclicComponents } from "../../imports/components.ts";
2
- import { type ImportEdge, importGraph } from "../../imports/graph.ts";
3
- import { shortestPath } from "../../imports/paths.ts";
4
- import { defineRule, type Finding } from "../../rule.ts";
1
+ import { cyclicComponents } from "#imports/components.ts";
2
+ import { type ImportEdge, importGraph } from "#imports/graph.ts";
3
+ import { shortestPath } from "#imports/paths.ts";
4
+ import { defineRule, type Finding } from "#rule.ts";
5
5
 
6
6
  type RuntimeEdge = ImportEdge & { readonly to: { readonly kind: "file"; readonly path: string } };
7
7
 
@@ -1,8 +1,8 @@
1
1
  import { Effect, Schema } from "effect";
2
- import type { Fence } from "../../imports/fences/model.ts";
3
- import { compilePolicy } from "../../imports/fences/policy.ts";
4
- import { importGraph } from "../../imports/graph.ts";
5
- import { defineRule } from "../../rule.ts";
2
+ import type { Fence } from "#imports/fences/model.ts";
3
+ import { compilePolicy } from "#imports/fences/policy.ts";
4
+ import { importGraph } from "#imports/graph.ts";
5
+ import { defineRule } from "#rule.ts";
6
6
 
7
7
  function isFence(value: unknown): value is Fence {
8
8
  return typeof value === "object" && value !== null && "_tag" in value && value._tag === "Fence";
@@ -1,7 +1,7 @@
1
1
  import { Effect, Schema } from "effect";
2
- import { withoutGenerated } from "../../imports/generated.ts";
3
- import { importGraph } from "../../imports/graph.ts";
4
- import { defineRule } from "../../rule.ts";
2
+ import { withoutGenerated } from "#imports/generated.ts";
3
+ import { importGraph } from "#imports/graph.ts";
4
+ import { defineRule } from "#rule.ts";
5
5
 
6
6
  const ResolvableOptions = Schema.Struct({
7
7
  generated: Schema.Array(Schema.String).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
@@ -1,7 +1,7 @@
1
1
  import * as NodeFileSystem from "@effect/platform-node/NodeFileSystem";
2
2
  import { Effect } from "effect";
3
- import { manifestsIn, sortingOf } from "../manifests/sorted.ts";
4
- import { defineRule, type Finding } from "../rule.ts";
3
+ import { manifestsIn, sortingOf } from "#manifests/sorted.ts";
4
+ import { defineRule, type Finding } from "#rule.ts";
5
5
 
6
6
  const MESSAGES = {
7
7
  Invalid: "Is not valid JSON.",
@@ -1,6 +1,6 @@
1
1
  import { Effect, Schema } from "effect";
2
2
  import ignore from "ignore";
3
- import { defineRule, type Finding, type SourceFile } from "../rule.ts";
3
+ import { defineRule, type Finding, type SourceFile } from "#rule.ts";
4
4
 
5
5
  const DEFAULT_TEST_FILES: readonly string[] = ["*.test.*", "*.spec.*", "test/", "tests/", "__tests__/"];
6
6
  const DECLARATION = /\.d\.[cm]?ts$/u;
@@ -1,5 +1,5 @@
1
1
  import { posix } from "node:path";
2
- import type { Finding, RuleInputs } from "../../../rule.ts";
2
+ import type { Finding, RuleInputs } from "#rule.ts";
3
3
  import { type Declaration, decodeShipped, PRESET_DECLARATIONS } from "./declarations.ts";
4
4
  import { itemsOf, type Json, member, type Parsed, parseJsonc, textOf } from "./json.ts";
5
5
  import { resolvePackage } from "./resolve.ts";
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { type Decoded, decodeWith } from "../../../decoded.ts";
2
+ import { type Decoded, decodeWith } from "#decoded.ts";
3
3
 
4
4
  export const Declaration = Schema.Struct({
5
5
  includes: Schema.NonEmptyArray(Schema.NonEmptyString),
@@ -1,7 +1,7 @@
1
1
  import { posix } from "node:path";
2
2
  import { Schema } from "effect";
3
- import { decodeWith } from "../../../decoded.ts";
4
- import type { RuleInputs } from "../../../rule.ts";
3
+ import { decodeWith } from "#decoded.ts";
4
+ import type { RuleInputs } from "#rule.ts";
5
5
 
6
6
  const Manifest = Schema.Struct({
7
7
  exports: Schema.optionalKey(Schema.Unknown),
@@ -1,8 +1,8 @@
1
1
  import { Effect, Schema } from "effect";
2
- import { defineRule, type Finding } from "../../rule.ts";
3
- import { biomeConfigs, type Chain } from "./biome/configs.ts";
4
- import { Declaration, matches, type Scoped, scoped, scopeText } from "./biome/declarations.ts";
5
- import { type Weakening, weakeningsOf } from "./biome/weakenings.ts";
2
+ import { defineRule, type Finding } from "#rule.ts";
3
+ import { biomeConfigs, type Chain } from "#rules/suppressions/biome/configs.ts";
4
+ import { Declaration, matches, type Scoped, scoped, scopeText } from "#rules/suppressions/biome/declarations.ts";
5
+ import { type Weakening, weakeningsOf } from "#rules/suppressions/biome/weakenings.ts";
6
6
 
7
7
  const BiomeOverridesOptions = Schema.Struct({
8
8
  declared: Schema.Array(Declaration).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
@@ -1,4 +1,4 @@
1
- import type { SourceComment } from "../comments/scan.ts";
1
+ import type { SourceComment } from "#rules/comments/scan.ts";
2
2
 
3
3
  export const SUPPRESSIONS: readonly RegExp[] = [
4
4
  /^biome-ignore(?:-all|-start)?(?![\w-])/u,
@@ -1,6 +1,6 @@
1
1
  import ts from "typescript";
2
- import { defineRule, type Finding, type SourceFile } from "../../rule.ts";
3
- import { parse } from "../syntax.ts";
2
+ import { defineRule, type Finding, type SourceFile } from "#rule.ts";
3
+ import { parse } from "#rules/syntax.ts";
4
4
 
5
5
  const BRIDGES: ReadonlyMap<ts.SyntaxKind, string> = new Map([
6
6
  [ts.SyntaxKind.UnknownKeyword, "unknown"],
@@ -1,5 +1,5 @@
1
- import { defineRule, type Finding, type RuleInputs } from "../../rule.ts";
2
- import { type SourceComment, scanComments } from "../comments/scan.ts";
1
+ import { defineRule, type Finding, type RuleInputs } from "#rule.ts";
2
+ import { type SourceComment, scanComments } from "#rules/comments/scan.ts";
3
3
  import { suppressionIn } from "./directives.ts";
4
4
  import { STYLESHEET, stylesheetComments } from "./stylesheet-comments.ts";
5
5
 
@@ -1,4 +1,4 @@
1
- import { bodyOf, type SourceComment } from "../comments/scan.ts";
1
+ import { bodyOf, type SourceComment } from "#rules/comments/scan.ts";
2
2
 
3
3
  export const STYLESHEET = /\.(?:css|scss|less)$/u;
4
4
 
@@ -1,5 +1,5 @@
1
1
  import ts from "typescript";
2
- import type { SourceFile } from "../rule.ts";
2
+ import type { SourceFile } from "#rule.ts";
3
3
 
4
4
  const SCRIPT_KINDS: ReadonlyArray<readonly [RegExp, ts.ScriptKind]> = [
5
5
  [/\.[cm]?ts$/u, ts.ScriptKind.TS],