-
Notifications
You must be signed in to change notification settings - Fork 275
/
.pre-commit-config.yaml
58 lines (58 loc) · 1.66 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-xml
- id: check-json
- id: check-yaml
- id: check-toml
- id: debug-statements
- id: check-executables-have-shebangs
- id: check-case-conflict
- id: check-added-large-files
- id: detect-private-key
# Formatter for Json and Yaml files
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode
hooks:
- id: prettier
types: [json, yaml, toml]
# Formatter for markdown files
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
hooks:
- id: mdformat
args: ["--number"]
additional_dependencies:
- mdformat-gfm
- mdformat-tables
- mdformat-frontmatter
- mdformat-black
- mdformat-shfmt
# An extremely fast Python linter, written in Rust
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.263"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Python code formatter
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
args: ["--config", "pyproject.toml"]
# Python's import formatter
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
# Formats docstrings to follow PEP 257
- repo: https://github.com/PyCQA/docformatter
rev: v1.6.4
hooks:
- id: docformatter
additional_dependencies: [tomli]
args: ["--in-place", "--config", "pyproject.toml"]