From e0a9a06c77d307a57269135c2e203a808794fecb Mon Sep 17 00:00:00 2001 From: John Bampton Date: Wed, 16 Oct 2024 03:55:58 +1000 Subject: [PATCH] Add `pre-commit` hook `pretty-format-json` https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#pretty-format-json From the official pre-commit team a minor feature to add. We have one JSON file at `.github/linters/mlc_config.json`. --- .pre-commit-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ec071da8d..aee58395f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,6 +18,8 @@ repos: - id: check-executables-have-shebangs exclude: ^test/t/lang\.rb$ - id: check-illegal-windows-names + - id: pretty-format-json + args: [--autofix, --no-sort-keys] - id: check-json - id: check-merge-conflict - id: check-shebang-scripts-are-executable