-
Notifications
You must be signed in to change notification settings - Fork 7
/
.pre-commit-config.yaml
82 lines (74 loc) · 2.1 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
exclude: ^tests/data/(expected/.+|setup.py)$
repos:
###################
# FORMATTER #
###################
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: end-of-file-fixer
- id: trailing-whitespace
- id: debug-statements
- id: fix-encoding-pragma
args: [--remove]
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
additional_dependencies:
- 'prettier@3.3.3'
exclude_types:
- 'javascript'
- 'ts'
- 'tsx'
- 'json'
- 'css'
- 'scss'
exclude: "\\.jsonc|.all-contributorsrc"
- repo: https://github.com/PyCQA/docformatter
rev: 06907d0
hooks:
- id: docformatter
additional_dependencies: [tomli]
args: [--in-place, --config, ./pyproject.toml]
###################
# LINTER #
###################
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.0
hooks:
- id: ruff
name: 'ruff sort imports'
args:
- '--fix'
- '--select=I'
alias: isort
- id: ruff-format
# Commands above are both formatters an not linters
# See also: https://github.com/astral-sh/ruff/discussions/7310#discussioncomment-7102010
- id: ruff
name: 'ruff lint'
- repo: https://github.com/biomejs/pre-commit
rev: 'v0.5.0' # Use the sha / tag you want to point at
hooks:
- id: biome-check
additional_dependencies: ['@biomejs/biome@1.9.3']
- id: biome-format
additional_dependencies: ['@biomejs/biome@1.9.3']
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
types: [file]
types_or: [python, markdown]
- repo: https://github.com/rhysd/actionlint
rev: 'v1.7.3'
hooks:
- id: actionlint