diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..ca82f27 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,28 @@ +ci: + autoupdate_schedule: monthly + +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: check-merge-conflict + - id: check-added-large-files + args: ['--maxkb=2000'] + +# Run ruff to lint and format +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.6.1 + hooks: + # Run the linter. + - id: ruff + args: [--fix] + # Run the formatter. + - id: ruff-format + +# Do YAML formatting (before the linter checks it for misses) +- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks + rev: v2.14.0 + hooks: + - id: pretty-format-yaml + args: [--autofix, --indent, '2', --preserve-quotes]