mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Improve lint and tsc contributor guidance
This commit is contained in:
@@ -78,12 +78,19 @@ This section summarizes the overall architecture, structure, and technologies of
|
|||||||
|
|
||||||
## Development Workflow & Tooling
|
## Development Workflow & Tooling
|
||||||
|
|
||||||
- TypeScript strict-mode throughout
|
- TypeScript strict-mode throughout
|
||||||
- Code style enforced with **ESLint** and **Prettier**
|
- Code style enforced with **ESLint** and **Prettier**
|
||||||
- Backend and frontend run via Docker or parallel dev servers
|
- Backend and frontend run via Docker or parallel dev servers
|
||||||
- Database migrations managed with Prisma
|
- Database migrations managed with Prisma
|
||||||
- CI/CD pipelines ensure linting, testing, and build integrity
|
- CI/CD pipelines ensure linting, testing, and build integrity
|
||||||
- All new features require code review, test coverage, and documentation updates
|
- All new features require code review, test coverage, and documentation updates
|
||||||
|
|
||||||
|
### Linting and Type-Checking Expectations
|
||||||
|
- Run `npm run lint` and `npm run tsc` from the repo root before requesting review; use `npm run lint:backend` / `npm run lint:frontend` and `npm run tsc:backend` / `npm run tsc:frontend` when iterating in a single scope.
|
||||||
|
- If Cypress specs are touched, run `npm run lint:cypress` to satisfy the dedicated ESLint rules in `eslint.config.mjs`.
|
||||||
|
- Keep Prisma clients generated (`npm run prisma`) so TypeScript sees the emitted types referenced by backend utilities.
|
||||||
|
- Typical CI failures to avoid: unchecked Prettier drift, unused imports/variables (especially in tests), missing async return types or implicit `any`, and stale `eslint-disable` directives.
|
||||||
|
- Large fixtures or JSON assets (e.g., geodata) should remain excluded via `tsconfig.json`/`eslint.config.mjs` ignores; avoid importing them in type-checked code paths.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -53,8 +53,15 @@ Implement **exactly one task** from an approved feature plan.
|
|||||||
✅ **Coding Requirements**
|
✅ **Coding Requirements**
|
||||||
|
|
||||||
### Scope
|
### Scope
|
||||||
- Implement **only** the task above. No bonus features.
|
- Implement **only** the task above. No bonus features.
|
||||||
- Respect `files_touched`, `migrations`, `settings_changes`, `permissions`.
|
- Respect `files_touched`, `migrations`, `settings_changes`, `permissions`.
|
||||||
|
|
||||||
|
### Local lint/type-check checklist (run before returning output)
|
||||||
|
- From repo root, run `npm run lint` and `npm run tsc`; for focused work use `npm run lint:backend` / `npm run lint:frontend` and `npm run tsc:backend` / `npm run tsc:frontend`.
|
||||||
|
- If Cypress specs changed, run `npm run lint:cypress` to cover `cypress/e2e/**/*.cy.js` rules from `eslint.config.mjs`.
|
||||||
|
- Ensure Prisma clients are generated (`npm run prisma`) so `tsc --noEmit` sees emitted types in backend utilities.
|
||||||
|
- Common failure patterns to avoid: missing Prettier formatting, unused imports/variables in tests, missing async return types or implicit `any`, and stale `eslint-disable` directives.
|
||||||
|
- Keep large fixtures/geojson assets out of type-checked paths; rely on `tsconfig`/ESLint ignores already defined (see `frontend/tsconfig.json`, `backend/tsconfig.json`, and `eslint.config.mjs`).
|
||||||
|
|
||||||
### Quality / Style
|
### Quality / Style
|
||||||
- Follow ESLint + Prettier + TypeScript strict.
|
- Follow ESLint + Prettier + TypeScript strict.
|
||||||
|
|||||||
Reference in New Issue
Block a user