@shivaedev/quality 0.7.2 → 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 (274) hide show
  1. package/CHANGELOG.md +6 -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/baseline.d.ts +3 -3
  23. package/dist/cli/baseline.d.ts.map +1 -1
  24. package/dist/cli/baseline.js +7 -7
  25. package/dist/cli/baseline.js.map +1 -1
  26. package/dist/cli/fix.d.ts +1 -1
  27. package/dist/cli/fix.d.ts.map +1 -1
  28. package/dist/cli/fix.js +7 -7
  29. package/dist/cli/fix.js.map +1 -1
  30. package/dist/cli/lint.d.ts +2 -2
  31. package/dist/cli/lint.d.ts.map +1 -1
  32. package/dist/cli/lint.js +4 -4
  33. package/dist/cli/lint.js.map +1 -1
  34. package/dist/cli/migrate.d.ts +1 -1
  35. package/dist/cli/migrate.d.ts.map +1 -1
  36. package/dist/cli/migrate.js +9 -9
  37. package/dist/cli/migrate.js.map +1 -1
  38. package/dist/cli/run-main.d.ts +1 -1
  39. package/dist/cli/run-main.d.ts.map +1 -1
  40. package/dist/cli/run-main.js +1 -1
  41. package/dist/cli/run-main.js.map +1 -1
  42. package/dist/cli/shrink.d.ts +2 -2
  43. package/dist/cli/shrink.d.ts.map +1 -1
  44. package/dist/cli/shrink.js +2 -2
  45. package/dist/cli/shrink.js.map +1 -1
  46. package/dist/cli.js +7 -7
  47. package/dist/cli.js.map +1 -1
  48. package/dist/config/decode.d.ts +2 -2
  49. package/dist/config/decode.d.ts.map +1 -1
  50. package/dist/config/decode.js +1 -1
  51. package/dist/config/decode.js.map +1 -1
  52. package/dist/config/load.d.ts +2 -2
  53. package/dist/config/load.d.ts.map +1 -1
  54. package/dist/config/load.js +2 -2
  55. package/dist/config/load.js.map +1 -1
  56. package/dist/config/resolve.d.ts +3 -3
  57. package/dist/config/resolve.d.ts.map +1 -1
  58. package/dist/config/resolve.js +1 -1
  59. package/dist/config/resolve.js.map +1 -1
  60. package/dist/config.d.ts +1 -1
  61. package/dist/config.d.ts.map +1 -1
  62. package/dist/engine/baseline-file.d.ts +3 -3
  63. package/dist/engine/baseline-file.d.ts.map +1 -1
  64. package/dist/engine/baseline-file.js +5 -5
  65. package/dist/engine/baseline-file.js.map +1 -1
  66. package/dist/engine/evaluate.d.ts +3 -3
  67. package/dist/engine/evaluate.d.ts.map +1 -1
  68. package/dist/engine/evaluate.js +2 -2
  69. package/dist/engine/evaluate.js.map +1 -1
  70. package/dist/engine/run-rules.d.ts +2 -2
  71. package/dist/engine/run-rules.d.ts.map +1 -1
  72. package/dist/engine/run-rules.js +2 -2
  73. package/dist/engine/run-rules.js.map +1 -1
  74. package/dist/engine/session.d.ts +4 -4
  75. package/dist/engine/session.d.ts.map +1 -1
  76. package/dist/engine/session.js +6 -6
  77. package/dist/engine/session.js.map +1 -1
  78. package/dist/engine/violation.d.ts +2 -2
  79. package/dist/engine/violation.d.ts.map +1 -1
  80. package/dist/exceptions/registry.d.ts +2 -2
  81. package/dist/exceptions/registry.d.ts.map +1 -1
  82. package/dist/exceptions/registry.js +2 -2
  83. package/dist/exceptions/registry.js.map +1 -1
  84. package/dist/git/base.d.ts +1 -1
  85. package/dist/git/base.d.ts.map +1 -1
  86. package/dist/git/base.js +1 -1
  87. package/dist/git/base.js.map +1 -1
  88. package/dist/git/command.d.ts +1 -1
  89. package/dist/git/command.d.ts.map +1 -1
  90. package/dist/git/command.js +1 -1
  91. package/dist/git/command.js.map +1 -1
  92. package/dist/git/history.d.ts +1 -1
  93. package/dist/git/history.d.ts.map +1 -1
  94. package/dist/imports/departures.d.ts +1 -1
  95. package/dist/imports/departures.d.ts.map +1 -1
  96. package/dist/imports/departures.js +1 -1
  97. package/dist/imports/departures.js.map +1 -1
  98. package/dist/imports/fences/evaluate.d.ts +2 -2
  99. package/dist/imports/fences/evaluate.d.ts.map +1 -1
  100. package/dist/imports/fences/match.d.ts +2 -2
  101. package/dist/imports/fences/match.d.ts.map +1 -1
  102. package/dist/imports/fences/match.js +2 -2
  103. package/dist/imports/fences/match.js.map +1 -1
  104. package/dist/imports/fences/policy.js +1 -1
  105. package/dist/imports/fences/policy.js.map +1 -1
  106. package/dist/imports/fences/reach.d.ts +2 -2
  107. package/dist/imports/fences/reach.d.ts.map +1 -1
  108. package/dist/imports/fences/vocabulary.d.ts +1 -1
  109. package/dist/imports/fences/vocabulary.d.ts.map +1 -1
  110. package/dist/imports/generated.d.ts +1 -1
  111. package/dist/imports/generated.d.ts.map +1 -1
  112. package/dist/imports/generated.js +1 -1
  113. package/dist/imports/generated.js.map +1 -1
  114. package/dist/imports/graph.d.ts +1 -1
  115. package/dist/imports/graph.d.ts.map +1 -1
  116. package/dist/imports/graph.js +1 -1
  117. package/dist/imports/graph.js.map +1 -1
  118. package/dist/imports/resolve.js +1 -1
  119. package/dist/imports/resolve.js.map +1 -1
  120. package/dist/imports/workspace.d.ts +1 -1
  121. package/dist/imports/workspace.d.ts.map +1 -1
  122. package/dist/index.d.ts +3 -3
  123. package/dist/index.d.ts.map +1 -1
  124. package/dist/index.js +2 -2
  125. package/dist/index.js.map +1 -1
  126. package/dist/inventory/collect.d.ts +1 -1
  127. package/dist/inventory/collect.d.ts.map +1 -1
  128. package/dist/manifests/sorted.d.ts +1 -1
  129. package/dist/manifests/sorted.d.ts.map +1 -1
  130. package/dist/manifests/sorted.js +3 -3
  131. package/dist/manifests/sorted.js.map +1 -1
  132. package/dist/report/render.d.ts +1 -1
  133. package/dist/report/render.d.ts.map +1 -1
  134. package/dist/report/render.js +2 -2
  135. package/dist/report/render.js.map +1 -1
  136. package/dist/report/stale.d.ts +1 -1
  137. package/dist/report/stale.d.ts.map +1 -1
  138. package/dist/rules/biome.d.ts +1 -1
  139. package/dist/rules/biome.d.ts.map +1 -1
  140. package/dist/rules/biome.js +3 -3
  141. package/dist/rules/biome.js.map +1 -1
  142. package/dist/rules/built-in.js +14 -14
  143. package/dist/rules/built-in.js.map +1 -1
  144. package/dist/rules/comments/kinds.js +1 -1
  145. package/dist/rules/comments/kinds.js.map +1 -1
  146. package/dist/rules/comments/max-per-file.d.ts +1 -1
  147. package/dist/rules/comments/max-per-file.js +2 -2
  148. package/dist/rules/comments/max-per-file.js.map +1 -1
  149. package/dist/rules/comments/no-jsdoc.d.ts +1 -1
  150. package/dist/rules/comments/no-jsdoc.js +1 -1
  151. package/dist/rules/comments/no-jsdoc.js.map +1 -1
  152. package/dist/rules/comments/pattern-rule.d.ts +1 -1
  153. package/dist/rules/comments/pattern-rule.d.ts.map +1 -1
  154. package/dist/rules/comments/pattern-rule.js +1 -1
  155. package/dist/rules/comments/pattern-rule.js.map +1 -1
  156. package/dist/rules/comments/scan.d.ts +1 -1
  157. package/dist/rules/comments/scan.d.ts.map +1 -1
  158. package/dist/rules/comments/scan.js +1 -1
  159. package/dist/rules/comments/scan.js.map +1 -1
  160. package/dist/rules/imports/aliased.d.ts +1 -1
  161. package/dist/rules/imports/aliased.d.ts.map +1 -1
  162. package/dist/rules/imports/aliased.js +2 -2
  163. package/dist/rules/imports/aliased.js.map +1 -1
  164. package/dist/rules/imports/cycles.d.ts +1 -1
  165. package/dist/rules/imports/cycles.d.ts.map +1 -1
  166. package/dist/rules/imports/cycles.js +4 -4
  167. package/dist/rules/imports/cycles.js.map +1 -1
  168. package/dist/rules/imports/fences.d.ts +2 -2
  169. package/dist/rules/imports/fences.d.ts.map +1 -1
  170. package/dist/rules/imports/fences.js +3 -3
  171. package/dist/rules/imports/fences.js.map +1 -1
  172. package/dist/rules/imports/resolvable.d.ts +1 -1
  173. package/dist/rules/imports/resolvable.js +3 -3
  174. package/dist/rules/imports/resolvable.js.map +1 -1
  175. package/dist/rules/manifests-sorted.d.ts +1 -1
  176. package/dist/rules/manifests-sorted.d.ts.map +1 -1
  177. package/dist/rules/manifests-sorted.js +2 -2
  178. package/dist/rules/manifests-sorted.js.map +1 -1
  179. package/dist/rules/max-lines.d.ts +1 -1
  180. package/dist/rules/max-lines.js +1 -1
  181. package/dist/rules/max-lines.js.map +1 -1
  182. package/dist/rules/suppressions/biome/configs.d.ts +1 -1
  183. package/dist/rules/suppressions/biome/configs.d.ts.map +1 -1
  184. package/dist/rules/suppressions/biome/declarations.d.ts +1 -1
  185. package/dist/rules/suppressions/biome/declarations.d.ts.map +1 -1
  186. package/dist/rules/suppressions/biome/declarations.js +1 -1
  187. package/dist/rules/suppressions/biome/declarations.js.map +1 -1
  188. package/dist/rules/suppressions/biome/resolve.d.ts +1 -1
  189. package/dist/rules/suppressions/biome/resolve.d.ts.map +1 -1
  190. package/dist/rules/suppressions/biome/resolve.js +1 -1
  191. package/dist/rules/suppressions/biome/resolve.js.map +1 -1
  192. package/dist/rules/suppressions/biome-overrides.d.ts +1 -1
  193. package/dist/rules/suppressions/biome-overrides.js +4 -4
  194. package/dist/rules/suppressions/biome-overrides.js.map +1 -1
  195. package/dist/rules/suppressions/directives.d.ts +1 -1
  196. package/dist/rules/suppressions/directives.d.ts.map +1 -1
  197. package/dist/rules/suppressions/no-double-cast.d.ts +1 -1
  198. package/dist/rules/suppressions/no-double-cast.d.ts.map +1 -1
  199. package/dist/rules/suppressions/no-double-cast.js +2 -2
  200. package/dist/rules/suppressions/no-double-cast.js.map +1 -1
  201. package/dist/rules/suppressions/no-inline.d.ts +1 -1
  202. package/dist/rules/suppressions/no-inline.d.ts.map +1 -1
  203. package/dist/rules/suppressions/no-inline.js +2 -2
  204. package/dist/rules/suppressions/no-inline.js.map +1 -1
  205. package/dist/rules/suppressions/stylesheet-comments.d.ts +1 -1
  206. package/dist/rules/suppressions/stylesheet-comments.d.ts.map +1 -1
  207. package/dist/rules/suppressions/stylesheet-comments.js +1 -1
  208. package/dist/rules/suppressions/stylesheet-comments.js.map +1 -1
  209. package/dist/rules/syntax.d.ts +1 -1
  210. package/dist/rules/syntax.d.ts.map +1 -1
  211. package/package.json +10 -2
  212. package/src/baseline/compare.ts +1 -1
  213. package/src/baseline/format.ts +2 -2
  214. package/src/baseline/legacy.ts +2 -2
  215. package/src/baseline/rewrite.ts +1 -1
  216. package/src/baseline/update.ts +1 -1
  217. package/src/cli/args.ts +1 -1
  218. package/src/cli/baseline.ts +8 -8
  219. package/src/cli/fix.ts +7 -7
  220. package/src/cli/lint.ts +4 -4
  221. package/src/cli/migrate.ts +9 -9
  222. package/src/cli/run-main.ts +2 -2
  223. package/src/cli/shrink.ts +5 -5
  224. package/src/cli.ts +7 -7
  225. package/src/config/decode.ts +2 -2
  226. package/src/config/load.ts +3 -3
  227. package/src/config/resolve.ts +6 -6
  228. package/src/config.ts +1 -1
  229. package/src/engine/baseline-file.ts +6 -6
  230. package/src/engine/evaluate.ts +3 -3
  231. package/src/engine/run-rules.ts +3 -3
  232. package/src/engine/session.ts +6 -6
  233. package/src/engine/violation.ts +2 -2
  234. package/src/exceptions/registry.ts +2 -2
  235. package/src/git/base.ts +1 -1
  236. package/src/git/command.ts +1 -1
  237. package/src/git/history.ts +1 -1
  238. package/src/imports/departures.ts +2 -2
  239. package/src/imports/fences/evaluate.ts +2 -2
  240. package/src/imports/fences/match.ts +2 -2
  241. package/src/imports/fences/policy.ts +2 -2
  242. package/src/imports/fences/reach.ts +2 -2
  243. package/src/imports/fences/vocabulary.ts +1 -1
  244. package/src/imports/generated.ts +2 -2
  245. package/src/imports/graph.ts +2 -2
  246. package/src/imports/resolve.ts +1 -1
  247. package/src/imports/workspace.ts +1 -1
  248. package/src/index.ts +3 -3
  249. package/src/inventory/collect.ts +1 -1
  250. package/src/manifests/sorted.ts +3 -3
  251. package/src/report/render.ts +3 -3
  252. package/src/report/stale.ts +3 -3
  253. package/src/rules/biome.ts +3 -3
  254. package/src/rules/built-in.ts +14 -14
  255. package/src/rules/comments/kinds.ts +1 -1
  256. package/src/rules/comments/max-per-file.ts +2 -2
  257. package/src/rules/comments/no-jsdoc.ts +1 -1
  258. package/src/rules/comments/pattern-rule.ts +1 -1
  259. package/src/rules/comments/scan.ts +2 -2
  260. package/src/rules/imports/aliased.ts +2 -2
  261. package/src/rules/imports/cycles.ts +4 -4
  262. package/src/rules/imports/fences.ts +4 -4
  263. package/src/rules/imports/resolvable.ts +3 -3
  264. package/src/rules/manifests-sorted.ts +2 -2
  265. package/src/rules/max-lines.ts +1 -1
  266. package/src/rules/suppressions/biome/configs.ts +1 -1
  267. package/src/rules/suppressions/biome/declarations.ts +1 -1
  268. package/src/rules/suppressions/biome/resolve.ts +2 -2
  269. package/src/rules/suppressions/biome-overrides.ts +4 -4
  270. package/src/rules/suppressions/directives.ts +1 -1
  271. package/src/rules/suppressions/no-double-cast.ts +2 -2
  272. package/src/rules/suppressions/no-inline.ts +2 -2
  273. package/src/rules/suppressions/stylesheet-comments.ts +1 -1
  274. package/src/rules/syntax.ts +1 -1
