/** * Policy settings for the PackageReadme repo policy. * * @alpha */ export interface PackageReadmeSettings { /** * Whether to skip validation for private packages. * * @defaultValue true * * @remarks * * Private packages are typically not published and may not need a README file. * Set to `false` to require README files for all packages. */ skipPrivate?: boolean; /** * Whether to require the README title to match the package name. * * @defaultValue true * * @remarks * * When enabled, the first line of the README must be `# package-name`. * This ensures consistency and helps users identify the package. */ requireMatchingTitle?: boolean; /** * A string that must appear in the README content. * * @remarks * * Useful for ensuring all READMEs include required content like trademark * notices, disclaimers, or standard documentation sections. * * @example * ```typescript * requiredContent: "## Trademark" * ``` */ requiredContent?: string; } /** * A repo policy that ensures each package has a README.md file with proper content. * * @remarks * * This policy validates that packages have documentation and can enforce: * 1. README.md file exists * 2. README title matches the package name * 3. README contains required content (e.g., trademark notices) * * The policy supports auto-fixing by creating a basic README with the package name as title. * * @example * ```typescript * import { makePolicy } from "repopo"; * import { PackageReadme } from "repopo/policies"; * * const config: RepopoConfig = { * policies: [ * // Basic README validation * makePolicy(PackageReadme), * * // Require trademark notice in all READMEs * makePolicy(PackageReadme, { * requiredContent: "## Trademark", * }), * ], * }; * ``` * * @alpha */ export declare const PackageReadme: import("../policy.js").PolicyShape; //# sourceMappingURL=PackageReadme.d.ts.map