# Generated by gimme-the-lint # Pre-commit hooks for code quality # Install: pip install pre-commit # Setup: pre-commit install && pre-commit install --hook-type commit-msg repos: # General file checks - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-json - id: check-added-large-files args: ['--maxkb=1000'] - id: check-merge-conflict - id: check-case-conflict - id: detect-private-key - id: mixed-line-ending # Python formatting and linting - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.1.9 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] types_or: [python, pyi] - id: ruff-format types_or: [python, pyi] # JavaScript/TypeScript formatting - repo: https://github.com/pre-commit/mirrors-prettier rev: v3.1.0 hooks: - id: prettier types_or: [javascript, jsx, ts, tsx, json, yaml, markdown] # Secrets detection - repo: https://github.com/gitleaks/gitleaks rev: v8.18.1 hooks: - id: gitleaks # Commit message linting - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook rev: v9.11.0 hooks: - id: commitlint stages: [commit-msg] additional_dependencies: ['@commitlint/config-conventional']