Comp AI CRM is an open source, CRM designed for AI agents. Agentic-first CRM.
TypeScript
ci: run anti-slop lint in CI and pre-push (CMP-84) (#153)
github-actions[bot]d7040b477188
diff --git a/.githooks/pre-push b/.githooks/pre-pushindex d803088c..fa0e86d0 100755--- a/.githooks/pre-push+++ b/.githooks/pre-push@@ -21,7 +21,7 @@ fail() {exit 1}-for task in check-types lint test; do+for task in check-types lint lint:slop test; doecho "pre-push: bun run $task"bun run "$task" || fail "$task"donediff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 6723eb1e..bf771476 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -64,4 +64,6 @@ jobs:- run: bun run lint+ - run: bun run lint:slop+- run: bun run testdiff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 0c58b41a..bd78b5ef 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -36,10 +36,20 @@ bun run dev```shbun run check-typesbun run lint+bun run lint:slopbun run test```-All three run on CI, and `bun run format` fixes most of what `lint` complains about.+All four run on CI, and `bun run format` fixes most of what `lint` complains about.++`lint:slop` is [anti-slop](https://github.com/dmmulroy/anti-slop) over Oxlint, and it holds one+line: **data crossing an I/O boundary is parsed into a domain type at the point it arrives.** No+`Record<string, unknown>` standing in for a contract, no `typeof` check standing in for a parser,+no `unknown` parameter without a schema, no `as unknown as` around a `Json` column. Shapes that+cross a package boundary live in `packages/validation/src`, one module per shape. It was taken to+zero in one pass; the gate is what keeps it there. A genuinely open map — a telemetry property+bag, a log field, a user-defined custom field value — is scoped off in `.oxlintrc.json` with its+reason, and that is the only sanctioned way past it.**A `pre-push` hook runs them for you**, so a push that would fail CI fails on your machineinstead, where the feedback is in seconds rather than minutes. `bun install` wires it up — thediff --git a/tools/oxlint/anti-slop/package.json b/tools/oxlint/anti-slop/package.jsonnew file mode 100644index 00000000..5ffd9800--- /dev/null+++ b/tools/oxlint/anti-slop/package.json@@ -0,0 +1 @@+{ "type": "module" }