-
Notifications
You must be signed in to change notification settings - Fork 9
/
.pre-commit-config.yaml
38 lines (35 loc) · 1.01 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
exclude: (svg|icomoon|rapidoc-9.3.4.min.js)
- id: trailing-whitespace
exclude: (vendor|rapidoc-9.3.4.min.js)
- id: no-commit-to-branch
name: "don't commit to master"
args: [--branch, master]
- repo: local
hooks:
- id: app-prettier
name: run prettier
language: system
files: ^.*$
types_or: [javascript, json]
entry: |
bash -c 'npm --prefix . run fix:prettier --write "${@}"' --
- id: app-ruff-check
name: run ruff check
language: system
files: ^.*$
types_or: [python]
entry: |
bash -c 'npm --prefix . run fix:ruff:check "${@}"' --
- id: app-ruff-format
name: run ruff format
language: system
files: ^.*$
types_or: [python]
entry: |
bash -c 'npm --prefix . run fix:ruff:format "${@}"' --