UNPKG

@felixgeelhaar/cclint

Version:

A comprehensive linter for CLAUDE.md files with multi-language code block validation

38 lines 1.63 kB
import { Command } from 'commander'; export const installCommand = new Command('install') .description('Install git hooks for automatic linting and quality checks') .option('--hooks', 'Install pre-commit git hooks', true) .option('--pre-push', 'Install pre-push quality check hooks', true) .action(async (options) => { try { if (options.hooks) { console.log('📦 Installing cclint pre-commit hooks...'); const { installHook } = // @ts-expect-error: TS7016 - No declaration file for JS module await import('../../../scripts/install-hooks.js'); await installHook(); console.log('✅ Pre-commit hooks installed successfully!'); console.log(''); console.log('Your CLAUDE.md files will now be automatically linted before each commit.'); console.log('To skip the check for a specific commit, use: git commit --no-verify'); console.log(''); } if (options.prePush) { console.log('📦 Installing pre-push quality check hooks...'); const { installPrePushHook } = // @ts-expect-error: TS7016 - No declaration file for JS module await import('../../../scripts/install-pre-push-hook.js'); await installPrePushHook(); } } catch (error) { if (error instanceof Error) { console.error(`Error: ${error.message}`); } else { console.error('Error: Unknown error occurred'); } process.exit(1); } }); //# sourceMappingURL=install.js.map