Skip to content

Commit

Permalink
chore: migrate to use simple-git-hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
motss committed Dec 3, 2021
1 parent 1f92479 commit 6a0d7e7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
17 changes: 17 additions & 0 deletions package-lock.json

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

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"lint": "eslint src --ext .js,.ts",
"lint:build": "npm run lint -- --config .build.eslintrc.json",
"nano-staged": "nano-staged",
"prepare": "if [ \"$CI\" != 'true' ]; then npm x -- husky install; fi",
"prepare": "if [ \"$CI\" != 'true' ]; then npm x -y -- simple-git-hooks; fi",
"prepublishOnly": "npm run lint:build && npm run build",
"serve": "npm x -y @web/dev-server@latest -- wds --node-resolve -dw -p 3000 -a index.html",
"test": "npm run test:helpers && npm run test:elements",
Expand All @@ -99,6 +99,11 @@
"watch": "npm run clean && tsc --watch",
"wtr": "node --max-old-space-size=8192 --trace-deprecation node_modules/@web/test-runner/dist/bin.js"
},
"simple-git-hooks": {
"pre-commit": "npm run check && npm run nano-staged && npm run ts -- --noEmit",
"commit-msg": "npm x -y -- commitlint --edit \"$1\"",
"post-commit": "npm run clean"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
Expand Down Expand Up @@ -135,6 +140,7 @@
"eslint-plugin-simple-import-sort": "^7.0.0",
"hanbi": "^1.0.1",
"nano-staged": "^0.3.1",
"simple-git-hooks": "^2.7.0",
"typescript": "^4.5.2"
},
"engines": {
Expand Down

0 comments on commit 6a0d7e7

Please sign in to comment.