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
prevent overwriting custom commands #1439
Comments
Hi, |
thank you |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, my team is working on a project and at some point we decided to integrate husky. The thing is that our project is not located in the same directory as .git file. I managed to change prepare script from
"scripts": { ..., "prepare": "husky" },
to
"scripts": { ..., "prepare": "cd .. && husky frontend/.husky && cd frontend && npx husky init" },
and I created
.husky/pre-commit
file withcd frontend npx lint-staged
when running
npm install
it overwritespackage.json
and.husky/pre-commit
files to default values. I created a fork of the husky repository and added a few lines to prevent overwriting those files. Like so:it works well in our project. What do you think about adding those lines to the
bin.mjs
?The text was updated successfully, but these errors were encountered: