@@ -118,90 +118,35 @@ The application uses a cohesive Norwegian nature-inspired color palette:
118118
119119## 🤝 Contributing
120120
121- See [ CONTRIBUTING.md] ( CONTRIBUTING.md ) for detailed development guidelines.
122-
123- ### Quick Start - Remote Development
124-
125- ** Option 1: GitHub Codespaces (Recommended)**
126- ``` bash
127- 1. Click " Code" → " Codespaces" → " Create codespace on main"
128- 2. Wait for environment to build (automatic npm install)
129- 3. Run: npm run dev
130- 4. Access dev server via forwarded port
131- ```
132-
133- ** Option 2: Local Development**
134- ``` bash
135- git clone https://github.com/elzacka/trakke-react.git
136- cd trakke-react
137- npm install
138- npm run dev
139- ```
140-
141- ### Development Workflow (Zero Local Setup Required)
142-
143- 1 . ** Create Feature Branch**
121+ ### Development Workflow
122+ 1 . Fork repository → create feature branch
123+ 2 . ** ALWAYS run before committing** :
144124 ``` bash
145- git checkout -b feature/your-feature-name
125+ npm run lint # Must pass with 0 errors (max 150 warnings)
126+ npm run build # TypeScript build must succeed
146127 ```
147-
148- 2 . ** Make Changes** - Automatic quality checks on commit via Husky
149- - ESLint auto-fixes on commit
150- - Prettier formats code
151- - Tests run automatically
152-
153- 3 . ** Push to GitHub** - Branch preview deploys automatically
128+ 3 . Use the safe-commit helper script (recommended):
154129 ``` bash
155- git push -u origin feature/your-feature-name
130+ ./scripts/safe-commit.sh " Your commit message "
156131 ```
157-
158- 4 . ** Test Your Feature**
159- - Preview URL posted in PR comments
160- - Scan QR code to test on iPhone
161- - Test desktop in any browser
162-
163- 5 . ** Create Pull Request**
164- - Automated quality checks run
165- - Preview deployment updates on each push
166- - Merge when all checks pass
167-
168- ### Quality Automation
169-
170- ✅ ** Automated on every commit:**
171- - ESLint auto-fix
172- - Prettier formatting
173- - Type checking (via pre-commit hook)
174-
175- ✅ ** Automated on every push:**
176- - Full test suite
177- - Build verification
178- - Preview deployment
179- - Quality check reports
180-
181- ✅ ** Automated weekly:**
182- - Dependency updates via Dependabot
183-
184- ### Available Commands
185-
186- ``` bash
187- npm run dev # Start development server
188- npm run build # Production build
189- npm run typecheck # TypeScript type checking
190- npm run lint # Run ESLint
191- npm run lint:fix # Auto-fix ESLint issues
192- npm run format # Format with Prettier
193- npm test # Run tests in watch mode
194- npm run test:ui # Open Vitest UI
195- npm run test:coverage # Run tests with coverage
196- ```
197-
198- ### Claude Code Commands
199-
200- If using Claude Code, custom slash commands are available:
201- - ` /check ` - Run all quality checks
202- - ` /test ` - Run tests with optional coverage
203- - ` /fix ` - Auto-fix linting and formatting
204- - ` /review ` - Comprehensive code review
132+ 4 . Follow TypeScript + Norwegian terminology guidelines
133+ 5 . Test on desktop and mobile before submitting PR
134+
135+ ### Code Quality Requirements
136+ - ** ESLint** : Zero tolerance for errors, max 150 warnings
137+ - ** TypeScript** : All builds must pass type checking
138+ - ** Pre-commit Hook** : Automatically blocks commits with ESLint errors
139+ - ** Language** : All user-facing text in Norwegian (Bokmål)
140+
141+ ### Adding POI Categories
142+ 1 . Add fetch function to appropriate service (e.g., ` src/services/overpassService.ts ` )
143+ 2 . Add transform function to ` src/MapLibreTrakkeApp.tsx `
144+ 3 . Add loading logic to main POI loading ` useEffect `
145+ 4 . Enable category in ` src/components/HierarchicalCategoryFilter.tsx `
146+ 5 . Verify POI type exists in ` src/data/pois.ts `
147+ 6 . Add data attribution to "Om kartet" modal
148+
149+ See ` CLAUDE.md ` for detailed implementation guidelines.
205150
206151## 🏔️ Norwegian Heritage
207152
0 commit comments