Skip to content

Commit b3bc4c9

Browse files
docs: correct lint, format, and test commands in AGENTS.md and development.md
Replace outdated ESLint/Prettier/npm references with actual toolchain: deno lint, deno fmt, deno install, cargo nextest. Add dedicated "Linting, Formatting, and Testing" section to AGENTS.md with both Task runner and direct commands. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9a8ce15 commit b3bc4c9

3 files changed

Lines changed: 54 additions & 11 deletions

File tree

AGENTS.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,47 @@ The queue store (`app/frontend/js/stores/queue.js`) maintains tracks in **play o
7272

7373
**Now Playing view**: Always displays tracks in the order they will play (current track first, then upcoming).
7474

75+
## Linting, Formatting, and Testing
76+
77+
All commands use Taskfile. Run `task --list` for full list.
78+
79+
### Task Runner (preferred)
80+
81+
```bash
82+
task lint # Run all linters (Rust + JS)
83+
task format # Run all formatters (Rust + JS)
84+
task test # Run all tests (Rust + JS unit)
85+
task test:e2e # Run Playwright E2E tests
86+
task pre-commit # Run pre-commit hooks
87+
```
88+
89+
### Direct Commands
90+
91+
**Frontend** (uses Deno toolchain, not ESLint/Prettier):
92+
93+
```bash
94+
deno lint # Lint JS/TS
95+
deno fmt # Format JS/TS
96+
deno fmt --check # Check formatting without changes
97+
cd app/frontend && npx vitest run # Unit/property tests (Vitest via Node)
98+
cd app/frontend && npx playwright test # E2E tests
99+
```
100+
101+
**Backend** (Rust):
102+
103+
```bash
104+
cargo clippy --workspace # Lint
105+
cargo fmt --all # Format
106+
cargo nextest run --workspace # Tests (falls back to cargo test)
107+
cargo check --manifest-path src-tauri/Cargo.toml # Fast type check (no binary)
108+
```
109+
110+
### When to Run
111+
112+
- **Before committing**: `task lint && task format`
113+
- **After changing frontend code**: `cd app/frontend && npx vitest run`
114+
- **After changing Rust code**: `cargo nextest run --workspace`
115+
75116
## Implementation Notes
76117

77118
1. **Components**: Modular, single-responsibility. Use Alpine.js for interactivity, basecoat/Tailwind for styling.

deno.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/development.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,25 +78,26 @@ When running `task build`, the following happens automatically:
7878

7979
```bash
8080
# Install dependencies
81-
npm install # Frontend dependencies
82-
cargo build # Rust backend dependencies
81+
deno install --node-modules-dir=auto --frozen # Frontend (8x faster than npm ci)
82+
cargo build # Rust backend
8383

8484
# Fast syntax/type checking (no binary output, 2-3x faster than build)
8585
cargo check --manifest-path src-tauri/Cargo.toml
8686
cargo check --all-features
8787

8888
# Linting
89-
npm run lint # Frontend (ESLint)
90-
cargo clippy # Rust
89+
deno lint # Frontend (Deno linter)
90+
cargo clippy --workspace # Rust
9191

9292
# Formatting
93-
npm run format # Frontend (Prettier)
94-
cargo fmt # Rust
95-
96-
# Tests directly
97-
cargo test --manifest-path src-tauri/Cargo.toml # Rust backend
98-
npm --prefix app/frontend test # Vitest unit
99-
npm --prefix app/frontend run test:e2e # Playwright E2E
93+
deno fmt # Frontend (Deno formatter)
94+
deno fmt --check # Check without changes
95+
cargo fmt --all # Rust
96+
97+
# Tests
98+
cargo nextest run --workspace # Rust (falls back to cargo test)
99+
cd app/frontend && npx vitest run # Vitest unit/property tests
100+
cd app/frontend && npx playwright test # Playwright E2E
100101

101102
# Pre-commit hooks
102103
pre-commit run --all-files

0 commit comments

Comments
 (0)