@@ -1,13 +1,13 @@
1
1
  import { join } from "node:path";
2
2
  import { Console, Effect, type FileSystem } from "effect";
3
- import type { BaselineEntry } from "../baseline/format.ts";
4
- import { rewriteBaseline } from "../baseline/rewrite.ts";
5
- import { adopt, type Pruned, prune, type Scope } from "../baseline/update.ts";
6
- import { openSession, type Session } from "../engine/session.ts";
7
- import { applyRegistry } from "../exceptions/registry.ts";
8
- import { SetupFailure } from "../failure.ts";
9
- import { writeText } from "../inventory/filesystem.ts";
10
- import { plural } from "../report/plural.ts";
3
+ import type { BaselineEntry } from "#baseline/format.ts";
4
+ import { rewriteBaseline } from "#baseline/rewrite.ts";
5
+ import { adopt, type Pruned, prune, type Scope } from "#baseline/update.ts";
6
+ import { openSession, type Session } from "#engine/session.ts";
7
+ import { applyRegistry } from "#exceptions/registry.ts";
8
+ import { SetupFailure } from "#failure.ts";
9
+ import { writeText } from "#inventory/filesystem.ts";
10
+ import { plural } from "#report/plural.ts";
11
11
 
12
12
  const save = (session: Session, entries: readonly BaselineEntry[]): Effect.Effect<void, SetupFailure, FileSystem.FileSystem> =>
