# .pre-commit-config.yaml repos: # Default pre-commit hooks - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 # Use the latest stable version hooks: - id: fix-byte-order-marker - id: check-case-conflict - id: check-symlinks - id: debug-statements - id: end-of-file-fixer # Ensures files end with a newline - id: trailing-whitespace # Removes trailing whitespace - id: mixed-line-ending # Converts mixed line endings to LF args: ["--fix=lf"] # Set line endings to LF (Unix-style) - id: check-added-large-files # Warns on large files being committed args: ["--maxkb=500"] # Adjust the size limit as needed - id: check-merge-conflict # Prevents unresolved merge conflicts - id: check-executables-have-shebangs - id: requirements-txt-fixer # Ruff for linting, formatting, and import sorting - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.8.4 hooks: - id: ruff args: ["--fix"] # Prettier for JSON, YAML, Markdown formatting - repo: https://github.com/pre-commit/mirrors-prettier rev: v4.0.0-alpha.8 hooks: - id: prettier additional_dependencies: ["prettier@3.0.0"] # Detect secrets in code - repo: https://github.com/Yelp/detect-secrets rev: v1.5.0 hooks: - id: detect-secrets name: Detect secrets description: Detects high entropy strings that are likely to be passwords. default_stages: [pre-commit]