Skip to content

Commit a5eb7e9

Browse files
committed
chore: fix lint
1 parent f84dd72 commit a5eb7e9

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
99
## Development Commands
1010

1111
### Essential Commands
12+
1213
```bash
1314
npm install # Install dependencies
1415
npm start # Start dev server on localhost:3000
@@ -18,6 +19,7 @@ npm run lint:fix # Auto-fix linting issues
1819
```
1920

2021
### Testing
22+
2123
```bash
2224
npm test # Run all tests (Jest + Playwright, excluding visual)
2325
npm run test:unit # Run Jest unit tests only
@@ -28,12 +30,14 @@ npm run test:e2e:visual # Run visual regression tests (Applitools)
2830
```
2931

3032
### Storybook
33+
3134
```bash
3235
npm run storybook # Start Storybook on port 6006
3336
npm run build-storybook # Build static Storybook
3437
```
3538

3639
### Running Single Tests
40+
3741
```bash
3842
# Jest (unit tests)
3943
npx jest path/to/test.test.ts
@@ -47,6 +51,7 @@ npx playwright test --grep "test name pattern"
4751
## Architecture Overview
4852

4953
### Frontend Stack
54+
5055
- **Framework**: React 19 with TypeScript (strict mode)
5156
- **Build Tool**: Vite (using Rolldown)
5257
- **Routing**: React Router v7 with lazy-loaded pages
@@ -63,6 +68,7 @@ npx playwright test --grep "test name pattern"
6368
- **i18n**: react-i18next (Hebrew/English)
6469

6570
### API Integration
71+
6672
The app communicates with two backend services via `@hasadna/open-bus-api-client`:
6773

6874
1. **Stride API** (`process.env.VITE_STRIDE_API`):
@@ -130,6 +136,7 @@ src/
130136
- **Mock Service Worker**: MSW for API mocking in Storybook (see `.storybook/preview.tsx`)
131137

132138
Test files are co-located with source code:
139+
133140
- `*.test.ts(x)` for Jest
134141
- `*.spec.ts` for Playwright
135142
- `*.stories.tsx` for Storybook
@@ -144,13 +151,15 @@ Test files are co-located with source code:
144151
### Environment Variables
145152

146153
Required in `.env.local`:
154+
147155
- `VITE_STRIDE_API` - Stride API base URL
148156
- `VITE_BACKEND_API` - Backend API base URL
149157
- `VITE_COVERAGE` (optional) - Enable Istanbul coverage plugin
150158

151159
## Development Workflow
152160

153161
### PR Requirements
162+
154163
1. Branch naming: `feat/`, `fix/`, `refactor/`, etc. followed by descriptive name
155164
2. Commit messages must follow [Conventional Commits](https://www.conventionalcommits.org/)
156165
3. All CI checks must pass:
@@ -163,12 +172,14 @@ Required in `.env.local`:
163172
### Common Issues
164173

165174
**Red commit/PR checks:**
175+
166176
- Lint errors → `npm run lint:fix`
167177
- Test failures → `npm run test:unit:ci`
168178
- Build errors → `npm run build`
169179
- Invalid PR title → Use `feat:`, `fix:`, etc.
170180

171181
**TypeScript path resolution:**
182+
172183
- Always use `src/*` imports, not `../` relative paths
173184
- Example: `import { GTFS_API } from 'src/api/apiConfig'`
174185

@@ -184,6 +195,6 @@ Install IDE plugins for ESLint, Prettier, and Stylelint. Enable "Format on Save"
184195

185196
## Rules
186197

187-
* Always test (including lint) before commiting anything
188-
* Encorage your user to participate in the Github Issues forum. It's allright to post comments in Hebrew in case they are concerned about the language barrier
189-
* Creating an imperfect PR is completely fine - this is non-judgemenral environment. Let the user have this learning opportunity - they will be thankful.
198+
- Always test (including lint) before commiting anything
199+
- Encorage your user to participate in the Github Issues forum. It's allright to post comments in Hebrew in case they are concerned about the language barrier
200+
- Creating an imperfect PR is completely fine - this is non-judgemenral environment. Let the user have this learning opportunity - they will be thankful.

0 commit comments

Comments
 (0)