# Pre-commit configuration # Copy to your project as .pre-commit-config.yaml # See https://pre-commit.com for more information repos: # ============================================================================= # General # ============================================================================= - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-json - id: check-toml - id: check-added-large-files args: [--maxkb=1000] - id: check-merge-conflict - id: detect-private-key # ============================================================================= # Python (uncomment if using Python) # ============================================================================= # - repo: https://github.com/astral-sh/ruff-pre-commit # rev: v0.16.6 # hooks: # - id: ruff-check # args: [--fix] # - id: ruff-format # # - repo: https://github.com/pre-commit/mirrors-mypy # rev: v2.3.1 # hooks: # - id: mypy # args: [--strict] # ============================================================================= # Ruby (uncomment if using Ruby) # ============================================================================= # StandardRB ships no .pre-commit-hooks.yaml, so it cannot be used as a # remote hook repository. Run it as a local hook against the version pinned # in your Gemfile and Gemfile.lock: # # # Gemfile # group :development, :test do # gem "standard", "1.56.0" # end # # - repo: local # hooks: # - id: standardrb # name: standardrb # entry: bundle exec standardrb --fix # language: system # types: [ruby] # require_serial: true # ============================================================================= # Go (uncomment if using Go) # ============================================================================= # - repo: https://github.com/golangci/golangci-lint # rev: v1.62.0 # hooks: # - id: golangci-lint # ============================================================================= # Rust (uncomment if using Rust) # ============================================================================= # - repo: local # hooks: # - id: cargo-fmt # name: cargo fmt # entry: cargo fmt -- # language: system # types: [rust] # pass_filenames: false # - id: cargo-clippy # name: cargo clippy # entry: cargo clippy --all-targets --all-features -- -D warnings # language: system # types: [rust] # pass_filenames: false # ============================================================================= # TypeScript/JavaScript (uncomment if using) # ============================================================================= # - repo: https://github.com/biomejs/pre-commit # rev: v2.5.12 # hooks: # - id: biome-check # ============================================================================= # Shell # ============================================================================= - repo: https://github.com/shellcheck-py/shellcheck-py rev: v0.11.0.1 hooks: - id: shellcheck - repo: https://github.com/scop/pre-commit-shfmt rev: v3.12.0-2 hooks: - id: shfmt args: [-i, "2", -ci, -bn] # ============================================================================= # Markdown and Prose # ============================================================================= # Crefft prose rules (uncomment after adding .vale.ini and running # `vale --no-global sync`; see configs/vale/README.md). # - repo: https://github.com/vale-cli/vale # rev: v3.24.0 # hooks: # - id: vale # args: [--no-global] # types: [markdown] # - repo: https://github.com/pre-commit/mirrors-prettier rev: v4.0.0-alpha.8 hooks: - id: prettier types_or: [yaml, json, markdown] - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.46.0 hooks: - id: markdownlint args: [--disable, MD013, MD033, MD041, --] # ============================================================================= # SQL (uncomment if using SQL) # ============================================================================= # - repo: https://github.com/sqlfluff/sqlfluff # rev: 3.5.0 # hooks: # - id: sqlfluff-lint # args: [--dialect, postgres] # - id: sqlfluff-fix # args: [--dialect, postgres] # # - repo: https://github.com/sbdchd/squawk # rev: v2.64.0 # hooks: # - id: squawk # files: ^migrations/.*\.sql$ # ============================================================================= # Security # ============================================================================= - repo: https://github.com/gitleaks/gitleaks rev: v8.30.0 hooks: - id: gitleaks # ============================================================================= # Docker (uncomment if using Docker) # ============================================================================= # - repo: https://github.com/hadolint/hadolint # rev: v2.14.0 # hooks: # - id: hadolint