-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
151 lines (127 loc) · 3.3 KB
/
Taskfile.yml
File metadata and controls
151 lines (127 loc) · 3.3 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
version: "3"
tasks:
default:
desc: Show available tasks
cmds:
- task --list
# === Development ===
# Note: --config tauri.dev.conf.json works around Tauri v2 bug where dev mode
# uses frontendDist instead of devUrl. See: https://github.com/tauri-apps/tauri/issues/9629
dev:
desc: Start Tauri dev mode (uses production API)
cmds:
- cargo tauri dev --config src-tauri/tauri.dev.conf.json
dev:local:
desc: Start Tauri dev mode (uses localhost:5173 API)
cmds:
- cargo tauri dev --config src-tauri/tauri.dev.conf.json --features desktop,dev-server
build:
desc: Build for production (points to chattomap.com)
cmds:
- cargo tauri build
build:local:
desc: Build release with localhost API (for testing)
cmds:
- cargo tauri build --features desktop,dev-server
# === Quality Checks (run before marking any task complete) ===
ci:
desc: Run all CI checks
cmds:
- task: typecheck
- task: lint
- task: lint:rust
- task: check-ignores
- task: duplication
- task: file-length
- task: test
# === TypeScript/JS Linting ===
lint:
desc: Run Biome linter (check only)
cmds:
- bunx biome check .
lint:fix:
desc: Run Biome linter and auto-fix issues
cmds:
- bunx biome check --write .
format:
desc: Format TypeScript/JS code with Biome
cmds:
- bunx biome format --write .
typecheck:
desc: TypeScript type checking
cmds:
- bunx tsc --noEmit
# === Rust Linting ===
lint:rust:
desc: Run Clippy (Rust linter)
dir: src-tauri
cmds:
- cargo clippy --all-targets --all-features -- -D warnings
format:rust:
desc: Format Rust code
dir: src-tauri
cmds:
- cargo fmt
format:rust:check:
desc: Check Rust formatting
dir: src-tauri
cmds:
- cargo fmt -- --check
# === Code Quality ===
duplication:
desc: Check for code duplication (TypeScript)
cmds:
- bunx jscpd src/
file-length:
desc: Check file length limits
cmds:
- ./scripts/check_file_length.sh
check-ignores:
desc: Check for biome-ignore comments (zero tolerance)
cmds:
- |
if grep -r "biome-ignore" --include="*.ts" --include="*.tsx" --include="*.js" src/ 2>/dev/null; then
echo "❌ Found biome-ignore comments - these are forbidden!"
exit 1
fi
echo "✅ No biome-ignore comments found"
# === Testing ===
test:
desc: Run all tests
cmds:
- task: test:rust
- task: test:ts
test:rust:
desc: Run Rust tests
dir: src-tauri
cmds:
- cargo test
test:ts:
desc: Run TypeScript tests
cmds:
- bunx vitest run
test:watch:
desc: Run TypeScript tests in watch mode
cmds:
- bunx vitest
# === Git Hooks ===
hooks:install:
desc: Install git hooks with lefthook
cmds:
- bunx lefthook install
hooks:run:
desc: Run pre-commit hooks manually
cmds:
- bunx lefthook run pre-commit
# === Utilities ===
clean:
desc: Clean build artifacts
cmds:
- rm -rf target dist node_modules/.cache
- cd src-tauri && cargo clean
deps:update:
desc: Update all dependencies
cmds:
- cd src-tauri && cargo update
- bunx npm-check-updates -u
- bun install