From c2ff93a566b1a6ab003bb080d779c6eb0648e565 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Mon, 27 May 2024 08:23:40 +0300 Subject: [PATCH] add pre-commit configuration --- .gitignore | 2 +- .pre-commit-config.yaml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .pre-commit-config.yaml diff --git a/.gitignore b/.gitignore index 5c0062f..00f3ba4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,6 @@ !.editorconfig !.gitattributes !.gitignore - +!.pre-commit-config.yaml _site/ Gemfile.lock diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..69f085f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,32 @@ +ci: + autoupdate_schedule: quarterly + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + args: ["--markdown-linebreak-ext", "md,markdown"] + exclude_types: [svg, tsv] + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - id: check-case-conflict + - id: check-json + - id: fix-byte-order-marker + - id: check-merge-conflict + - id: mixed-line-ending + args: [--fix=auto] + - id: pretty-format-json + args: [--autofix, --no-ensure-ascii] + + - repo: https://github.com/thlorenz/doctoc + rev: v2.2.0 + hooks: + - id: doctoc + args: [--update-only, --notitle] + + - repo: https://github.com/rbubley/mirrors-prettier + rev: "v3.2.5" + hooks: + - id: prettier