-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
.pre-commit-config.yaml
60 lines (59 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
59
60
ci:
autoupdate_schedule: monthly
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
hooks:
- id: ruff
args:
- "--fix"
exclude_types:
- jupyter
- id: ruff
name: ruff (notebooks)
args:
- "--fix"
types:
- jupyter
- id: ruff-format
# run via nbqa to handle cell magics
exclude_types:
- jupyter
# run ruff via nbqa, which has better and configurable handling of cell magics
# than ruff itself
# but has trouble with isort rules
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.0
hooks:
- id: nbqa-ruff-format
- id: nbqa-ruff-check
args:
- --fix
# isort rules get confused in the temporary files
- --ignore=I
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: requirements-txt-fixer
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.14.0
hooks:
- id: eslint
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
exclude: ipyparallel/nbextension/.*
types: [file]
additional_dependencies:
- "@typescript-eslint/[email protected]"
- "@typescript-eslint/[email protected]"
- eslint@^6.0.0