This repository has been archived by the owner on Aug 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
/
.pre-commit-config.yaml
93 lines (83 loc) · 2.81 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
89
90
91
92
93
# This file is being synced from WordPress/openverse. Any changes made to it
# here will be overwritten. Please make any necessary edits to these files:
# - https://github.com/WordPress/openverse/blob/main/templates/.pre-commit-config.yaml.jinja
exclude: Pipfile\.lock|migrations|\.idea|node_modules|archive|retired
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-executables-have-shebangs
- id: check-json
exclude: tsconfig.json # contains comments
- id: check-case-conflict
- id: check-toml
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
- id: end-of-file-fixer
exclude: frontend/test/tapes/.+\.json5
- id: check-symlinks
- id: mixed-line-ending
- id: fix-encoding-pragma
args:
- --remove
- id: check-docstring-first
- id: requirements-txt-fixer
# Use the `.isort.cfg` file to configure additional project-specific requirements.
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
files: \.py$
exclude: ^build/.*$|^.tox/.*$|^venv/.*$
args:
- --profile=black
- --lines-after-imports=2
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args:
- --py310-plus
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.261"
hooks:
- id: ruff
- repo: https://github.com/ambv/black
rev: 23.3.0
hooks:
- id: black
args:
- --safe
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
args:
- --convention=pep257
# Additional ignore reasons:
# D1xx: we do not want to force contributors to write redundant or useless docstrings
# D202: additional whitespace helps with readability
# D205: we don't want to always require a single line summary
# D211: same as D202
# D400: first line doesn't need to end in a period
# See the following documentation for what each rule does:
# https://www.pydocstyle.org/en/6.2.3/error_codes.html#error-codes
- --add-ignore=D1,D202,D205,D211,D400
# Use the `.prettierignore` and `.prettier.config.js` files to configure project-specific requirements.
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.0
hooks:
- id: prettier
additional_dependencies:
- prettier@2.6.0
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.9.0
hooks:
- id: shellcheck
- repo: https://github.com/rhysd/actionlint
rev: v1.6.24
hooks:
- id: actionlint-docker