/** * Git 提交信息验证器 */ interface CommitRule { pattern: RegExp; message: string; examples?: string[]; } type Language = 'js' | 'ts'; type Framework = 'none' | 'react' | 'vue' | 'svelte' | 'solid'; type Style = 'none' | 'css' | 'scss' | 'sass' | 'less' | 'stylus'; type ModuleType = 'esm' | 'cjs'; interface InstallDepsOptions { language: Language; framework: 'react' | 'vue' | 'none'; style: 'css' | 'scss' | 'less' | 'none'; useCommitLint: boolean; linter?: 'eslint' | 'biome'; } interface GenerateConfigOptions { language: Language; framework: Framework; style: Style; moduleType: ModuleType; } interface CommitConfig { rules?: CommitRule[]; types?: string[]; maxLength?: number; allowMergeCommits?: boolean; customPatterns?: RegExp[]; } interface LintConfig { eslint?: { enabled?: boolean; config?: string; ignore?: string[]; }; stylelint?: { enabled?: boolean; config?: string; ignore?: string[]; }; prettier?: { enabled?: boolean; config?: string; ignore?: string[]; }; biome?: { enabled?: boolean; config?: string; ignore?: string[]; }; } interface ProjectConfig { language?: Language; framework?: Framework; style?: Style; linter?: 'eslint' | 'biome'; platform?: 'node' | 'browser' | 'universal'; } interface LavyConfig { commit?: CommitConfig; lint?: LintConfig; project?: ProjectConfig; [key: string]: any; } /** * 定义 Lavy 配置 * 提供完整的 TypeScript 类型提示 */ declare function defineConfig(config: LavyConfig): LavyConfig; declare function generateConfigs(options: GenerateConfigOptions): Promise; declare function generateTemplate(options: { language: Language; framework: Framework; style: Style; mode?: 'force' | 'merge'; linter?: 'eslint' | 'biome'; }): Promise; export { type Framework, type GenerateConfigOptions, type InstallDepsOptions, type Language, type ModuleType, type Style, defineConfig, generateConfigs, generateTemplate };