import type { IConfig } from "./intershell-config.types"; export * from "./intershell-config.types"; export const defaultConfig = { commit: { conventional: { type: { list: [ { type: "feat", label: "Features", description: "A new feature", category: "features" as const, emoji: "๐Ÿš€", badgeColor: "00D4AA", breakingAllowed: true, }, { type: "fix", label: "Bug Fixes", description: "A bug fix", category: "bugfixes" as const, emoji: "๐Ÿ›", badgeColor: "EF4444", breakingAllowed: true, }, { type: "docs", label: "Documentation", description: "Documentation only changes", category: "documentation" as const, emoji: "๐Ÿ“š", badgeColor: "646CFF", breakingAllowed: false, }, { type: "style", label: "Style", description: "Changes that do not affect the meaning of the code", category: "refactoring" as const, emoji: "๐ŸŽจ", badgeColor: "8B5CF6", breakingAllowed: false, }, { type: "refactor", label: "Refactoring", description: "A code change that neither fixes a bug nor adds a feature", category: "refactoring" as const, emoji: "๐Ÿ”ง", badgeColor: "007ACC", breakingAllowed: true, }, { type: "perf", label: "Performance", description: "A code change that improves performance", category: "refactoring" as const, emoji: "โšก", badgeColor: "60a5fa", breakingAllowed: true, }, { type: "test", label: "Testing", description: "Adding missing tests or correcting existing tests", category: "infrastructure" as const, emoji: "๐Ÿงช", badgeColor: "10B981", breakingAllowed: false, }, { type: "ci", label: "CI/CD", description: "Changes to CI configuration files and scripts", category: "infrastructure" as const, emoji: "๐Ÿ‘ท", badgeColor: "2496ED", breakingAllowed: false, }, { type: "chore", label: "Chores", description: "Other changes that don't modify src or test files", category: "other" as const, emoji: "๐Ÿ”จ", badgeColor: "495057", breakingAllowed: false, }, { type: "revert", label: "Revert", description: "Reverts a previous commit", category: "other" as const, emoji: "โช", badgeColor: "DC2626", breakingAllowed: true, }, { type: "merge", label: "Merge", description: "Merge commits (pull requests, branches)", category: "other" as const, emoji: "๐Ÿ”€", badgeColor: "6B7280", breakingAllowed: false, }, { type: "deps", label: "Dependencies", description: "Dependency updates and changes", category: "dependencies" as const, emoji: "๐Ÿ“ฆ", badgeColor: "059669", breakingAllowed: true, }, { type: "other", label: "Other", description: "Other types of changes", category: "other" as const, emoji: "โš ๏ธ", badgeColor: "6B7280", breakingAllowed: false, }, { type: "release", label: "Release", description: "Release version changes", category: "other" as const, emoji: "๐Ÿš€", badgeColor: "059669", breakingAllowed: false, }, ] as const, }, scopes: { list: [], }, description: { minLength: 3, maxLength: 72, shouldNotEndWithPeriod: true, shouldNotStartWithType: true, }, bodyLines: { minLength: 3, maxLength: 120, }, }, staged: [ { filePattern: [/coverage\/.*/, /dist\/.*/, /node_modules\/.*/, /(^|\/)\.env$/, /\.act/], description: "development files should not be manually committed", }, { filePattern: [/CHANGELOG.md/], disabled: process.env.CI === "true", description: "CHANGELOG.md should be auto-generated by 'bun run version:prepare' and 'bun run version:apply'", }, { filePattern: [/package.json/], contentPattern: [ /^[+-].*"version":\s*"[^"]+"/m, // Manual version changes ], ignore: { mode: "create" }, disabled: process.env.CI === "true", description: "package.json version should be auto-generated by 'bun run version:prepare' and 'bun run version:apply'", }, ], }, package: { selectiveVersioning: { enabled: true, description: "Enforce selective versioning based on private field", }, semanticVersioning: { enabled: true, description: "Ensure versions follow semantic versioning format", }, description: { enabled: true, description: "Require descriptions for versioned packages", }, }, branch: { defaultBranch: "main", name: { minLength: 1, maxLength: 100, allowedCharacters: /^[a-zA-Z0-9\-_/.]+$/, noConsecutiveSeparators: true, noLeadingTrailingSeparators: true, }, prefixes: [ "feature", "fix", "hotfix", "release", "docs", "refactor", "ci", "chore", "wip", "renovate", ], }, tag: { name: { enabled: true, description: "Validate tag name structure and content", minLength: 1, maxLength: 100, allowedCharacters: /^[a-zA-Z0-9\-_.]+$/, noSpaces: true, noSpecialChars: false, }, }, } as const satisfies IConfig;