Skip to content

Feat/webhook system pushed#266

Merged
robertocarlous merged 3 commits into
Neurowealth:mainfrom
GreatShinro:feat/webhook-system-pushed
Jul 4, 2026
Merged

Feat/webhook system pushed#266
robertocarlous merged 3 commits into
Neurowealth:mainfrom
GreatShinro:feat/webhook-system-pushed

Conversation

@GreatShinro

@GreatShinro GreatShinro commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

chore: Git Hooks — Pre-commit Linting & Pre-push Tests

Summary

Adds husky + lint-staged so formatting and lint errors are caught locally before they reach CI, and the test suite runs automatically before every push.


What Changed

.husky/pre-commit       ← runs lint-staged on staged files
.husky/pre-push         ← runs full test suite before push
package.json            ← lint-staged config + prepare script
package-lock.json       ← updated lockfile

Hook Behaviour

Event Command Effect
npm install husky (via prepare) Hooks installed automatically for every contributor
git commit npx lint-staged ESLint auto-fix + Prettier format on staged src/**/*.ts and tests/**/*.ts; fixed files are re-staged
git push npm test -- --passWithNoTests Full Jest suite; push is blocked on test failures

lint-staged Config

"lint-staged": {
  "src/**/*.ts": ["eslint --fix", "prettier --write"],
  "tests/**/*.ts": ["eslint --fix", "prettier --write"]
}

Acceptance Criteria

  • npm install sets up hooks automatically via prepare script
  • Committing a file with a lint error is blocked (or auto-fixed and re-staged)
  • Committing a file with wrong formatting auto-fixes and re-stages it
  • CI still runs full lint + tests independently of hooks (unchanged)

Notes

  • Pre-existing test failures (missing .env vars, logic bugs in client.test.ts) are unrelated to this change — they fail identically on main. They will pass once a valid .env is in place.
  • Use git commit --no-verify or git push --no-verify only when intentionally bypassing hooks (e.g. WIP commits, CI-only env setups).

closes #221

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@GreatShinro Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@robertocarlous

Copy link
Copy Markdown
Contributor

Fix conflict

@GreatShinro

Copy link
Copy Markdown
Contributor Author

@GreatShinro conflicts has been resolved, please assign points

@GreatShinro GreatShinro closed this Jul 4, 2026
@GreatShinro GreatShinro reopened this Jul 4, 2026
@robertocarlous robertocarlous merged commit b335504 into Neurowealth:main Jul 4, 2026
2 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add pre-commit hooks with husky and lint-staged

2 participants