Skip to content

Commit

Permalink
build: remove husky and validation hooks
Browse files Browse the repository at this point in the history
Previously, we relied on husky package to set up the Git hooks to automatically lint code and check the commit message conventions. While it is a nice feature it causes extra delays on commit/push for more experienced contributors and we still get many PRs with incorrect commit messages from the first-time contributors. Given the above reasons remove the husky dependency, Git hooks and replace them with a script which can be used locally. Note that CI continues to validate the commit message conventions as before.
  • Loading branch information
devoto13 committed Nov 2, 2021
1 parent a2261bb commit 4c6f681
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 262 deletions.
9 changes: 6 additions & 3 deletions docs/dev/02-making-changes.md
Expand Up @@ -9,7 +9,6 @@ TODO:

If you are thinking about making Karma better, or you just want to hack on it, that’s great!
Here are some tips on how to set up a Karma workspace and how to send a good pull request.
**Please note we enforce [commit message conventions].**

## Setting up the Workspace

Expand Down Expand Up @@ -66,11 +65,15 @@ change the code, run the tests, etc.

## Sending a Pull Request

- Commit your changes (**please follow our [commit message conventions]**):
- Commit your changes (please follow [commit message conventions]):
```bash
$ git commit -m "..."
```
- Push to your github repo:
- Verify that the last commit follows the conventions:
```bash
$ npm run commit:check
```
- Push to your GitHub repo:
```bash
$ git push origin <branch_name>
```
Expand Down
252 changes: 0 additions & 252 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions package.json
Expand Up @@ -460,7 +460,6 @@
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"http2": "^3.3.6",
"husky": "^4.2.5",
"jasmine-core": "^3.6.0",
"karma": ".",
"karma-browserify": "^7.0.0",
Expand Down Expand Up @@ -495,15 +494,10 @@
},
"version": "6.3.7",
"license": "MIT",
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "npm run lint"
}
},
"scripts": {
"lint": "eslint . --ext js --ignore-pattern *.tpl.js",
"lint:fix": "eslint . --ext js --ignore-pattern *.tpl.js --fix",
"commit:check": "commitlint --from HEAD~1",
"test:unit": "mocha \"test/unit/**/*.spec.js\"",
"test:e2e": "cucumber-js test/e2e/*.feature",
"test:client": "node bin/karma start test/client/karma.conf.js",
Expand Down

0 comments on commit 4c6f681

Please sign in to comment.