update steering docs and hooks for current project state
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
---
|
||||
name: Lint Python on Save
|
||||
description: Run ruff linter when any Python file is saved
|
||||
version: "1.0"
|
||||
name: Lint on Save
|
||||
description: Run linter when Python or TypeScript files are saved
|
||||
version: "2.0"
|
||||
trigger:
|
||||
type: onSave
|
||||
filePattern: "**/*.py"
|
||||
filePattern: "**/*.{py,ts,tsx}"
|
||||
---
|
||||
|
||||
When any Python file is saved:
|
||||
When a file is saved:
|
||||
|
||||
1. Run `ruff check {filePath}` on the saved file
|
||||
2. If there are fixable issues, run `ruff check --fix {filePath}` to auto-fix
|
||||
3. Report any remaining issues concisely
|
||||
1. If it's a Python file (`*.py`):
|
||||
- Run `nix-shell -p ruff --run "ruff check {filePath}"` on the saved file
|
||||
- If there are fixable issues, run `nix-shell -p ruff --run "ruff check --fix {filePath}"`
|
||||
- Report any remaining issues concisely
|
||||
|
||||
2. If it's a TypeScript/React file (`*.ts` or `*.tsx`) under `frontend/`:
|
||||
- Run `npx tsc --noEmit` from the `frontend/` directory to check types
|
||||
- Report any type errors concisely
|
||||
|
||||
Reference in New Issue
Block a user