Skip to content

Commit 79af32e

Browse files
authored
chore: Update claude.md with more linting instrucitons (#1268)
1 parent c428d98 commit 79af32e

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

CLAUDE.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,25 +125,33 @@ yarn dev
125125
- `yarn dev:int`: Run integration tests in watch mode
126126
- `yarn dev:unit`: Run unit tests in watch mode (per package)
127127

128-
### Lint Fix Commands
128+
### ⚠️ BEFORE COMMITTING - Run Linting Commands
129129

130-
To automatically fix linting issues:
130+
**Claude AI agents must run these commands before any commit:**
131131

132132
```bash
133-
# Fix linting issues in specific packages
134-
cd packages/api && yarn lint:fix
135-
cd packages/app && yarn lint:fix
133+
# 1. Fix linting issues in modified packages
134+
cd packages/app && yarn run lint:fix
135+
cd packages/api && yarn run lint:fix
136136
cd packages/common-utils && yarn lint:fix
137137

138-
# Or use NX to run lint:fix across packages
139-
npx nx run-many -t lint:fix
138+
# 2. Check for any remaining linting issues from the main directory
139+
yarn run lint
140140
```
141141

142-
**Auto-fix on commit**: The project uses `lint-staged` with Husky to
143-
automatically fix linting issues on commit:
142+
**If linting issues remain after running lint:fix**: Some linting errors cannot
143+
be automatically fixed and require manual intervention. If `yarn run lint` still
144+
shows errors:
144145

145-
- Prettier formatting for all files
146-
- ESLint auto-fix for TypeScript files
146+
1. Read the linting error messages carefully to understand the issue
147+
2. Manually fix the reported issues in the affected files
148+
3. Re-run `yarn run lint` to verify all issues are resolved
149+
4. Only commit once all linting errors are fixed
150+
151+
**Why this is necessary**: While the project has pre-commit hooks (`lint-staged`
152+
with Husky) that automatically fix linting issues on commit, Claude AI agents do
153+
not trigger these hooks. Therefore, you must manually run the lint:fix commands
154+
before committing.
147155

148156
### Environment Configuration
149157

0 commit comments

Comments
 (0)