Skip to content

Commit 1230777

Browse files
committed
chore(agents): npm to pnpm, remove setValue mention, run pnpm exec prettier
1 parent 638c3d7 commit 1230777

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

.claude/hooks/post-edit.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ FILE_PATH=$(cat | node -e "
2626
# Skip if no file path or file doesn't exist
2727
[[ -z "$FILE_PATH" || ! -f "$FILE_PATH" ]] && exit 0
2828

29-
# Auto-format with prettier using the project's installed version
30-
npx prettier --write "$FILE_PATH" 2>/dev/null
31-
3229
# Find the nearest package directory with eslint config
3330
SEARCH_DIR=$(dirname "$FILE_PATH")
3431
PACKAGE_DIR=""
@@ -40,9 +37,16 @@ while [[ "$SEARCH_DIR" != "/" ]]; do
4037
SEARCH_DIR=$(dirname "$SEARCH_DIR")
4138
done
4239

40+
# Auto-format with prettier from the package directory
41+
if [[ -n "$PACKAGE_DIR" ]]; then
42+
(cd "$PACKAGE_DIR" && pnpm exec prettier --write "$FILE_PATH" 2>/dev/null)
43+
else
44+
pnpm exec prettier --write "$FILE_PATH" 2>/dev/null
45+
fi
46+
4347
# Run lint from the package directory using the project's lint setup
4448
if [[ -n "$PACKAGE_DIR" ]]; then
45-
LINT_OUTPUT=$(cd "$PACKAGE_DIR" && npm run lint 2>&1)
49+
LINT_OUTPUT=$(cd "$PACKAGE_DIR" && pnpm run lint 2>&1)
4650
if [[ $? -ne 0 ]]; then
4751
echo "$LINT_OUTPUT" >&2
4852
exit 2

CLAUDE.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Monorepo of official Mendix pluggable web widgets. pnpm workspaces + Turbo.
77
- Install: `pnpm install`
88
- Build all: `pnpm build`
99
- Build one: `pnpm --filter @mendix/<name> run build`
10-
- Test one: cd into package dir, run `npm run test` (NOT from repo root)
11-
- Lint one: cd into package dir, run `npm run lint`
10+
- Test one: cd into package dir, run `pnpm run test` (NOT from repo root)
11+
- Lint one: cd into package dir, run `pnpm run lint`
1212
- Changelog: `pnpm -w changelog`
1313

1414
## Structure
@@ -25,15 +25,14 @@ docs/requirements/ -> Detailed technical requirements
2525

2626
- **Auto-format**: Every file edit is auto-formatted by prettier via PostToolUse hook.
2727
Do NOT manually run `prettier --write` — it wastes tokens, the hook handles it.
28-
- **Auto-lint**: After each edit, eslint runs via `npm run lint` in the file's package.
28+
- **Auto-lint**: After each edit, eslint runs via `pnpm run lint` in the file's package.
2929
Lint errors are fed back automatically — fix them in the next edit, do NOT run lint commands manually.
3030

3131
## Conventions
3232

3333
- TypeScript strict, React functional components + hooks
3434
- Mendix Pluggable Widgets API: EditableValue, ActionValue, ListValue, DynamicValue
3535
- Check ActionValue.canExecute before execute()
36-
- Use EditableValue.setValue() for two-way binding
3736
- Render loading/empty states until values are ready
3837
- SCSS for styling, prefer Atlas UI classes, BEM-like naming with widget prefix
3938
- Conventional commits enforced: `type(scope): description`

0 commit comments

Comments
 (0)