diff --git a/.husky/pre-commit b/.husky/pre-commit old mode 100644 new mode 100755 index 9ad483a5..3199e8e0 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -pretty-quick --staged +npm run lint:staged diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b6f02db..d5a6239a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ Special thanks to the following contributors: @B1gG, @codac, @ezeholz, @khassel, - Use node v16 in github workflow (replacing node v10) - Moved some files into better suited directories - Update dependencies in package.json, require node >= v12, remove `rrule-alt` and `rrule` -- Update dependencies in package.json and migrate husky to v6 +- Update dependencies in package.json and migrate husky to v6, fix husky setup in prod environment - Cleaned up error handling in newsfeed and calendar modules ### Removed diff --git a/package.json b/package.json index 4b45193d..d965385a 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "lint:prettier": "prettier --write **/*.{js,css,json,md,yml}", "lint:js": "eslint js/**/*.js modules/default/**/*.js clientonly/*.js serveronly/*.js translations/*.js vendor/*.js tests/**/*.js config/* --config .eslintrc.json --fix", "lint:css": "stylelint css/main.css modules/default/**/*.css --config .stylelintrc.json --fix", - "prepare": "husky install" + "lint:staged": "pretty-quick --staged", + "prepare": "[ -f node_modules/.bin/husky ] && husky install || echo no husky installed." }, "repository": { "type": "git",