From 1a0db9baf005bbeb992ea4db688977bdc0e8acba Mon Sep 17 00:00:00 2001 From: Nikolay Tatarinov Date: Wed, 4 Mar 2026 14:15:51 +0300 Subject: [PATCH] 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. --- .cursor/rules/project-conventions.mdc | 3 ++- .cursor/skills/run-lint/SKILL.md | 29 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .cursor/skills/run-lint/SKILL.md diff --git a/.cursor/rules/project-conventions.mdc b/.cursor/rules/project-conventions.mdc index 55927fa..5ba3196 100644 --- a/.cursor/rules/project-conventions.mdc +++ b/.cursor/rules/project-conventions.mdc @@ -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). diff --git a/.cursor/skills/run-lint/SKILL.md b/.cursor/skills/run-lint/SKILL.md new file mode 100644 index 0000000..a4c9705 --- /dev/null +++ b/.cursor/skills/run-lint/SKILL.md @@ -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.