-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
46 lines (43 loc) · 1.34 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
exclude: '^node_modules'
default_stages: [commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: check-toml
# - id: check-yaml # initial issue with pnpm
# Other that could be switched on, keeping simple
# - id: check-json
# - id: check-xml
# - id: debug-statements
# - id: check-builtin-literals
- id: check-case-conflict
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: detect-private-key
- id: mixed-line-ending
- id: sort-simple-yaml
- id: check-shebang-scripts-are-executable
- id: check-case-conflict
# - id: check-ast # python specific
- id: check-symlinks
# A prettier workaround using the local `prettier` config.
# Requires a local `pnpm` install
- repo: local
hooks:
- id: prettier-format
name: prettier-format
language: system
entry: >
bash -c 'pnpm --filter="!*monorepo" format'
- id: cargo-format
name: cargo-format
language: system
entry: >
bash -c 'cd packages/create-web/template/rust_backend && cargo fmt'
# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date
ci:
autoupdate_schedule: weekly
submodules: false