Skip to content

ExactScripts

const ExactScripts: FilePolicyDefinition<ExactScriptsConfig | undefined> & object

Defined in: policies/ExactScripts.ts:125

A policy that validates scripts exist AND have exact content in package.json.

requiresConfig: true

Use this policy when you want to enforce exact script content, not just presence. This is useful for scripts that must be exactly the same across packages.

For scripts where you only care about presence (not content), use RequiredScripts instead.

import { makePolicy } from "repopo";
import { ExactScripts } from "repopo/policies";
makePolicy(ExactScripts, { config: {
scripts: {
clean: "rimraf dist esm",
format: "biome format --write .",
lint: "biome lint .",
},
} })