Skip to content

Verification for TypeScript repos

Hold a repo to its own rules.

One committed list of checks, whole-repo rules ESLint cannot reach, and linters pinned to an exact version. Every check runs, every command is printed, and a check that could not run is never a pass.

npx @noctcore/harness check

Zero runtime dependencies. No network call. Node 22 or later.

One harness check run: unit tests, a lockfile rule and actionlint at its pinned version pass. The secret-no-install rule fails on a job that reads a token and installs packages, and zizmor is blocked with exit 2 because neither its pinned binary nor Docker is there. Every check runs, and the run exits 1 listing both.

Your rules, in your repo.

harness lint-meta imports one file, the registry, and runs the rules it exports. The generic ones come from @noctcore/harness/rules; yours sit beside them.

  1. The registry exports META_RULES, an array of rule objects.
  2. Each rule reads the repo through ctx and returns its violations.
  3. A violation from a CI-critical rule, or a rule that throws, exits 1.
.noctcore/lint-meta/registry.mts
import type { IMetaRule } from '@noctcore/harness';
import {
createGithubActionsSecretNoInstallRule,
createGithubActionsSecurityNoCancelRule,
} from '@noctcore/harness/rules';
import { maxFileLines } from './rules/max-file-lines.mts';
import { readmeHasLicense } from './rules/readme-has-license.mts';
export const META_RULES: IMetaRule[] = [
createGithubActionsSecretNoInstallRule(),
createGithubActionsSecurityNoCancelRule(),
readmeHasLicense,
maxFileLines,
];

What it refuses to do

No silent pass
A timeout, a launch failure, a rule that throws, a missing file you named with a flag, a linter that could not run: each is a failure with a reason. Only a check that ran and passed is green.
No network call
The package reads what is committed and nothing else. The one download, for pinned binaries in CI, goes through a function your repo passes in.
No runtime dependency
node:* builtins only. A TypeScript registry loads through Node's own type stripping.
No scan and import
lint-meta imports exactly one registry file from a fixed list. A stray .jsbeside it is never loaded.
No hidden I/O
The pinned-tools functions take their I/O as deps, and a rule reads the repo only through thectx it is handed, so a repo tests its own wiring without spawning anything.

Two commands, three imports

  • harness checkRuns every check in .noctcore/harness.json, all of them, and exits 1 if any failed.
  • harness lint-metaRuns the whole-repo rules from your registry. harness catalog writes their table.
  • @noctcore/harnessThe rule contract, the manifest and result types, the ratchet helpers and portableFileGlob.
  • @noctcore/harness/rulesSix strict rules for the pnpm lockfile and GitHub Actions workflows.
  • @noctcore/harness/pinned-toolszizmor, actionlint and gitleaks at exactly their pinned version.