-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
88 lines (86 loc) · 2.82 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
# Common commands:
# pre-commit install
# pre-commit autoupdate
# pre-commit run --all-files mdformat
# pre-commit run --all-files --hook-stage commit
# pre-commit run --all-files --hook-stage push
# poetry run calcipy lint.pre-commit --no-update
#
# See https://pre-commit.com for more information
# and https://pre-commit.com/hooks.html for more hooks
# Only commit is installed by default: https://pre-commit.com/#pre-commit-install
# Pending rename of pre-push from: https://github.com/pre-commit/pre-commit/issues/2732
default_install_hook_types: ["commit-msg", "pre-commit", "pre-push"]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
args: [--unsafe]
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: double-quote-string-fixer
- id: end-of-file-fixer
exclude: \.copier-answers\.yml|__snapshots__/.*\.ambr
- id: fix-byte-order-marker
- id: fix-encoding-pragma
args: [--remove]
- id: forbid-new-submodules
- id: mixed-line-ending
args: [--fix=auto]
- id: trailing-whitespace
exclude: __snapshots__/.*\.ambr
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.29.1
hooks:
- id: commitizen
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
- id: mdformat
additional_dependencies:
- "mdformat-mkdocs[recommended]>=3.0.0"
- "mdformat-gfm-alerts>=1.0.1"
args: [--wrap=no]
exclude: _.+\.md|CHANGELOG\.md|CODE_TAG_SUMMARY\.md
stages: ["pre-commit"]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: [--severity=warning]
stages: ["pre-commit"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
additional_dependencies:
# Note: this version must be the same as the hook revision
- "prettier-plugin-sh"
exclude: \.copier-answers\.yml|tests/.*/cassettes/.*\.yaml|__snapshots__/.*\.json
types_or: [html, javascript, json, shell, yaml]
stages: ["pre-commit"]
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort-fix
exclude: poetry\.lock
stages: ["pre-commit"]
- repo: https://github.com/KyleKing/calcipy
rev: 4.0.0
hooks:
- id: copier-forbidden-files
- id: lint-fix
stages: ["pre-commit"]
- id: tags
stages: ["pre-push"]