-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
49 lines (46 loc) · 1.41 KB
/
.pre-commit-config.yaml
File metadata and controls
49 lines (46 loc) · 1.41 KB
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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
args: ["--maxkb=1024"]
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
types_or: [yaml, json, ts]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7
hooks:
- id: ruff
name: ruff (lint)
args:
- --respect-gitignore
# NOTE: Whilst ruff CAN fix most of its lints, we will for now just let problems error out.
# That might be a bit annoying, but we probably will learn a lot about python. :)
# - --fix
# - --unfixable=F401 # https://docs.astral.sh/ruff/rules/unused-import/
- --ignore=I # happens later down the line
- --config=ruff.toml
- id: ruff
name: ruff (sort imports)
args:
- --respect-gitignore
- --fix
- --select=I
- --config=ruff.toml
- id: ruff-format
name: ruff (format files)
types_or: [python, pyi, jupyter]
args:
- --respect-gitignore
- --config=ruff.toml
# - repo: https://github.com/kynan/nbstripout
# rev: 0.6.1
# hooks:
# - id: nbstripout