Skip to content

chore: improve development workflow #103

Open
azizbecha wants to merge 17 commits intocallstack:mainfrom
azizbecha:main
Open

chore: improve development workflow #103
azizbecha wants to merge 17 commits intocallstack:mainfrom
azizbecha:main

Conversation

@azizbecha
Copy link

Summary

This PR significantly improves the development workflow by implementing automated code quality and commit validation. It introduces:

1. Git Hooks (Husky)

  • Pre-commit hook: Automatically formats staged files and builds all packages
  • Pre-push hook: Ensures builds are clean before pushing to remote

2. Automated Code Formatting (Lint-Staged)

  • Runs Biome formatter on staged files
  • Prevents inconsistent code from being committed

3. Commit Message Validation (Commitlint)

  • Enforces conventional commit messages (feat, fix, chore, docs, etc.)
  • Prevents invalid commit messages from being created

4. Enhanced npm Scripts

  • pnpm run build:all - Builds all packages in correct dependency order
  • pnpm run dev - Starts the tester dev server
  • pnpm run preview - Previews the production build

Test plan

  1. Test pre-commit hook:

    # Make a change to a file
    git add .
    git commit -m "chore: test hooks"
    # Verify: Should lint-stage and build all packages
  2. Test commit message validation:

    git commit -m "invalid message"
    # Expected: Rejected with error message
    
    git commit -m "feat: valid message"
    # Expected: Accepted and proceeds
  3. Verify all scripts work:

    pnpm run lint
    pnpm run typecheck
    pnpm run build:all
    pnpm run dev

Copy link
Member

@jbroma jbroma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for the contribution 🎉

most changes look good, left few comments tho 👍

package.json Outdated
"lint": "biome check --write",
"typecheck": "pnpm -r typecheck"
"typecheck": "pnpm -r typecheck",
"lint-staged": "lint-staged"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed, in husky you can just run pnpm lint-staged

package.json Outdated
"lint-staged": "^16.2.7"
},
"lint-staged": {
"*.{ts,tsx,js,jsx,json,md}": "biome format"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather go with lint which will run everything it can (lint,format,import organizer)

@azizbecha
Copy link
Author

Hey @jbroma, thanks for the review!
I applied all your remarks, can you take a look again and tell me if there's something else that needs to done ?
Thanks.

Copy link
Member

@jbroma jbroma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems that there is still no setup for husky and running lint-staged (which was removed) - lets bring it back and setup husky, I believe it was pnpx husky init to create the precommit hook :)

@azizbecha
Copy link
Author

Yes, you're right. For some reason the husky files weren't pushed to the repo.
Now everything is working well.
Screen Shot 2026-01-23 at 17 03 26 PM

@azizbecha
Copy link
Author

Hi @jbroma, any update on this?

Copy link
Member

@jbroma jbroma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the delay, I was on sick leave, everything looks good, found just these 2 things:

@azizbecha
Copy link
Author

Sorry to hear that, I hope you're good now.
I did all the fixes, let me know if there's something else that needs to be enhanced.

Copy link
Member

@jbroma jbroma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@jbroma
Copy link
Member

jbroma commented Feb 2, 2026

@azizbecha please resolve the conflicts and then we can merge this 🚀

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.

2 participants