Merge pull request #3458 from janhq/chore/add-husky-pre-commit-hook

chore: add husky pre-commit
This commit is contained in:
Louis 2024-08-26 17:12:21 +07:00 committed by GitHub
commit c25d0ce45c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 7 deletions

View File

@ -1,4 +1 @@
#!/usr/bin/env sh npm run lint --fix
. "$(dirname -- "$0")/_/husky.sh"
npx pretty-quick --staged

View File

@ -41,14 +41,16 @@
"build": "yarn build:web && yarn build:electron", "build": "yarn build:web && yarn build:electron",
"build:publish": "yarn copy:assets && yarn build:web && yarn workspace jan build:publish", "build:publish": "yarn copy:assets && yarn build:web && yarn workspace jan build:publish",
"dev:joi": "yarn workspace @janhq/joi install && yarn workspace @janhq/joi dev", "dev:joi": "yarn workspace @janhq/joi install && yarn workspace @janhq/joi dev",
"build:joi": "yarn workspace @janhq/joi install && yarn workspace @janhq/joi build" "build:joi": "yarn workspace @janhq/joi install && yarn workspace @janhq/joi build",
"prepare": "husky"
}, },
"devDependencies": { "devDependencies": {
"concurrently": "^8.2.1", "concurrently": "^8.2.1",
"cpx": "^1.5.0", "cpx": "^1.5.0",
"husky": "^9.1.5",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"wait-on": "^7.0.1", "run-script-os": "^1.1.6",
"run-script-os": "^1.1.6" "wait-on": "^7.0.1"
}, },
"version": "0.0.0" "version": "0.0.0"
} }