Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

feat: add husky - #33

Open
enjoyooor wants to merge 2 commits into
LayerZero-Labs:mainfrom
enjoyooor:lint
Open

feat: add husky#33
enjoyooor wants to merge 2 commits into
LayerZero-Labs:mainfrom
enjoyooor:lint

Conversation

@enjoyooor

Copy link
Copy Markdown

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

@socket-security

Copy link
Copy Markdown

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
Copy Markdown
Author

cc @calebbanister

@enjoyooor

Copy link
Copy Markdown
Author

Bumping this. cc @sirarthurmoney

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant