Skip to content

fix(hooks): run lint-staged from repo root#152

Open
ANSHSINGH050404 wants to merge 2 commits into
calcom:mainfrom
ANSHSINGH050404:fix/husky-pre-commit-root
Open

fix(hooks): run lint-staged from repo root#152
ANSHSINGH050404 wants to merge 2 commits into
calcom:mainfrom
ANSHSINGH050404:fix/husky-pre-commit-root

Conversation

@ANSHSINGH050404

@ANSHSINGH050404 ANSHSINGH050404 commented Jul 19, 2026

Copy link
Copy Markdown

Summary

  • Remove the incorrect cd companion from .husky/pre-commit, which fails because this repo root is companion (there is no nested directory).
  • Run bunx lint-staged from the monorepo root so pre-commit formatting works for new contributors.
  • Add a root prepare script (husky) so hooks are installed on bun install.

Context

Part of #151.

Test plan

  • Verified pre-commit runs lint-staged successfully on commit from repo root
  • Confirmed staged JSON is formatted by Biome via lint-staged
  • CI passes on this PR

Summary by cubic

Fix the pre-commit hook to run lint-staged from the repo root via bunx, add a root prepare script for husky, and remove the stray cd companion so formatting runs on commit (part of #151). Also align lint-staged globs with Biome (js/jsx/ts/tsx/json only) to avoid failures on docs-only commits.

Written for commit cb274b9. Summary will update on new commits.

Review in cubic

Remove the incorrect `cd companion` from the Husky pre-commit hook so
commits work from the monorepo root. Add a prepare script so Husky
installs hooks on dependency install.

Fixes part of calcom#151
@ANSHSINGH050404
ANSHSINGH050404 requested a review from a team as a code owner July 19, 2026 12:26
@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

@ANSHSINGH050404 is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the config Changes to project configuration files label Jul 19, 2026
Biome only formats js/jsx/ts/tsx/json. Dropping md/css from
lint-staged avoids pre-commit failures on docs-only commits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Changes to project configuration files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant