-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
51 lines (48 loc) · 1.37 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
default_language_version:
python: python3.11.5
node: "22.11.0"
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.1.0
hooks:
- id: prettier
types_or: [css, javascript]
additional_dependencies:
- '@prettier/[email protected]'
args:
- "--write"
- "--ignore-path=ui/.prettierignore"
files: ^ui/
# General hooks for code hygiene
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
exclude: /README\.rst$|\.pot?$|^ui/
- id: end-of-file-fixer
exclude: /README\.rst$|\.pot?$|^ui/
- id: debug-statements
exclude: ^ui/
- id: fix-encoding-pragma
args: ["--remove"]
exclude: ^ui/
- id: check-case-conflict
- id: check-docstring-first
exclude: ^ui/
- id: check-executables-have-shebangs
- id: check-merge-conflict
exclude: /README\.rst$|^docs/.*\.rst$|^ui/
- id: check-symlinks
- id: mixed-line-ending
args: ["--fix=lf"]
exclude: ^ui/
# Ruff for Python in the `api` directory
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
files: ^api/
- id: ruff-format
files: ^api/