add pre-commit configuration

This commit is contained in:
Aminda Suomalainen ⚧ 2024-05-27 08:23:40 +03:00
parent 2a29052e9a
commit c2ff93a566
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
2 changed files with 33 additions and 1 deletions

2
.gitignore vendored
View File

@ -2,6 +2,6 @@
!.editorconfig !.editorconfig
!.gitattributes !.gitattributes
!.gitignore !.gitignore
!.pre-commit-config.yaml
_site/ _site/
Gemfile.lock Gemfile.lock

32
.pre-commit-config.yaml Normal file
View File

@ -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