13
13
  Effect.mapError(
package/src/cli/fix.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { relative } from "node:path";
2
2
  import { Console, Effect, FileSystem } from "effect";
3
- import { biomeReport, type Report } from "../biome/report.ts";
4
- import { loadConfig } from "../config/load.ts";
5
- import { SetupFailure } from "../failure.ts";
6
- import { posix } from "../inventory/ignore-scope.ts";
7
- import { walk } from "../inventory/walk.ts";
8
- import { sortManifests } from "../manifests/sorted.ts";
9
- import { plural } from "../report/plural.ts";
3
+ import { biomeReport, type Report } from "#biome/report.ts";
4
+ import { loadConfig } from "#config/load.ts";
5
+ import { SetupFailure } from "#failure.ts";
6
+ import { posix } from "#inventory/ignore-scope.ts";
7
+ import { walk } from "#inventory/walk.ts";
8
+ import { sortManifests } from "#manifests/sorted.ts";
9
+ import { plural } from "#report/plural.ts";
10
10
 
11
11
  export const MAX_FIX_ROUNDS = 5;
12
12
 
package/src/cli/lint.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Console, Effect, type FileSystem } from "effect";
2
- import { evaluate, passes } from "../engine/evaluate.ts";
3
- import { openSession } from "../engine/session.ts";
4
- import { GateFailed, type SetupFailure } from "../failure.ts";
5
- import { render, type WarningDetail } from "../report/render.ts";
2
+ import { evaluate, passes } from "#engine/evaluate.ts";
3
+ import { openSession } from "#engine/session.ts";
4
+ import { GateFailed, type SetupFailure } from "#failure.ts";
5
+ import { render, type WarningDetail } from "#report/render.ts";
6
6
 
7
7
  export const lint = (
8
8
  cwd: string,
@@ -1,14 +1,14 @@
1
1
  import { join } from "node:path";
2
2
  import { Console, Effect, FileSystem } from "effect";
3
- import { encodeBaseline } from "../baseline/format.ts";
4
- import { convertLegacy, decodeLegacyBaseline, LEGACY_BASELINE } from "../baseline/legacy.ts";
5
- import { loadConfig } from "../config/load.ts";
6
- import { validOrFail } from "../decoded.ts";
7
- import { readInput } from "../engine/baseline-file.ts";
8
- import { scan } from "../engine/session.ts";
9
- import { SetupFailure } from "../failure.ts";
10
- import { writeText } from "../inventory/filesystem.ts";
11
- import { plural } from "../report/plural.ts";
3
+ import { encodeBaseline } from "#baseline/format.ts";
4
+ import { convertLegacy, decodeLegacyBaseline, LEGACY_BASELINE } from "#baseline/legacy.ts";
5
+ import { loadConfig } from "#config/load.ts";
6
+ import { validOrFail } from "#decoded.ts";
7
+ import { readInput } from "#engine/baseline-file.ts";
8
+ import { scan } from "#engine/session.ts";
9
+ import { SetupFailure } from "#failure.ts";
10
+ import { writeText } from "#inventory/filesystem.ts";
11
+ import { plural } from "#report/plural.ts";
12
12
 
13
13
  export const migrateBaseline = (
14
14
  cwd: string,
@@ -5,8 +5,8 @@ import * as NodeFileSystem from "@effect/platform-node/NodeFileSystem";
5
5
  import * as NodePath from "@effect/platform-node/NodePath";
6
6
  import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
7
7
  import { Cause, Console, Effect, Exit, type FileSystem, Layer, Runtime } from "effect";
8
- import { SetupFailure } from "../failure.ts";
9
- import type { Git } from "../git/command.ts";
8
+ import { SetupFailure } from "#failure.ts";
9
+ import type { Git } from "#git/command.ts";
10
10
 
11
11
  const INTERRUPTED = 130;
12
12
  const COULD_NOT_RUN = 2;
package/src/cli/shrink.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { Console, Effect, type FileSystem } from "effect";
2
- import type { Scope } from "../baseline/update.ts";
3
- import type { SetupFailure } from "../failure.ts";
4
- import { resolveBase } from "../git/base.ts";
5
- import type { Git } from "../git/command.ts";
6
- import { changesSince } from "../git/history.ts";
2
+ import type { Scope } from "#baseline/update.ts";
3
+ import type { SetupFailure } from "#failure.ts";
4
+ import { resolveBase } from "#git/base.ts";
5
+ import type { Git } from "#git/command.ts";
6
+ import { changesSince } from "#git/history.ts";
7
7
  import { shrinkBaseline } from "./baseline.ts";
8
8
 
9
9
  const followedMoves = (root: string, against: string | undefined): Effect.Effect<Scope, SetupFailure, Git> =>
package/src/cli.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import process from "node:process";
3
3
  import { Console, Effect } from "effect";
4
- import { parseCommand, USAGE } from "./cli/args.ts";
5
- import { writeBaseline } from "./cli/baseline.ts";
6
- import { fix } from "./cli/fix.ts";
7
- import { lint } from "./cli/lint.ts";
8
- import { migrateBaseline } from "./cli/migrate.ts";
9
- import { runMain } from "./cli/run-main.ts";
10
- import { pruneBaseline, tightenBaseline } from "./cli/shrink.ts";
4
+ import { parseCommand, USAGE } from "#cli/args.ts";
5
+ import { writeBaseline } from "#cli/baseline.ts";
6
+ import { fix } from "#cli/fix.ts";
7
+ import { lint } from "#cli/lint.ts";
8
+ import { migrateBaseline } from "#cli/migrate.ts";
9
+ import { runMain } from "#cli/run-main.ts";
10
+ import { pruneBaseline, tightenBaseline } from "#cli/shrink.ts";
11
11
  import { SetupFailure } from "./failure.ts";
12
12
 
13
13
  const parsed = parseCommand(process.argv.slice(2));
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect";
2
- import { type Decoded, decodeWith } from "../decoded.ts";
3
- import type { Rule } from "../rule.ts";
2
+ import { type Decoded, decodeWith } from "#decoded.ts";
3
+ import type { Rule } from "#rule.ts";
4
4
 
5
5
  const isRule = (value: unknown): value is Rule =>
6
6
  typeof value === "object"
@@ -1,9 +1,9 @@
1
1
  import { dirname, resolve } from "node:path";
2
2
  import { pathToFileURL } from "node:url";
3
3
  import { Effect, FileSystem } from "effect";
4
- import { validOrFail } from "../decoded.ts";
5
- import { SetupFailure } from "../failure.ts";
6
- import type { InventoryScope } from "../inventory/collect.ts";
4
+ import { validOrFail } from "#decoded.ts";
5
+ import { SetupFailure } from "#failure.ts";
6
+ import type { InventoryScope } from "#inventory/collect.ts";
7
7
  import { type ConfigInput, decodeConfig } from "./decode.ts";
8
8
  import { CONFIG_FILE } from "./file.ts";
9
9
  import { type ResolvedRules, resolveRules } from "./resolve.ts";
@@ -1,10 +1,10 @@
1
1
  import { Effect } from "effect";
2
- import type { Level } from "../config.ts";
3
- import type { Decoded } from "../decoded.ts";
4
- import type { ActiveRule } from "../engine/run-rules.ts";
5
- import type { RuleIndex } from "../engine/violation.ts";
6
- import type { Rule } from "../rule.ts";
7
- import { builtInRules } from "../rules/built-in.ts";
2
+ import type { Level } from "#config.ts";
3
+ import type { Decoded } from "#decoded.ts";
4
+ import type { ActiveRule } from "#engine/run-rules.ts";
5
+ import type { RuleIndex } from "#engine/violation.ts";
6
+ import type { Rule } from "#rule.ts";
7
+ import { builtInRules } from "#rules/built-in.ts";
8
8
  import type { ConfigInput } from "./decode.ts";
9
9
 
10
10
  export interface ResolvedRules extends RuleIndex {
package/src/config.ts CHANGED
@@ -1,5 +1,5 @@
1
+ import type { builtInRules } from "#rules/built-in.ts";
1
2
  import type { Rule } from "./rule.ts";
2
- import type { builtInRules } from "./rules/built-in.ts";
3
3
 
4
4
  export type Level = "error" | "warn" | "off";
5
5
 
@@ -1,11 +1,11 @@
1
1
  import { join } from "node:path";
2
2
  import { Effect, type FileSystem } from "effect";
3
- import { type BaselineEntry, decodeBaseline } from "../baseline/format.ts";
4
- import { LEGACY_BASELINE } from "../baseline/legacy.ts";
5
- import type { ResolvedConfig } from "../config/load.ts";
6
- import { validOrFail } from "../decoded.ts";
7
- import { SetupFailure } from "../failure.ts";
8
- import { readOptionalText } from "../inventory/filesystem.ts";
3
+ import { type BaselineEntry, decodeBaseline } from "#baseline/format.ts";
4
+ import { LEGACY_BASELINE } from "#baseline/legacy.ts";
5
+ import type { ResolvedConfig } from "#config/load.ts";
6
+ import { validOrFail } from "#decoded.ts";
7
+ import { SetupFailure } from "#failure.ts";
8
+ import { readOptionalText } from "#inventory/filesystem.ts";
9
9
 
10
10
  export interface BaselineFile {
11
11
  readonly entries: readonly BaselineEntry[];
@@ -1,6 +1,6 @@
1
- import { applyBaseline, type Regression, type StaleBaselineEntry } from "../baseline/compare.ts";
2
- import type { BaselineEntry } from "../baseline/format.ts";
3
- import { applyRegistry, type RegistryEntry, type StaleRegistryEntry } from "../exceptions/registry.ts";
1
+ import { applyBaseline, type Regression, type StaleBaselineEntry } from "#baseline/compare.ts";
2
+ import type { BaselineEntry } from "#baseline/format.ts";
3
+ import { applyRegistry, type RegistryEntry, type StaleRegistryEntry } from "#exceptions/registry.ts";
4
4
  import { byLocation, type RuleIndex, type Violation } from "./violation.ts";
5
5
 
6
6
  export interface Outcome {
@@ -1,8 +1,8 @@
1
1
  import { isAbsolute, relative } from "node:path";
2
2
  import { Effect } from "effect";
3
- import { SetupFailure } from "../failure.ts";
4
- import { posix } from "../inventory/ignore-scope.ts";
5
- import type { Finding, Findings, RuleInputs } from "../rule.ts";
3
+ import { SetupFailure } from "#failure.ts";
4
+ import { posix } from "#inventory/ignore-scope.ts";
5
+ import type { Finding, Findings, RuleInputs } from "#rule.ts";
6
6
  import type { ActiveLevel, Violation } from "./violation.ts";
7
7
 
8
8
  export interface ActiveRule {
@@ -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;