-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Husky hooks #587
Husky hooks #587
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Size Change: 0 B Total Size: 14.9 kB ℹ️ View Unchanged
|
I like precommit hooks, but I think having the tests run before every push is a bit much and could make everything really cumbersome. Especially since we can't merge without passing tests anyway. How do you feel about renaming |
Now that we separated out the |
I was thinking the same, tho I have the habit of
Sounds good. 👍 Any places it should be updated in other than the command itself? 🤔
That's done already, unless I'm missing something. |
Perfect! I think renaming the single script should be enough as it's not referenced anywhere I assume. |
Never heard of husky before. I'm curious – what advantage has this tool for our use case? For git-hooks, I usually have a folder {
"scripts": {
"prepare": "git config core.hooksPath .githooks",
}
} That is all that is needed to have auto-installing git-hooks. Am I missing something here? |
@hirasso I'm all in favor of doing this without additional dependencies or config folders if it works just the same. Doing some research, I've found simple-git-hooks which would let us get rid of the folder completely but at the cost of another dependency. |
@daun what would you think about no dependency for setting up the git hook, as described above, but a dependency |
I have created an alternative for you guys to check out: #588 That one is not using husky or any other library, it just sets |
If we can do it without another dependency and just plain git hooks, let's do that 🌝 |
Description
Adding husky hooks:
npm run lint
which checks for linting problems and fails commit if no goodnpm run test
which runs all the e2e tests to ensure all is good with the implementationboth can be skipped with
--no-verify
Also added/renamed
lint:fix
to auto-fix the issues found, and kept thelint
for only checking so the commit can be failed in such case.Checks
master
branchnpm run lint
)npm run test
)Additional information