Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
Something went wrong. Try again.
Monochromatic cli-git.config.ts
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162/** * Repository-owned cli-git policy configuration. * * @module */import { defineConfig, forbiddenStringsPlugin, markdownLintPlugin, repositoryPolicyPlugin,} from '@monochromatic-dev/git-policy-cli/ts';import type { CliGitConfig, } from '@monochromatic-dev/git-policy-cli/ts';
/** * Exact trusted repository policy configuration. * * Explicitly typed because `defineConfig` returns its inferred generic argument * type, which `isolatedDeclarations` cannot emit for the default export; see the * cli-git authoring-ergonomics issue. */const config: CliGitConfig = defineConfig({ plugins: { markdown: markdownLintPlugin, mono: repositoryPolicyPlugin, security: forbiddenStringsPlugin, }, policies: { // Rewrites Markdown image links that point at LFS-tracked files to the // LFS server's immutable object URLs inside the commit transaction, so // GitHub renders the image instead of the pointer (issue #476). The policy // runs the monochromatic-lint executable from PATH with only the // markdown/lfs-image-url rule (both are the policy's defaults); package/ssg/ // is excluded because those MDX pages resolve images through the site // build, not GitHub. 'markdown/autofix': [ 'warn', { exclude: ['package/ssg/',], }, ], 'mono/forbidden-root-context': 'error', 'security/forbidden-strings': [ 'error', { executable: './package/cli/forbidden-strings/target/release/forbidden-strings', // The betterleaks baseline ships inside the scanner binary and the // policy passes --builtin-rules; the FORBIDDEN_STRINGS_RULES scratch // file carries only the repo appendixes // (doc/decision/gitignore-negations.md). Stated explicitly (it is the // schema default) because AllowedPolicySetting checks against the // policy's resolved-options type, in which builtinRules is required. builtinRules: true, }, ], }, trust: { children: true, },},);
export default config;