-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
67 lines (60 loc) · 2.33 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
67 lines (60 loc) · 2.33 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-json
- id: check-added-large-files
- id: check-merge-conflict
- id: check-case-conflict
- id: check-docstring-first
- id: debug-statements
- id: check-ast
- id: name-tests-test
args: [--pytest-test-first]
exclude: ^tests/.*/fixtures/
- repo: local
hooks:
- id: quality-checks
name: Backend lint and checks
entry: scripts/lint-backend.sh --check
language: system
files: ^(cueweaver/|tests/|pyproject\.toml$|uv\.lock$|vulture_whitelist\.py$|scripts/lint-backend\.sh$)
pass_filenames: false
- id: markdown-lint
name: Markdown lint
entry: uv run pymarkdown -d MD013,MD036 scan -r AGENTS.md CONTEXT.md README.md docs
language: system
types: [markdown]
files: ^(AGENTS\.md|CONTEXT\.md|README\.md|docs/)
pass_filenames: false
- id: unit-tests
name: Backend tests
entry: scripts/test-backend.sh
language: system
files: ^(cueweaver/|tests/|pyproject\.toml$|uv\.lock$|scripts/test-backend\.sh$)
pass_filenames: false
- id: web-checks
name: Frontend lint and checks
entry: scripts/lint-frontend.sh --check
language: system
files: ^(web/(src/|tests/|package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|\.prettierignore$|\.prettierrc\.json$|eslint\.config\.js$|.*\.(json|js|ts|tsx|css|html)$)|scripts/lint-frontend\.sh$)
pass_filenames: false
- id: web-unit-tests
name: Frontend unit tests
entry: scripts/test-frontend.sh
language: system
files: ^(web/(src/|tests/|package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|vite\.config\.ts$)|scripts/test-frontend\.sh$)
pass_filenames: false
- id: duplication
name: Duplication check
entry: pnpm --dir web exec jscpd --config ../.jscpd.json ..
language: system
files: ^(cueweaver/|tests/|web/src/|web/tests/|\.jscpd\.json$|web/package\.json$|web/pnpm-lock\.yaml$)
pass_filenames: false
default_stages: [pre-commit]
fail_fast: false