Skip to content

RepopoConfig

Defined in: config.ts:16

Repository-wide policy configuration, exported as the default from repopo.config.*.

optional excludeFiles?: (string | RegExp)[]

Defined in: config.ts:46

An array of strings/regular expressions. File paths that match any of these expressions will be completely excluded from all policies. Strings are case-insensitive regular expressions, not globs. RegExp values retain their explicit flags.


optional policies?: (ConfiguredPolicy<any> | PolicyInstance<any>)[]

Defined in: config.ts:38

An array of configured policies that are enabled.

Use the policy() function to configure policies before adding them to this array.

import { policy, type RepopoConfig } from "repopo";
import { NoJsFileExtensions, PackageJsonProperties } from "repopo/policies";
const config: RepopoConfig = {
policies: [
policy(NoJsFileExtensions, undefined, { exclude: ["^bin/"] }),
policy(PackageJsonProperties, { verbatim: { license: "MIT" } }),
],
};

See DefaultPolicies for the policies that will be enabled by default if this is undefined.