forked from Uberspace/lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
66 lines (66 loc) · 1.7 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
---
# INSTALL .: `pre-commit install --overwrite --install-hooks`
# UPDATE ..: `pre-commit autoupdate`
default_language_version:
python: python3.8
exclude: '\.svg$'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
# Generall Stuff
- id: trailing-whitespace
- id: mixed-line-ending
args:
- "--fix=lf"
- id: end-of-file-fixer
# VCS
- id: check-merge-conflict
# Config / Data Files
- id: check-yaml
# Python
- id: debug-statements
- id: requirements-txt-fixer
# Prettier (HTML, JS, CSS, Markdown…)
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.3.2
hooks:
- id: prettier
# exclude HTML templates (no Jinja2 support)
exclude: 'source/_templates/.*\.html'
# YAML
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.1
hooks:
- id: yamllint
# Python: check syntax
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
args:
- "--select=F"
# Python: reorder imports
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.6.0
hooks:
- id: reorder-python-imports
args:
- "--application-directories=.:source"
- "--py38-plus"
# Python: lint with black
- repo: https://github.com/psf/black
rev: 21.7b0
hooks:
- id: black
args:
- "--line-length=88"
- "--target-version=py38"
# local hooks
- repo: local
hooks:
- id: guide-syntax
name: check guide syntax
language: script
entry: .venv/bin/python check-guides.py --check
files: source/guide_.+\.rst