-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskfile.yml
More file actions
82 lines (69 loc) · 2 KB
/
taskfile.yml
File metadata and controls
82 lines (69 loc) · 2 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
74
75
76
77
78
79
80
81
82
version: "3"
# Scope notes:
# - Shell and Python linters target `hooks/*.sh` and `hooks/*.py` only,
# because hooks/ is the only location that holds authored .sh / .py files
# in this repo (all other .sh / .py under ~/.claude/ is runtime-generated
# or belongs to plugins and is gitignored).
# - Markdown formatting spans the whole repo via prettier, honoring .gitignore.
# - JSON formatting targets top-level *.json only (settings.json, biome.json).
# - If .sh, .py, .go, or .ts files are ever added outside hooks/, extend the
# corresponding task's glob rather than relying on implicit scope.
tasks:
default:
desc: Format and lint all files
cmds:
- task: format
- task: lint
format:
desc: Format all files
cmds:
- task: format:md
- task: format:json
- task: format:sh
- task: format:py
lint:
desc: Lint all files
cmds:
- task: lint:md
- task: lint:json
- task: lint:sh
- task: lint:py
check:
desc: Check formatting without writing (CI-safe)
cmds:
- task: lint:md
- task: lint:json
- task: lint:sh
- task: lint:py
format:md:
desc: Format markdown files with prettier
cmds:
- bunx prettier --write "**/*.md" --ignore-path=.gitignore
format:json:
desc: Format JSON files with biome
cmds:
- bunx biome format --write ./*.json --config-path=.
format:sh:
desc: Format shell scripts with shfmt
cmds:
- shfmt -w hooks/*.sh
format:py:
desc: Format Python files with ruff
cmds:
- uvx ruff format hooks/*.py
lint:md:
desc: Check markdown formatting with prettier
cmds:
- bunx prettier --check "**/*.md" --ignore-path=.gitignore
lint:json:
desc: Lint JSON files with biome
cmds:
- bunx biome check ./*.json --config-path=.
lint:sh:
desc: Lint shell scripts with shellcheck
cmds:
- shellcheck hooks/*.sh
lint:py:
desc: Lint Python files with ruff
cmds:
- uvx ruff check hooks/*.py