From 8dae6cbbe8abd505009208b043ea79f33b94af17 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Wed, 7 Feb 2024 04:13:38 -0500 Subject: [PATCH] Add precommit for formatting --- .pre-commit-config.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..4f33e8f2c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,24 @@ +ci: + skip: + - julia-formatter + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - repo: https://github.com/domluna/JuliaFormatter.jl + rev: v1.0.45 + hooks: + - id: julia-formatter + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.1.0 + # We only want to format yaml, md files + hooks: + - id: prettier + types_or: + - yaml + - markdown