Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add husky #33

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: add husky #33

wants to merge 2 commits into from

Conversation

enjoyooor
Copy link

In this PR, I'm adding a pre-commit hook using Husky. This hook can be used to lint all staged files.

I was just playing around with this repo and noticed that yarn lint led to lots of files being changed. This suggested to me that linting is not being enforced in the repo. Sometimes formatting (or lack thereof) can get out of hand, so I like to use pre-commit hooks to enforce better coding standard. This can also be added to other LayerZero repos, if preferred.

Let me know what you all think ^^

Tested a bunch of times by

  • adding unnecessary whitespace to a file
  • running git add . && git commit -m "test"
❯ git commit -m "test"
✔ Preparing lint-staged...
✔ Running tasks for staged files...
✔ Applying modifications from tasks...
✔ Cleaning up temporary files...
[lint 1dbdf8f] test
 1 file changed, 1 insertion(+), 1 deletion(-)

^ sample output

Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/eventemitter3@5.0.1 None 0 73.4 kB lpinca
npm/get-stream@8.0.1 None 0 25.2 kB ehmicky
npm/husky@9.0.11 environment, filesystem, shell 0 3.61 kB typicode
npm/lint-staged@15.2.2 Transitive: environment, filesystem, shell +53 2.46 MB okonet

View full report↗︎

@enjoyooor
Copy link
Author

cc @calebbanister

@enjoyooor
Copy link
Author

Bumping this. cc @sirarthurmoney

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.

None yet

1 participant