1
Fork 0
mirror of https://github.com/RGBCube/alejandra synced 2026-01-14 09:11:05 +00:00
alejandra/integrations/pre-commit
2023-01-15 12:44:19 -08:00
..
README.md feat: pre-commit hook with no prerequisites 2023-01-15 12:44:19 -08:00

Pre-Commit integration

In order to use Alejandra with Pre-Commit just create a file named .pre-commit-config.yaml with contents:

repos:
  - repo: https://github.com/kamadorueda/alejandra
    rev: 3.0.0
    # Choose either the 'alejandra' or 'alejandra-system' hook
    # depending on what pre-requisites you have:
    hooks:
      # No prerequisites
      - id: alejandra

      # Requires Nix to be previously installed in the system
      - id: alejandra-nix

      # Requires Alejandra to be previously installed in the system
      - id: alejandra-system