Update project conventions and introduce linting skill documentation

- Revised project-conventions.mdc to include a new section for running lint before tests, enhancing the development workflow.
- Added run-lint skill documentation in a new SKILL.md file, detailing usage for backend and frontend linting processes in the hnh-map monorepo.
This commit is contained in:
2026-03-04 14:15:51 +03:00
parent 337386caa8
commit 1a0db9baf0
2 changed files with 31 additions and 1 deletions

View File

@@ -11,4 +11,5 @@ alwaysApply: true
- **Local run / build:** [docs/development.md](docs/development.md), [CONTRIBUTING.md](CONTRIBUTING.md). Dev ports: frontend 3000, backend 3080; prod: 8080. Build, test, lint, and format run via Docker (Makefile + docker-compose.tools.yml).
- **Docs:** [docs/](docs/) (architecture, API, configuration, development, deployment). Some docs are in Russian.
- **Coding:** Write tests first before implementing any functionality.
- **Running tests:** When the user asks to run tests or to verify changes, use the run-tests skill: [.cursor/skills/run-tests/SKILL.md](.cursor/skills/run-tests/SKILL.md).
- **Running lint:** When the user asks to run the linter or to verify changes, use the run-lint skill: [.cursor/skills/run-lint/SKILL.md](.cursor/skills/run-lint/SKILL.md).
- **Running tests:** When the user asks to run tests or to verify changes, run lint first (run-lint skill), then use the run-tests skill: [.cursor/skills/run-tests/SKILL.md](.cursor/skills/run-tests/SKILL.md).

View File

@@ -0,0 +1,29 @@
---
name: run-lint
description: Runs backend (golangci-lint) and frontend (ESLint) linters for the hnh-map monorepo. Use when the user asks to run the linter, lint, or to check code style and lint errors.
---
# Run linter
## When to run
- User asks to run the linter, run lint, or check lint/style.
- After making code changes that should be validated by the project linters.
## What to run
Lint runs **in Docker** via the Makefile; no local Go or Node is required.
From the repo root:
- **Both backend and frontend:** `make lint` (runs golangci-lint then frontend ESLint in Docker).
Uses `docker-compose.tools.yml`; the first run may build the backend-tools and frontend-tools images.
## Scope
- **Backend-only changes** (e.g. `internal/`, `cmd/`): `make lint` still runs both; backend lint runs first.
- **Frontend-only changes** (e.g. `frontend-nuxt/`): `make lint` runs both; frontend lint runs second.
- **Both or unclear**: run `make lint`.
Report pass/fail and any linter errors or file/line references so the user can fix them.