forked from 302ai/302-AI-Studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
73 lines (67 loc) · 2.17 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
73 lines (67 loc) · 2.17 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
68
69
70
71
72
73
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude: "pnpm-lock.yaml"
- id: check-yaml
exclude: "pnpm-lock.yaml"
- id: check-json
- id: check-merge-conflict
- id: end-of-file-fixer
- repo: local
hooks:
# Complete quality check (equivalent to `pnpm quality`)
- id: quality-check
name: quality-check (check + lint + format:check)
entry: bash -c 'pnpm exec svelte-kit sync && pnpm exec svelte-check --tsconfig ./tsconfig.json && pnpm exec eslint . && pnpm exec prettier --check .'
language: system
pass_filenames: false
always_run: true
# Individual hooks for incremental checks
- id: svelte-check
name: svelte-check
entry: bash -c 'pnpm exec svelte-kit sync && pnpm exec svelte-check --tsconfig ./tsconfig.json'
language: system
pass_filenames: false
files: \.(svelte|ts)$
- id: prettier
name: prettier
entry: bash -c 'pnpm exec prettier --write "$@"' --
language: system
files: \.(js|ts|svelte|json|yaml|yml|html|css|scss)$
exclude: '^(pnpm-lock\.yaml|src/lib/paraglide/.*|src/routes/demo/.*|\.svelte-kit/.*|build/.*|node_modules/.*)$'
- id: eslint
name: eslint
entry: bash -c 'pnpm exec eslint --fix "$@"' --
language: system
files: \.(js|ts|svelte)$
exclude: '^(src/lib/paraglide/.*|\.svelte-kit/.*|build/.*|node_modules/.*)$'
# - id: sort-messages
# name: sort-messages
# entry: node scripts/sort-messages.js
# language: system
# files: ^messages/.*\.json$
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.2.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args:
[
--strict,
--force-scope,
feat,
fix,
docs,
style,
refactor,
test,
chore,
perf,
ci,
build,
revert,
merge,
]
exclude: '^Merge\s'