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:
@@ -85,6 +85,13 @@ This section summarizes the overall architecture, structure, and technologies of
|
||||
- CI/CD pipelines ensure linting, testing, and build integrity
|
||||
- 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.
|
||||
|
||||
---
|
||||
|
||||
# Codex Prompt for NOW Database Full-Stack Development
|
||||
|
||||
@@ -56,6 +56,13 @@ Implement **exactly one task** from an approved feature plan.
|
||||
- Implement **only** the task above. No bonus features.
|
||||
- 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
|
||||
- Follow ESLint + Prettier + TypeScript strict.
|
||||
- Typed interfaces / DTOs for all API payloads.
|
||||
|
||||
Reference in New Issue
Block a user