-
Notifications
You must be signed in to change notification settings - Fork 8
/
.pre-commit-config.yaml
50 lines (44 loc) · 1.24 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
ci:
skip: [sync]
minimum_pre_commit_version: 2.15.0
repos:
# sync (use this repo code)
- repo: local
hooks:
- id: sync
name: sync with poetry
entry: poetry run swp
language: system
# need to be explicit with `files`, since we are not using the .pre-commit-hooks.yaml here
files: poetry.lock
# general checks (see here: https://pre-commit.com/hooks.html)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-json
exclude: .vscode
- id: check-case-conflict
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- id: check-toml
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
args:
- --fix
- id: ruff-format
# mypy - lint-like type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
hooks:
- id: mypy
additional_dependencies: [types-pyyaml==6.0.1]
# prettier - formatting JS, CSS, JSON, Markdown, ...
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier