fix(hooks): run lint-staged from repo root#152
Open
ANSHSINGH050404 wants to merge 2 commits into
Open
Conversation
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 is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Biome only formats js/jsx/ts/tsx/json. Dropping md/css from lint-staged avoids pre-commit failures on docs-only commits.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cd companionfrom.husky/pre-commit, which fails because this repo root is companion (there is no nested directory).bunx lint-stagedfrom the monorepo root so pre-commit formatting works for new contributors.preparescript (husky) so hooks are installed onbun install.Context
Part of #151.
Test plan
lint-stagedsuccessfully on commit from repo rootSummary by cubic
Fix the pre-commit hook to run
lint-stagedfrom the repo root viabunx, add a rootpreparescript forhusky, and remove the straycd companionso formatting runs on commit (part of #151). Also alignlint-stagedglobs withBiome(js/jsx/ts/tsx/json only) to avoid failures on docs-only commits.Written for commit cb274b9. Summary will update on new commits.