@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.
- package/CHANGELOG.md +6 -0
- package/dist/baseline/compare.d.ts +1 -1
- package/dist/baseline/compare.d.ts.map +1 -1
- package/dist/baseline/compare.js +1 -1
- package/dist/baseline/compare.js.map +1 -1
- package/dist/baseline/format.d.ts +1 -1
- package/dist/baseline/format.d.ts.map +1 -1
- package/dist/baseline/format.js +2 -2
- package/dist/baseline/format.js.map +1 -1
- package/dist/baseline/legacy.d.ts +2 -2
- package/dist/baseline/legacy.d.ts.map +1 -1
- package/dist/baseline/legacy.js +2 -2
- package/dist/baseline/legacy.js.map +1 -1
- package/dist/baseline/rewrite.js +1 -1
- package/dist/baseline/rewrite.js.map +1 -1
- package/dist/baseline/update.d.ts +1 -1
- package/dist/baseline/update.d.ts.map +1 -1
- package/dist/baseline/update.js +1 -1
- package/dist/baseline/update.js.map +1 -1
- package/dist/cli/args.d.ts +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/baseline.d.ts +3 -3
- package/dist/cli/baseline.d.ts.map +1 -1
- package/dist/cli/baseline.js +7 -7
- package/dist/cli/baseline.js.map +1 -1
- package/dist/cli/fix.d.ts +1 -1
- package/dist/cli/fix.d.ts.map +1 -1
- package/dist/cli/fix.js +7 -7
- package/dist/cli/fix.js.map +1 -1
- package/dist/cli/lint.d.ts +2 -2
- package/dist/cli/lint.d.ts.map +1 -1
- package/dist/cli/lint.js +4 -4
- package/dist/cli/lint.js.map +1 -1
- package/dist/cli/migrate.d.ts +1 -1
- package/dist/cli/migrate.d.ts.map +1 -1
- package/dist/cli/migrate.js +9 -9
- package/dist/cli/migrate.js.map +1 -1
- package/dist/cli/run-main.d.ts +1 -1
- package/dist/cli/run-main.d.ts.map +1 -1
- package/dist/cli/run-main.js +1 -1
- package/dist/cli/run-main.js.map +1 -1
- package/dist/cli/shrink.d.ts +2 -2
- package/dist/cli/shrink.d.ts.map +1 -1
- package/dist/cli/shrink.js +2 -2
- package/dist/cli/shrink.js.map +1 -1
- package/dist/cli.js +7 -7
- package/dist/cli.js.map +1 -1
- package/dist/config/decode.d.ts +2 -2
- package/dist/config/decode.d.ts.map +1 -1
- package/dist/config/decode.js +1 -1
- package/dist/config/decode.js.map +1 -1
- package/dist/config/load.d.ts +2 -2
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +2 -2
- package/dist/config/load.js.map +1 -1
- package/dist/config/resolve.d.ts +3 -3
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +1 -1
- package/dist/config/resolve.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/engine/baseline-file.d.ts +3 -3
- package/dist/engine/baseline-file.d.ts.map +1 -1
- package/dist/engine/baseline-file.js +5 -5
- package/dist/engine/baseline-file.js.map +1 -1
- package/dist/engine/evaluate.d.ts +3 -3
- package/dist/engine/evaluate.d.ts.map +1 -1
- package/dist/engine/evaluate.js +2 -2
- package/dist/engine/evaluate.js.map +1 -1
- package/dist/engine/run-rules.d.ts +2 -2
- package/dist/engine/run-rules.d.ts.map +1 -1
- package/dist/engine/run-rules.js +2 -2
- package/dist/engine/run-rules.js.map +1 -1
- package/dist/engine/session.d.ts +4 -4
- package/dist/engine/session.d.ts.map +1 -1
- package/dist/engine/session.js +6 -6
- package/dist/engine/session.js.map +1 -1
- package/dist/engine/violation.d.ts +2 -2
- package/dist/engine/violation.d.ts.map +1 -1
- package/dist/exceptions/registry.d.ts +2 -2
- package/dist/exceptions/registry.d.ts.map +1 -1
- package/dist/exceptions/registry.js +2 -2
- package/dist/exceptions/registry.js.map +1 -1
- package/dist/git/base.d.ts +1 -1
- package/dist/git/base.d.ts.map +1 -1
- package/dist/git/base.js +1 -1
- package/dist/git/base.js.map +1 -1
- package/dist/git/command.d.ts +1 -1
- package/dist/git/command.d.ts.map +1 -1
- package/dist/git/command.js +1 -1
- package/dist/git/command.js.map +1 -1
- package/dist/git/history.d.ts +1 -1
- package/dist/git/history.d.ts.map +1 -1
- package/dist/imports/departures.d.ts +1 -1
- package/dist/imports/departures.d.ts.map +1 -1
- package/dist/imports/departures.js +1 -1
- package/dist/imports/departures.js.map +1 -1
- package/dist/imports/fences/evaluate.d.ts +2 -2
- package/dist/imports/fences/evaluate.d.ts.map +1 -1
- package/dist/imports/fences/match.d.ts +2 -2
- package/dist/imports/fences/match.d.ts.map +1 -1
- package/dist/imports/fences/match.js +2 -2
- package/dist/imports/fences/match.js.map +1 -1
- package/dist/imports/fences/policy.js +1 -1
- package/dist/imports/fences/policy.js.map +1 -1
- package/dist/imports/fences/reach.d.ts +2 -2
- package/dist/imports/fences/reach.d.ts.map +1 -1
- package/dist/imports/fences/vocabulary.d.ts +1 -1
- package/dist/imports/fences/vocabulary.d.ts.map +1 -1
- package/dist/imports/generated.d.ts +1 -1
- package/dist/imports/generated.d.ts.map +1 -1
- package/dist/imports/generated.js +1 -1
- package/dist/imports/generated.js.map +1 -1
- package/dist/imports/graph.d.ts +1 -1
- package/dist/imports/graph.d.ts.map +1 -1
- package/dist/imports/graph.js +1 -1
- package/dist/imports/graph.js.map +1 -1
- package/dist/imports/resolve.js +1 -1
- package/dist/imports/resolve.js.map +1 -1
- package/dist/imports/workspace.d.ts +1 -1
- package/dist/imports/workspace.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/inventory/collect.d.ts +1 -1
- package/dist/inventory/collect.d.ts.map +1 -1
- package/dist/manifests/sorted.d.ts +1 -1
- package/dist/manifests/sorted.d.ts.map +1 -1
- package/dist/manifests/sorted.js +3 -3
- package/dist/manifests/sorted.js.map +1 -1
- package/dist/report/render.d.ts +1 -1
- package/dist/report/render.d.ts.map +1 -1
- package/dist/report/render.js +2 -2
- package/dist/report/render.js.map +1 -1
- package/dist/report/stale.d.ts +1 -1
- package/dist/report/stale.d.ts.map +1 -1
- package/dist/rules/biome.d.ts +1 -1
- package/dist/rules/biome.d.ts.map +1 -1
- package/dist/rules/biome.js +3 -3
- package/dist/rules/biome.js.map +1 -1
- package/dist/rules/built-in.js +14 -14
- package/dist/rules/built-in.js.map +1 -1
- package/dist/rules/comments/kinds.js +1 -1
- package/dist/rules/comments/kinds.js.map +1 -1
- package/dist/rules/comments/max-per-file.d.ts +1 -1
- package/dist/rules/comments/max-per-file.js +2 -2
- package/dist/rules/comments/max-per-file.js.map +1 -1
- package/dist/rules/comments/no-jsdoc.d.ts +1 -1
- package/dist/rules/comments/no-jsdoc.js +1 -1
- package/dist/rules/comments/no-jsdoc.js.map +1 -1
- package/dist/rules/comments/pattern-rule.d.ts +1 -1
- package/dist/rules/comments/pattern-rule.d.ts.map +1 -1
- package/dist/rules/comments/pattern-rule.js +1 -1
- package/dist/rules/comments/pattern-rule.js.map +1 -1
- package/dist/rules/comments/scan.d.ts +1 -1
- package/dist/rules/comments/scan.d.ts.map +1 -1
- package/dist/rules/comments/scan.js +1 -1
- package/dist/rules/comments/scan.js.map +1 -1
- package/dist/rules/imports/aliased.d.ts +1 -1
- package/dist/rules/imports/aliased.d.ts.map +1 -1
- package/dist/rules/imports/aliased.js +2 -2
- package/dist/rules/imports/aliased.js.map +1 -1
- package/dist/rules/imports/cycles.d.ts +1 -1
- package/dist/rules/imports/cycles.d.ts.map +1 -1
- package/dist/rules/imports/cycles.js +4 -4
- package/dist/rules/imports/cycles.js.map +1 -1
- package/dist/rules/imports/fences.d.ts +2 -2
- package/dist/rules/imports/fences.d.ts.map +1 -1
- package/dist/rules/imports/fences.js +3 -3
- package/dist/rules/imports/fences.js.map +1 -1
- package/dist/rules/imports/resolvable.d.ts +1 -1
- package/dist/rules/imports/resolvable.js +3 -3
- package/dist/rules/imports/resolvable.js.map +1 -1
- package/dist/rules/manifests-sorted.d.ts +1 -1
- package/dist/rules/manifests-sorted.d.ts.map +1 -1
- package/dist/rules/manifests-sorted.js +2 -2
- package/dist/rules/manifests-sorted.js.map +1 -1
- package/dist/rules/max-lines.d.ts +1 -1
- package/dist/rules/max-lines.js +1 -1
- package/dist/rules/max-lines.js.map +1 -1
- package/dist/rules/suppressions/biome/configs.d.ts +1 -1
- package/dist/rules/suppressions/biome/configs.d.ts.map +1 -1
- package/dist/rules/suppressions/biome/declarations.d.ts +1 -1
- package/dist/rules/suppressions/biome/declarations.d.ts.map +1 -1
- package/dist/rules/suppressions/biome/declarations.js +1 -1
- package/dist/rules/suppressions/biome/declarations.js.map +1 -1
- package/dist/rules/suppressions/biome/resolve.d.ts +1 -1
- package/dist/rules/suppressions/biome/resolve.d.ts.map +1 -1
- package/dist/rules/suppressions/biome/resolve.js +1 -1
- package/dist/rules/suppressions/biome/resolve.js.map +1 -1
- package/dist/rules/suppressions/biome-overrides.d.ts +1 -1
- package/dist/rules/suppressions/biome-overrides.js +4 -4
- package/dist/rules/suppressions/biome-overrides.js.map +1 -1
- package/dist/rules/suppressions/directives.d.ts +1 -1
- package/dist/rules/suppressions/directives.d.ts.map +1 -1
- package/dist/rules/suppressions/no-double-cast.d.ts +1 -1
- package/dist/rules/suppressions/no-double-cast.d.ts.map +1 -1
- package/dist/rules/suppressions/no-double-cast.js +2 -2
- package/dist/rules/suppressions/no-double-cast.js.map +1 -1
- package/dist/rules/suppressions/no-inline.d.ts +1 -1
- package/dist/rules/suppressions/no-inline.d.ts.map +1 -1
- package/dist/rules/suppressions/no-inline.js +2 -2
- package/dist/rules/suppressions/no-inline.js.map +1 -1
- package/dist/rules/suppressions/stylesheet-comments.d.ts +1 -1
- package/dist/rules/suppressions/stylesheet-comments.d.ts.map +1 -1
- package/dist/rules/suppressions/stylesheet-comments.js +1 -1
- package/dist/rules/suppressions/stylesheet-comments.js.map +1 -1
- package/dist/rules/syntax.d.ts +1 -1
- package/dist/rules/syntax.d.ts.map +1 -1
- package/package.json +10 -2
- package/src/baseline/compare.ts +1 -1
- package/src/baseline/format.ts +2 -2
- package/src/baseline/legacy.ts +2 -2
- package/src/baseline/rewrite.ts +1 -1
- package/src/baseline/update.ts +1 -1
- package/src/cli/args.ts +1 -1
- package/src/cli/baseline.ts +8 -8
- package/src/cli/fix.ts +7 -7
- package/src/cli/lint.ts +4 -4
- package/src/cli/migrate.ts +9 -9
- package/src/cli/run-main.ts +2 -2
- package/src/cli/shrink.ts +5 -5
- package/src/cli.ts +7 -7
- package/src/config/decode.ts +2 -2
- package/src/config/load.ts +3 -3
- package/src/config/resolve.ts +6 -6
- package/src/config.ts +1 -1
- package/src/engine/baseline-file.ts +6 -6
- package/src/engine/evaluate.ts +3 -3
- package/src/engine/run-rules.ts +3 -3
- package/src/engine/session.ts +6 -6
- package/src/engine/violation.ts +2 -2
- package/src/exceptions/registry.ts +2 -2
- package/src/git/base.ts +1 -1
- package/src/git/command.ts +1 -1
- package/src/git/history.ts +1 -1
- package/src/imports/departures.ts +2 -2
- package/src/imports/fences/evaluate.ts +2 -2
- package/src/imports/fences/match.ts +2 -2
- package/src/imports/fences/policy.ts +2 -2
- package/src/imports/fences/reach.ts +2 -2
- package/src/imports/fences/vocabulary.ts +1 -1
- package/src/imports/generated.ts +2 -2
- package/src/imports/graph.ts +2 -2
- package/src/imports/resolve.ts +1 -1
- package/src/imports/workspace.ts +1 -1
- package/src/index.ts +3 -3
- package/src/inventory/collect.ts +1 -1
- package/src/manifests/sorted.ts +3 -3
- package/src/report/render.ts +3 -3
- package/src/report/stale.ts +3 -3
- package/src/rules/biome.ts +3 -3
- package/src/rules/built-in.ts +14 -14
- package/src/rules/comments/kinds.ts +1 -1
- package/src/rules/comments/max-per-file.ts +2 -2
- package/src/rules/comments/no-jsdoc.ts +1 -1
- package/src/rules/comments/pattern-rule.ts +1 -1
- package/src/rules/comments/scan.ts +2 -2
- package/src/rules/imports/aliased.ts +2 -2
- package/src/rules/imports/cycles.ts +4 -4
- package/src/rules/imports/fences.ts +4 -4
- package/src/rules/imports/resolvable.ts +3 -3
- package/src/rules/manifests-sorted.ts +2 -2
- package/src/rules/max-lines.ts +1 -1
- package/src/rules/suppressions/biome/configs.ts +1 -1
- package/src/rules/suppressions/biome/declarations.ts +1 -1
- package/src/rules/suppressions/biome/resolve.ts +2 -2
- package/src/rules/suppressions/biome-overrides.ts +4 -4
- package/src/rules/suppressions/directives.ts +1 -1
- package/src/rules/suppressions/no-double-cast.ts +2 -2
- package/src/rules/suppressions/no-inline.ts +2 -2
- package/src/rules/suppressions/stylesheet-comments.ts +1 -1
- package/src/rules/syntax.ts +1 -1
package/src/cli/baseline.ts
CHANGED
|
@@ -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 "
|
|
4
|
-
import { rewriteBaseline } from "
|
|
5
|
-
import { adopt, type Pruned, prune, type Scope } from "
|
|
6
|
-
import { openSession, type Session } from "
|
|
7
|
-
import { applyRegistry } from "
|
|
8
|
-
import { SetupFailure } from "
|
|
9
|
-
import { writeText } from "
|
|
10
|
-
import { plural } from "
|
|
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 "
|
|
4
|
-
import { loadConfig } from "
|
|
5
|
-
import { SetupFailure } from "
|
|
6
|
-
import { posix } from "
|
|
7
|
-
import { walk } from "
|
|
8
|
-
import { sortManifests } from "
|
|
9
|
-
import { plural } from "
|
|
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 "
|
|
3
|
-
import { openSession } from "
|
|
4
|
-
import { GateFailed, type SetupFailure } from "
|
|
5
|
-
import { render, type WarningDetail } from "
|
|
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,
|
package/src/cli/migrate.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import { Console, Effect, FileSystem } from "effect";
|
|
3
|
-
import { encodeBaseline } from "
|
|
4
|
-
import { convertLegacy, decodeLegacyBaseline, LEGACY_BASELINE } from "
|
|
5
|
-
import { loadConfig } from "
|
|
6
|
-
import { validOrFail } from "
|
|
7
|
-
import { readInput } from "
|
|
8
|
-
import { scan } from "
|
|
9
|
-
import { SetupFailure } from "
|
|
10
|
-
import { writeText } from "
|
|
11
|
-
import { plural } from "
|
|
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,
|
package/src/cli/run-main.ts
CHANGED
|
@@ -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 "
|
|
9
|
-
import type { Git } from "
|
|
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 "
|
|
3
|
-
import type { SetupFailure } from "
|
|
4
|
-
import { resolveBase } from "
|
|
5
|
-
import type { Git } from "
|
|
6
|
-
import { changesSince } from "
|
|
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 "
|
|
5
|
-
import { writeBaseline } from "
|
|
6
|
-
import { fix } from "
|
|
7
|
-
import { lint } from "
|
|
8
|
-
import { migrateBaseline } from "
|
|
9
|
-
import { runMain } from "
|
|
10
|
-
import { pruneBaseline, tightenBaseline } from "
|
|
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));
|
package/src/config/decode.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { type Decoded, decodeWith } from "
|
|
3
|
-
import type { Rule } from "
|
|
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"
|
package/src/config/load.ts
CHANGED
|
@@ -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 "
|
|
5
|
-
import { SetupFailure } from "
|
|
6
|
-
import type { InventoryScope } from "
|
|
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";
|
package/src/config/resolve.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
|
-
import type { Level } from "
|
|
3
|
-
import type { Decoded } from "
|
|
4
|
-
import type { ActiveRule } from "
|
|
5
|
-
import type { RuleIndex } from "
|
|
6
|
-
import type { Rule } from "
|
|
7
|
-
import { builtInRules } from "
|
|
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,11 +1,11 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import { Effect, type FileSystem } from "effect";
|
|
3
|
-
import { type BaselineEntry, decodeBaseline } from "
|
|
4
|
-
import { LEGACY_BASELINE } from "
|
|
5
|
-
import type { ResolvedConfig } from "
|
|
6
|
-
import { validOrFail } from "
|
|
7
|
-
import { SetupFailure } from "
|
|
8
|
-
import { readOptionalText } from "
|
|
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[];
|
package/src/engine/evaluate.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { applyBaseline, type Regression, type StaleBaselineEntry } from "
|
|
2
|
-
import type { BaselineEntry } from "
|
|
3
|
-
import { applyRegistry, type RegistryEntry, type StaleRegistryEntry } from "
|
|
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 {
|
package/src/engine/run-rules.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isAbsolute, relative } from "node:path";
|
|
2
2
|
import { Effect } from "effect";
|
|
3
|
-
import { SetupFailure } from "
|
|
4
|
-
import { posix } from "
|
|
5
|
-
import type { Finding, Findings, RuleInputs } from "
|
|
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 {
|
package/src/engine/session.ts
CHANGED
|
@@ -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 "
|
|
4
|
-
import { validOrFail } from "
|
|
5
|
-
import { decodeRegistry, type RegistryEntry } from "
|
|
6
|
-
import { SetupFailure } from "
|
|
7
|
-
import { collectInventory, type Inventory } from "
|
|
8
|
-
import { type FilesystemFailure, readOptionalText } from "
|
|
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";
|
package/src/engine/violation.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { type Decoded, decodeWith } from "
|
|
3
|
-
import { type RuleIndex, registrable, unusedEntryProblem, type Violation } from "
|
|
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
package/src/git/command.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect, Stream } from "effect";
|
|
2
2
|
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
|
|
3
|
-
import { SetupFailure } from "
|
|
3
|
+
import { SetupFailure } from "#failure.ts";
|
|
4
4
|
|
|
5
5
|
export interface GitResult {
|
|
6
6
|
readonly code: number;
|
package/src/git/history.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { realpathSync } from "node:fs";
|
|
2
2
|
import { posix } from "node:path";
|
|
3
|
-
import type { RuleInputs } from "
|
|
4
|
-
import { parse } from "
|
|
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 {
|
|
2
|
-
import type {
|
|
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 "
|
|
2
|
-
import { packageOf, type WorkspacePackage } from "
|
|
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 "
|
|
2
|
-
import { type Endpoint, packageNameOf } from "
|
|
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 "
|
|
2
|
-
import type { Endpoint } from "
|
|
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 {
|
package/src/imports/generated.ts
CHANGED
|
@@ -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 "
|
|
5
|
-
import type { RuleInputs } from "
|
|
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">;
|
package/src/imports/graph.ts
CHANGED
|
@@ -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 "
|
|
4
|
-
import { parse } from "
|
|
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";
|
package/src/imports/resolve.ts
CHANGED
|
@@ -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 "
|
|
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";
|
package/src/imports/workspace.ts
CHANGED
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";
|
package/src/inventory/collect.ts
CHANGED
|
@@ -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 "
|
|
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";
|
package/src/manifests/sorted.ts
CHANGED
|
@@ -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 "
|
|
5
|
-
import { posix } from "
|
|
6
|
-
import { walk } from "
|
|
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
|
|
package/src/report/render.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Regression } from "
|
|
2
|
-
import { type Outcome, passes } from "
|
|
3
|
-
import { groupBy, keyOf, type Violation } from "
|
|
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
|
|
package/src/report/stale.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { StaleBaselineEntry } from "
|
|
2
|
-
import type { Outcome } from "
|
|
3
|
-
import type { StaleRegistryEntry } from "
|
|
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 {
|
package/src/rules/biome.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { biomeReport, type Diagnostic } from "
|
|
2
|
-
import { defineRule, type Finding, type Rule, type RuleInputs } from "
|
|
3
|
-
import { itemsOf, member, parseJsonc, textOf } from "
|
|
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
|
|
package/src/rules/built-in.ts
CHANGED
|
@@ -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 "
|
|
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 "
|
|
3
|
-
import { defineRule, type Finding, type SourceFile } from "
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
|
-
import type { SourceFile } from "
|
|
3
|
-
import { parse } from "
|
|
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 "
|
|
2
|
-
import { defineRule } from "
|
|
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 "
|
|
2
|
-
import { type ImportEdge, importGraph } from "
|
|
3
|
-
import { shortestPath } from "
|
|
4
|
-
import { defineRule, type Finding } from "
|
|
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 "
|
|
3
|
-
import { compilePolicy } from "
|
|
4
|
-
import { importGraph } from "
|
|
5
|
-
import { defineRule } from "
|
|
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 "
|
|
3
|
-
import { importGraph } from "
|
|
4
|
-
import { defineRule } from "
|
|
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 "
|
|
4
|
-
import { defineRule, type Finding } from "
|
|
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.",
|
package/src/rules/max-lines.ts
CHANGED
|
@@ -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 "
|
|
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;
|