pre-commit

Air can be used as a pre-commit hook through posit-dev/air-pre-commit.

In your .pre-commit-config.yaml:

- repo: https://github.com/posit-dev/air-pre-commit
  # Air version
  rev: 0.8.2
  hooks:
    # Run the formatter
    - id: air-format
Only Air ≥0.8.2 can be pinned as a rev, see air-pre-commit’s releases for the full list of release tags that you can pin to.